@babelize/mcp

中文文档
1.3.14发布于 2026/11/02Apache-2.0ES Module近 30 天下载 3371

MCP server for Babelize: let AI coding agents analyze, translate, check and review your app with the local Babelize engine. mcprush.com-363ba77d1f63a2f91edcef68

原始使用文档
文档目录25 节
  1. Local workflow
  2. Translation keys
  3. Setup
  4. Claude Code
  5. Cursor
  6. Codex
  7. Claude Desktop, opencode and other clients
  8. Example prompts
  9. Cloud project management tools
  10. Scanning (low-level, no API key required)
  11. Projects
  12. Translation Runs
  13. Languages
  14. Analysis
  15. Translation Quality
  16. Team & Deploy
  17. Account
  18. Configuration
  19. Options
  20. Cloud workflow examples
  21. Translate a GitHub project in one command
  22. Translate local code without GitHub
  23. Check translation quality
  24. Audit i18n readiness
  25. Links

@babelize/mcp

Babelize MCP server Babelize MCP on mcprush

MCP (Model Context Protocol) server for Babelize. It lets AI coding agents (Claude Code, Cursor, Codex, or any MCP client) make your app global-ready from the editor.

The four local workflow tools run the same Babelize engine as npx babelize translate, on your machine, against your working tree. You don't need a Babelize account: bring your own LLM key, or use a Babelize API key for hosted translation. The older cloud project management tools are still available for projects on babelize.co.

Local workflow

ToolWhat it doesNeeds
babelize_analyzeLocalization readiness report: framework and support level, i18n setup, hardcoded strings (file:line), sentences kept whole as one ICU message, strings that can't be wired and why, hardcoded dates/currencies/plurals, locale coverage, unused keys, next steps. Runs in dry-run mode on a temp copy.nothing
babelize_translateExtracts strings, wires them to next-intl / react-i18next (adds config and dependencies when missing), translates into the target locales and writes the result into the working tree. Incremental via a lockfile, with progress notifications.a key in the server env and a clean git tree
babelize_checkQA of the locale files: missing, stale or empty keys; untranslated values; lost or invented placeholders and tags; invalid ICU; wrong plural forms for the locale; glossary violations.nothing
babelize_reviewThe same QA, limited to the locale entries changed in the git diff (vs HEAD or a base ref), plus source strings whose translations weren't updated.a git repo

The loop an agent follows is analyze → translate → check (or review) → fix → repeat. React, Next.js, Django and static HTML are supported; Vue and React Native (Expo and bare) are in beta.

Responses are compact: a short summary plus one line of JSON with capped lists (limit, default 15) and paths relative to the project. path arguments must stay inside the workspace. The workspace is --workspace / BABELIZE_WORKSPACE if set, otherwise the folders your client exposes as MCP roots, otherwise the server's working directory if it is a project (a git repo or a package.json). / and your home directory are never used. babelize_translate runs one at a time per project.

Translation keys

babelize_translate reads keys from the MCP server's environment. Keys are never tool arguments, and the server never prints them.

Env varProvider
ANTHROPIC_API_KEYAnthropic (your key)
OPENAI_API_KEYOpenAI (your key)
GEMINI_API_KEYGoogle Gemini (your key)
GROQ_API_KEYGroq (your key)
OPENROUTER_API_KEYOpenRouter (your key)
BABELIZE_API_KEYBabelize-hosted translation (free tier; create a key). --api-key or apiKey in .babelize/config.json work too: the same key the cloud tools use

The first BYOK key found wins, then the Babelize key. An agent can pick one explicitly with provider (and model for BYOK).

Setup

Claude Code

claude mcp add babelize -e ANTHROPIC_API_KEY=sk-ant-... -- npx -y @babelize/mcp

Or share it with your team through .mcp.json in the repo. ${VAR} is expanded from your shell, so no key is committed:

{
  "mcpServers": {
    "babelize": {
      "command": "npx",
      "args": ["-y", "@babelize/mcp"],
      "env": { "ANTHROPIC_API_KEY": "${ANTHROPIC_API_KEY}" }
    }
  }
}

