MCP Server
Ce contenu n’est pas encore disponible dans votre langue.
polyglot-gpu includes a built-in MCP (Model Context Protocol) server powered by FastMCP. This lets Claude Code, Claude Desktop, and other MCP clients translate text directly.
Setup for Claude Code
Section titled “Setup for Claude Code”Add to your MCP config:
{ "mcpServers": { "polyglot-gpu": { "command": "polyglot-gpu" } }}Or run the server directly:
python -m pypolyglotThe server uses stdio transport by default.
Available tools
Section titled “Available tools”| Tool | Description |
|---|---|
translate_text | Translate text between any of 57 languages |
translate_md | Translate markdown while preserving structure |
translate_all_langs | Translate into multiple languages at once |
list_languages | List all 57 supported languages with codes |
check_status | Check Ollama availability and installed models |
translate_text
Section titled “translate_text”Translates plain text between two languages.
Parameters:
text(string, required) — Text to translatefrom_lang(string, required) — Source language code (e.g., “en”)to_lang(string, required) — Target language code (e.g., “ja”)model(string, optional) — Ollama model overrideglossary(array, optional) — Custom glossary entries
translate_md
Section titled “translate_md”Translates markdown content while preserving code blocks, tables, HTML, and structure.
Parameters:
markdown(string, required) — Markdown content to translatefrom_lang(string, required) — Source language codeto_lang(string, required) — Target language codemodel(string, optional) — Ollama model override
translate_all_langs
Section titled “translate_all_langs”Translates markdown into multiple languages concurrently. Injects language nav bars into each translation.
Parameters:
markdown(string, required) — Markdown contentfrom_lang(string, optional, default: “en”) — Source languagelanguages(array, optional) — Target language codes (default: 7 languages)model(string, optional) — Ollama model overrideconcurrency(number, optional, default: 2) — Max concurrent translations (1-3)
list_languages
Section titled “list_languages”Returns all 57 supported language codes and names. No parameters.
check_status
Section titled “check_status”Reports Ollama availability, installed TranslateGemma models, and GPU readiness. No parameters.