L10n.dev - AI Localization Agent

io.github.l10n-dev由 GitHub 帳號 l10n-dev 發布v1.2.0更新於 Oct 24, 2026

MCP Server that turns your AI agent into a localization expert with token-efficient i18n translation

已驗證STDIO僅桌面效率與工作流開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器,將 AI 助理連接到 l10n.dev 在地化服務,在保留格式與佔位符的前提下翻譯 i18n 檔案。

可以做什麼
將 i18n 來源檔案翻譯成一個或多個目標語言,並依資料夾或檔名規則辨識專案結構、來源語言、目標語言與目標檔案路徑,可用語言代碼正規表達式處理自訂命名。依語言對管理語言風格指示:列出、建立、更新與刪除語氣、風格或品牌用語規則。管理詞彙表及其條目:列出、檢視、建立、更新、刪除,以及新增或移除詞條。查詢帳戶字元餘額,並在本機儲存 API 金鑰或檢查其設定狀態。兩個提示可引導專案設定,以及透過 GitHub Actions 或 npm 指令碼設定自動化翻譯。
適用情境
適合需要把 JSON、ARB、YAML、PO、XLIFF 或 Markdown 等應用程式在地化檔案翻譯成多種語言、維持術語一致並保留佔位符,又不想把大型檔案貼進對話的情境。也適合建立定期或 CI 驅動的翻譯流程。
執行需求
透過 npx(Node.js)以 stdio 在本機執行。需要 l10n.dev 帳戶與 API 金鑰,可透過 L10N_API_KEY 環境變數提供,或用 set-api-key 工具儲存在本機。需要連線至 l10n.dev 服務的網路存取。
安裝前請注意
翻譯依字元計費:每月有免費額度,超出後依用量付費,大量翻譯前應先查看餘額。API 金鑰屬於機密,本機儲存會寫入電腦上的設定檔。相關工具可建立、更新並永久刪除指示與詞彙表。來源字串與雜湊會傳送到 l10n.dev 伺服器處理。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 L10n.dev - AI Localization Agent,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

ai-l10n-mcp

[npm version] [License: MIT]

MCP server that gives AI agents access to l10n.dev — a professional localization service purpose-built for software i18n files.

When an AI agent needs to translate your app, the naive approach is to paste file contents into the chat. That breaks down fast: localization files are large, formats are strict, placeholders must survive verbatim, glossaries drift across sessions, and the agent has no memory between runs. This MCP replaces that fragile workflow with a dedicated localization engine that the agent calls as a tool — getting professional-grade output without wasting context window on raw file contents.

Think of it as giving your AI agent a professional localization co-pilot: the agent handles intent and orchestration; l10n.dev handles the actual translation with accuracy, consistency, and format guarantees.


Why use this instead of asking your AI agent directly?

AI agent aloneai-l10n-mcp
165 language supportVaries, often limited✅ Full coverage
Large file handlingTruncates or skips✅ Handled entirely server-side
Format preservationFragile — breaks placeholders, keys, structure✅ Guaranteed — source format validated after translation
Glossary consistencyLost between sessions and file chunks✅ Persisted glossary applied across all files and chunks
Post-editing required?Usually yes✅ No — output is production-ready
Token costHigh — raw file in context✅ Low — only metadata returned
Incremental updatesFull reading and retranslation every time✅ Only new/changed strings

Features

  • 165 Languages — translate to the full range of world languages in one call
  • Format guaranteed — JSON, JSONC, Flutter ARB, YAML, PO (gettext), XLIFF, MD and all text-based i18n formats; placeholders, keys, and structure preserved and validated after translation
  • Auto-detect target languages from project structure
  • Persistent glossary — generate a glossary from your content, save it, and have it applied automatically across every subsequent file and chunk for consistent terminology
  • Linguistic instructions — save style/tone rules per language pair (e.g. "Use formal tone")
  • Incremental translation — hash-based change detection skips strings already translated, saving quota and protecting existing translations
  • Proactive quality control — checks instructions and glossary for each language pair before translating, not after