Cursor

.cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "babelize": {
      "command": "npx",
      "args": ["-y", "@babelize/mcp", "--workspace", "${workspaceFolder}"],
      "env": { "OPENAI_API_KEY": "${env:OPENAI_API_KEY}" }
    }
  }
}

Codex

~/.codex/config.toml:

[mcp_servers.babelize]
command = "npx"
args = ["-y", "@babelize/mcp"]
env = { ANTHROPIC_API_KEY = "sk-ant-..." }

If the local tools report the wrong folder, add "--workspace", "/path/to/your/app" to args.

Claude Desktop, opencode and other clients

Run npx -y @babelize/mcp as a stdio server and set one of the key env vars above. If the client doesn't start the server in your project folder (Claude Desktop doesn't), pass --workspace /path/to/your/app.

{
  "mcpServers": {
    "babelize": {
      "command": "npx",
      "args": ["-y", "@babelize/mcp", "--workspace", "/path/to/your/app"],
      "env": { "GEMINI_API_KEY": "..." }
    }
  }
}

Example prompts

Make this app global-ready in German and Japanese.

The agent runs babelize_analyze → babelize_translate {to: ["de","ja"]} → babelize_check, then reports what changed. The make-global-ready MCP prompt contains the same instructions.

What would it take to localize this app? Don't change anything.

babelize_analyze reports what translation would extract and wire up, and what it can't. To preview the actual diff, use babelize_translate with dryRun: true (this one does call the translator).

I edited the French strings. Anything broken before I commit?

babelize_review checks only the changed entries for lost placeholders, ICU and plural errors, untranslated text, and stale translations.

Add Korean too.

babelize_translate {to: ["ko"]} keeps de/ja, and the lockfile means only Korean is translated.

Cloud project management tools

These tools manage projects on babelize.co and need a Babelize API key (BABELIZE_API_KEY, --api-key or .babelize/config.json). The two scan tools are low-level helpers that need no key.

Scanning (low-level, no API key required)

ToolDescription
babelize_scanScan a local directory for hardcoded strings
babelize_scan_stringsExtract translatable strings from a code snippet

Scanned strings are flagged with is_icu: true when they contain ICU MessageFormat syntax ({count, plural, ...}, select, selectordinal).

Projects

ToolDescription
babelize_project_listList all translation projects
babelize_project_getGet details of a specific project
babelize_project_createCreate a new translation project from a GitHub repository
babelize_project_language_addAdd a language to a project
babelize_project_language_removeRemove a language from a project
babelize_project_syncTrigger repository sync
babelize_project_downloadDownload translated project files as ZIP

Translation Runs

ToolDescription
babelize_runStart a translation pipeline run
babelize_run_and_waitStart a translation run and wait for it to finish
babelize_statusCheck status of a translation run
babelize_babel_listList translation runs (babels)
babelize_babel_getGet detailed babel run info and logs

Languages

ToolDescription
babelize_language_listList all supported languages
babelize_language_codesLook up language code mappings (ISO ↔ FLORES-200)

Analysis

ToolDescription
babelize_engine_analyzeAnalyze source code for i18n readiness and framework detection — accepts an inline code snippet (no repo clone needed)

Translation Quality

ToolDescription
babelize_tm_getList translation memory entries (owner-scoped — see note below)
babelize_tm_setAdd a translation memory entry
babelize_tm_exportExport translation memory as TMX
babelize_glossary_getList glossary entries for a project
babelize_glossary_setAdd or update a glossary entry
babelize_glossary_deleteDelete a glossary entry
babelize_glossary_importBulk import glossary entries from CSV
babelize_glossary_exportExport glossary entries as CSV

Translation memory is owner-scoped. The babelize_tm_* tools take a project_id to select the API route, but owners read and write their entire memory, which is shared across all projects they own (members see only entries from projects they belong to).

Team & Deploy

