@hoyasumii/libretranslate
SDK
A typed client for the LibreTranslate API, generated by orval from an OpenAPI spec: text and batch translation, language detection, files, suggestions, with the API key sent for you.
const lt = createLibreTranslateClient({ baseUrl: "http://localhost:5000" });
const { translatedText } = await lt.translate({ q: "Olá, mundo", target: "en" });
libretranslate-mcp
MCP server
Machine translation for Claude Code, Codex, OpenCode or any MCP client: texts, lists and whole documents, language detection, and generic tools for the raw API. Over stdio or Streamable HTTP.
npx libretranslate mcp config
npx libretranslate mcp install
libretranslate
CLI
Every MCP tool as a terminal command, plus libretranslate mcp to run the server in the background, start it at login and register it in your clients.
npx libretranslate translate --q "Olá, mundo" --target en
npx libretranslate translate-file --path report.docx --target es