MCP Server
LibreTranslate can give machine translation capabilities to AI agents that support the MCP protocol.
Configuration
Section titled “Configuration”Add this to your client’s configuration:
OpenCode
Section titled “OpenCode”{ "mcp": { "LibreTranslate": { "type": "local", "command": ["npx", "-y", "@libretranslate/mcp"], "environment": { "LIBRETRANSLATE_API_URL": "https://libretranslate.com", "LIBRETRANSLATE_API_KEY": "your-api-key" } } }}Claude
Section titled “Claude”{ "mcpServers": { "libretranslate": { "command": "npx", "args": ["-y", "@libretranslate/mcp"], "env": { "LIBRETRANSLATE_API_URL": "https://libretranslate.com", "LIBRETRANSLATE_API_KEY": "your-api-key" } } }}| Variable | Description |
|---|---|
LIBRETRANSLATE_API_URL | URL of the LibreTranslate API (default: https://libretranslate.com) |
LIBRETRANSLATE_API_KEY | API key for the LibreTranslate service (required for libretranslate.com) |
Available Tools
Section titled “Available Tools”detect
Section titled “detect”Detect the language of a given text.
translate
Section titled “translate”Translate text from one language to another.
languages
Section titled “languages”List all supported languages for translation.
See LibreTranslate-MCP for implementation details.