ToolDescription
babelize_member_listList project members
babelize_invitation_sendSend a team invitation
babelize_pr_raiseCreate a GitHub Pull Request with translations (adds the run to the open PR when there is one; title, base_branch, force_new optional)
babelize_pr_updatePush the latest run to the project's open Pull Request

Account

ToolDescription
babelize_meGet current user profile and credits
babelize_provider_tokens_listList connected BYOK translation provider tokens

Configuration

The cloud API settings are resolved in this order:

  1. CLI args: --api-key, --api-url
  2. Environment variables: BABELIZE_API_KEY, BABELIZE_API_URL
  3. Local config file: .babelize/config.json in the current working directory

The local tools also read .babelize/config.json in the project for sourceLocale and an optional glossary, which babelize_translate applies and babelize_check and babelize_review check:

{
  "sourceLocale": "en",
  "glossary": {
    "neverTranslate": ["Babelize"],
    "alwaysTranslateAs": [{ "term": "workspace", "translations": { "de": "Arbeitsbereich" } }]
  }
}

Options

Option / Env VarDescriptionDefault
--api-key / BABELIZE_API_KEYYour Babelize API key—
--api-url / BABELIZE_API_URLAPI base URL (the client appends /api itself)https://api.babelize.co
--workspace / BABELIZE_WORKSPACEFolder the local tools may work inclient roots, else the working directory

Set BABELIZE_API_URL to the origin only — do not include the /api suffix (e.g. http://localhost:3001), otherwise requests go to /api/api.

Cloud workflow examples

Translate a GitHub project in one command

Ask your AI agent:

"Translate my-project to French and Spanish."

The agent will:

  1. babelize_project_list — find your project
  2. babelize_project_language_add — add French + Spanish
  3. babelize_run_and_wait — start + wait for completion
  4. babelize_project_download — download the translated ZIP

Translate local code without GitHub

"Scan my local project and translate it to German."

  1. babelize_scan — find all hardcoded strings (no API key needed)
  2. babelize_translate {to: ["de"]} — translate on your machine and write the result into the working tree (no cloud project needed)

For a cloud project without GitHub, run babelize init --source zip in the project directory. It uploads the project as a ZIP. babelize_project_create creates GitHub projects only.

Check translation quality

"Review the translation quality for my project."

  1. babelize_tm_get — check translation memory entries
  2. babelize_glossary_get — review glossary for consistent terminology
  3. babelize_babel_get — inspect detailed run logs
  4. babelize_glossary_set — add missing glossary entries for consistent translations

Audit i18n readiness

"Scan my codebase for i18n issues."

Use babelize_analyze (local, no key). It covers what babelize_scan and babelize_engine_analyze do, and runs the real extraction and injection in dry-run mode.

版本与发布记录

@babelize/mcp 共发布 36 个版本,首次发布于 2026/07/02;过去 12 个月发布了 36 个版本。

版本发布日期距今
1.3.14latest2026/11/025 天前
1.3.132026/11/016 天前
1.3.122026/11/016 天前
1.3.112026/11/016 天前
1.3.102026/11/016 天前
1.3.92026/11/016 天前

关于 @babelize/mcp 的常见问题

@babelize/mcp 是什么?

MCP server for Babelize: let AI coding agents analyze, translate, check and review your app with the local Babelize engine. mcprush.com-363ba77d1f63a2f91edcef68

如何安装 @babelize/mcp?

在项目目录运行 npm install @babelize/mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 babelize-mcp,可以用 npx babelize-mcp 直接运行。

@babelize/mcp 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/babelize__mcp 是否存在。

@babelize/mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@babelize/mcp 可以商用吗?

@babelize/mcp 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@babelize/mcp 的下载量有多少?

根据 npm 官方下载统计,@babelize/mcp 在 2026/10/08 – 2026/11/06 这 30 天内被下载 3,371 次,日均约 112 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@babelize/mcp 还在维护吗?

最新版本 1.3.14 发布于 2026/11/02(5 天前);至今共发布 36 个版本,其中过去 12 个月发布了 36 个;首次发布于 2026/07/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。