Connect Claude Desktop, Cursor, Windsurf, GitHub Copilot, OpenAI Codex, or any MCP-compatible agent directly to l10n.dev's translation engine.


Installation & Configuration

Getting an API key

Create a free account and get your API key at https://l10n.dev/ws/api-keys

Tip: Instead of setting L10N_API_KEY in each config, you can ask the AI to store your key with l10n_set_api_key. The key is saved to ~/.ai-l10n/config.json and used automatically.

Claude Desktop

In Claude Desktop, open Settings > Developer > Edit Config. Claude Desktop will open the correct MCP config file for your install. On macOS this is typically ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows, the backing path can vary by installation, so prefer Edit Config instead of navigating manually. Add:

json
{
  "mcpServers": {
    "l10n": {
      "command": "npx",
      "args": ["-y", "ai-l10n-mcp"],
      "env": {
        "L10N_API_KEY": "your-api-key-here"
      }
    }
  }
}

Cursor

Open Customize in Cursor to add and manage MCP servers. For a file-based setup, create one of these configs:

  • ~/.cursor/mcp.json for a user-wide setup
  • .cursor/mcp.json in your project for a workspace-specific setup

Add:

json
{
  "mcpServers": {
    "l10n": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "ai-l10n-mcp"],
      "env": {
        "L10N_API_KEY": "your-api-key-here"
      }
    }
  }
}

Windsurf

In Windsurf, open the MCPs panel in Cascade, or go to Devin Settings > Cascade > MCP Servers. If you need to add it manually, edit ~/.codeium/windsurf/mcp_config.json and add:

json
{
  "mcpServers": {
    "l10n": {
      "command": "npx",
      "args": ["-y", "ai-l10n-mcp"],
      "env": {
        "L10N_API_KEY": "your-api-key-here"
      }
    }
  }
}

GitHub Copilot (VS Code)

Open the Command Palette and select MCP: Open User Configuration. Alternatively, create a .vscode/mcp.json file in your workspace or user settings. Add:

json
{
  "servers": {
    "l10n": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "ai-l10n-mcp"],
      "env": {
        "L10N_API_KEY": "your-api-key-here"
      }
    }
  }
}

OpenAI Codex (CLI and IDE)

Add to ~/.codex/config.toml for a user-wide setup, or .codex/config.toml in a trusted project:

toml
[mcp_servers.l10n]
command = "npx"
args = ["-y", "ai-l10n-mcp"]

[mcp_servers.l10n.env]
L10N_API_KEY = "your-api-key-here"

You can also add it from the terminal:

bash
codex mcp add l10n --env L10N_API_KEY=your-api-key-here -- npx -y ai-l10n-mcp

Claude Code (CLI and VS Code extension)

Add the server from the terminal:

bash
claude mcp add --env L10N_API_KEY=your-api-key-here --transport stdio l10n -- npx -y ai-l10n-mcp

For a shared project setup, Claude Code can also store MCP servers in a .mcp.json file at your project root.


Available Tools

Translation

ToolDescription
l10n_translate_fileTranslate an i18n source file to one or more target languages
l10n_detect_project_structureScan a source file to detect structure type, source language, target languages, and target file paths

Both tools detect language codes in language-code folders (locales/en/common.json, reported as folder-based) and in file names (file-based) — whether the name is the code itself (locales/en.json) or holds it alongside other parts (app_en.arb, locales/emails.en.json, locales/en-US.common.json, messages_en_US.properties). For naming conventions that are not recognized, pass languageCodeRegex, a regex containing a (?<language>...) group, e.g. ^emails\.(?<language>[\w-]+)\.json$. The text around the group is reused for target files, so emails.en.json produces emails.ru-RU.json.

Linguistic Instructions

ToolDescription
l10n_list_instructionsList all saved linguistic instructions (tone, style, brand voice)
l10n_create_instructionCreate a new instruction for a language pair
l10n_update_instructionUpdate an existing instruction
l10n_delete_instructionDelete an instruction

