libretranslate-mcp
Provides tools for interacting with a LibreTranslate instance's HTTP API: translating one text or a list of texts (with automatic language detection, HTML format support and alternatives), translating local documents, detecting candidate languages, listing supported languages and their available targets, checking instance health/status (key requirement, character limit, supported file formats), and sending improved translation suggestions. Raw API endpoints are also exposed through resource/describe/call tools.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
@hoyasumii/libretranslate
Unofficial TypeScript SDK for the LibreTranslate API, with an MCP server (stdio and HTTP) and a CLI.
Documentation: hoyasumii.github.io/libretranslate (English and
Português), also as llms.txt and
llms-full.txt for LLMs. libretranslate docs opens it.
Page | What it covers |
an instance, installation, the first calls | |
the client, translation, files, errors | |
transports, every tool, configuration, programmatic use | |
tools as commands, | |
every exported class, type and function, generated from source | |
building, testing, the spec and the codegen, this site |
The package has three layers, laid out like @hoyasumii/plane and
@hoyasumii/signoz:
SDK. Translate texts and lists, detect languages, translate documents and send suggestions. It is generated by orval from an OpenAPI 3.1 spec written for this package (
spec/openapi.yml), and sends the API key in the body when the instance issues keys.MCP server (
@hoyasumii/libretranslate/mcp, binlibretranslate-mcp). Runs over stdio or Streamable HTTP on127.0.0.1.Curated tools:
libretranslate_translate,_translate_file,_detect,_languages,_status,_suggest, with orval's zod schemas as their inputs.libretranslate_resources/libretranslate_describe/libretranslate_callfor the raw API.
CLI (bin
libretranslate). An MCP client: every tool becomes a subcommand.libretranslate mcp …configures, starts and stops the server, registers it with Claude Code/Codex/OpenCode and starts it at login.
An independent,unofficial client, MIT licensed. It talks to a LibreTranslate instance over HTTP and contains no code from the LibreTranslate project or its MCP server, both AGPL-3.0. Not affiliated with or endorsed by the LibreTranslate project.
Installation
npm i -g @hoyasumii/libretranslate # or: pnpm add -g, or clone + pnpm build + npm i -g .
libretranslate mcp config # the instance URL (default http://localhost:5000) and an optional API key
libretranslate mcp install # registers the server (stdio) with Claude Code / Codex / OpenCodeNo instance yet? With Docker installed, libretranslate service up --languages en,pt,es runs one at
http://localhost:5000 (no key needed) and saves it as the CLI's instance; service down|status|logs manage it. Hosted ones, such as libretranslate.com, require an API key.
Related MCP server: Google Live Translate MCP Server
SDK
import { createLibreTranslateClient } from "@hoyasumii/libretranslate";
const lt = createLibreTranslateClient({
baseUrl: "http://localhost:5000",
apiKey: process.env.LIBRETRANSLATE_API_KEY, // only for instances that issue keys
});
const { translatedText, detectedLanguage } = await lt.translate({ q: "Olá, mundo!", target: "en" });
const many = await lt.translateMany({ q: ["Bom dia", "Boa noite"], source: "pt", target: "es" });
const html = await lt.translate({ q: "<b>Olá</b>", source: "pt", target: "en", format: "html" });
const candidates = await lt.detect("Bonjour tout le monde");
const languages = await lt.languages();
const { translatedFileUrl } = await lt.translateFile({ file: new Blob([data]), filename: "report.docx", target: "pt" });
const translated = await lt.downloadFile(translatedFileUrl); // { data, filename, contentType }A non-2xx answer throws LibreTranslateApiError (status, method, path, body), with the API key masked.
MCP server
libretranslate-mcp # stdio, what an MCP client launches
libretranslate-mcp --http # http://127.0.0.1:3768/mcp
libretranslate mcp start # the same, in the background; stop / status / boot enableTool | What for |
| One text or a list, with |
| A local document, saved beside it as |
| The candidate languages of a text |
| The language codes, or one source's targets |
| Health, key required, character limit, file formats |
| Sends a better translation back, when asked |
| The raw API (writes need |
CLI
libretranslate translate --q "Olá, mundo!" --target en
libretranslate translate-file --path report.docx --target pt
libretranslate languages --source pt
libretranslate --url http://127.0.0.1:3768/mcp status # through a running serverSettings resolve flag > environment (LIBRETRANSLATE_URL, LIBRETRANSLATE_API_KEY, PORT) > the saved .env
(libretranslate mcp config) > defaults.
Windows
Native Windows 10/11 (PowerShell, cmd) and WSL. libretranslate mcp boot enable registers a logon task, and from
WSL libretranslate mcp install also reaches the clients installed on the Windows side. See
Windows and WSL.
Development
pnpm install
pnpm codegen # spec/openapi.yml → src/generated/ (orval) + the MCP catalog
pnpm test:unit # a fake LibreTranslate on node:http, no network
pnpm test:live # against a real instance (.env.test, see env.example)
pnpm docs:dev # the docs siteSee CONTRIBUTING.md.
License
MIT © Alan Reis Anjos
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
AI agent tools: translation (95+ langs), crypto research, compliance, summarization.
Agentic localization for documents and media, with quality checks and optional human review.
Localize apps from your AI agent: create projects, add languages, import files, add strings, export.
LibreTranslate MCP — open-source machine translation (BYO endpoint)
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceWraps LibreTranslate API to enable translation capabilities for AI agents via MCP.288 npmMIT
- FlicenseNot gradedqualityDmaintenanceProvides translation and language detection tools to AI agents, processing text, audio, and Google Meet recordings with emotional voice style preservation via Google's Gemini Live API.1-
- AlicenseNot gradedqualityCmaintenanceProvides open-source machine translation capabilities, including language detection and listing supported languages, via a customizable LibreTranslate endpoint.83 npm2MIT
- AlicenseAqualityBmaintenanceEnables translation, language detection, and language list retrieval via MCP tools, acting as a thin wrapper over a self-hosted LibreTranslate instance.3MIT