Glossary

ToolDescription
l10n_list_glossariesList all saved glossaries
l10n_get_glossaryGet full details and entries of a specific glossary
l10n_create_glossaryCreate a new empty glossary
l10n_update_glossaryUpdate glossary name or active status
l10n_delete_glossaryPermanently delete a glossary
l10n_add_glossary_entryAdd a term mapping to a glossary
l10n_delete_glossary_entryRemove a term mapping from a glossary

Account

ToolDescription
l10n_get_balanceCheck remaining character balance
l10n_set_api_keyStore an API key locally for automatic use
l10n_get_api_key_statusCheck whether an API key is configured

Available Prompts

l10n_project_setup

Guides through checking and configuring linguistic instructions and glossaries for optimal translation quality. Invoke it at the start of a new project or when reviewing l10n.dev settings.

Arguments:

  • sourceLanguage — source language code (default: en)
  • targetLanguages — comma-separated target language codes (e.g. es,fr,de)

l10n_setup_automation

Scans the project for i18n source files (using l10n_detect_project_structure), checks linguistic instructions, glossary, and balance, then interactively sets up fully automated translation via GitHub Actions or npm scripts.

For GitHub Actions, guides through four trigger options:

  • A) On every push to main — translate and commit back directly
  • B) On pull requests — translate and open a PR for review
  • C) On a schedule — translate nightly or on a cron
  • D) Manual trigger only — workflow_dispatch

Writes ai-l10n.config.json and .github/workflows/translate.yml (or updates package.json scripts), then tells you where to add the API key and what happens on the next trigger.

Arguments:

  • sourceLanguage — source language code (default: en)
  • targetLanguages — comma-separated target language codes (e.g. es,fr,de)

Example Workflow

User: "Translate my app to Spanish and French"

Claude (with this MCP server) will:

  1. Call l10n_list_instructions — finds no instruction for es/fr language pairs
  2. Ask: "No instruction found for Spanish/French — would you like to set a tone/style rule before translating? (e.g. formal, casual, keep brand terms untranslated)"
  3. User says: "Tone should be informal, it's for a food app in Latin America"
  4. Call l10n_create_instruction with the style rule
  5. Call l10n_list_glossaries — finds no active glossary for es/fr
  6. Ask: "No glossary found for Spanish/French — enable glossary generation for this run? It saves key terms for consistent future translations."
  7. User says: "Yes"
  8. Detect that es.json and fr.json already exist — ask: "Target files already exist — enable incremental mode to skip unchanged strings and save quota?"
  9. User says: "Yes"
  10. Call l10n_translate_file with sourceFile, targetLanguages: ["es", "fr"], instruction, generateGlossary: true, translateOnlyNewStrings: true
  11. Report results

Incremental Translation

For JSON-based formats, enable translateOnlyNewStrings: true to skip strings that are already translated. A hash of each source string (not content itself) is stored on the l10n.dev server for change detection — only added or changed strings are translating, saving your character quota.

Note: First translation it translates only added strings, because hash table is empty to detect changed strings.


Automation: CLI and GitHub Actions

For CI/CD automation and command-line usage, see:

  • ai-l10n CLI — translate files from the terminal or CI pipelines
  • GitHub Action — auto-translate on push, PR, or manual trigger

Pricing

  • Free tier — 10,000 characters free every month, no credit card required.
  • Pay-as-you-go — Affordable character-based pricing with no subscription required.
  • Current packages — Visit l10n.dev/#pricing for up-to-date pricing.

Privacy & Security

  • No data retention — Source text and translations are not stored on l10n.dev servers beyond the time needed to process the request.
  • Encrypted communication — All API calls use HTTPS.
  • Privacy first — Built by developers for developers, with privacy, reliability, and quality as core priorities.

Support

📧 Email[email protected]
🐛 IssuesGitHub Issues
📚 API Docsapi.l10n.dev/doc
🌐 Websitel10n.dev

License

MIT

來源:mcp/README.md,提交 ad14f7e

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.2.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分