@babelize/mcp
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
| Tool | What it does | Needs |
|---|---|---|
babelize_analyze | Localization 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_translate | Extracts 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_check | QA 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_review | The 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 var | Provider |
|---|---|
ANTHROPIC_API_KEY | Anthropic (your key) |
OPENAI_API_KEY | OpenAI (your key) |
GEMINI_API_KEY | Google Gemini (your key) |
GROQ_API_KEY | Groq (your key) |
OPENROUTER_API_KEY | OpenRouter (your key) |
BABELIZE_API_KEY | Babelize-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)
| Tool | Description |
|---|---|
babelize_scan | Scan a local directory for hardcoded strings |
babelize_scan_strings | Extract 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
| Tool | Description |
|---|---|
babelize_project_list | List all translation projects |
babelize_project_get | Get details of a specific project |
babelize_project_create | Create a new translation project from a GitHub repository |
babelize_project_language_add | Add a language to a project |
babelize_project_language_remove | Remove a language from a project |
babelize_project_sync | Trigger repository sync |
babelize_project_download | Download translated project files as ZIP |
Translation Runs
| Tool | Description |
|---|---|
babelize_run | Start a translation pipeline run |
babelize_run_and_wait | Start a translation run and wait for it to finish |
babelize_status | Check status of a translation run |
babelize_babel_list | List translation runs (babels) |
babelize_babel_get | Get detailed babel run info and logs |
Languages
| Tool | Description |
|---|---|
babelize_language_list | List all supported languages |
babelize_language_codes | Look up language code mappings (ISO ↔ FLORES-200) |
Analysis
| Tool | Description |
|---|---|
babelize_engine_analyze | Analyze source code for i18n readiness and framework detection — accepts an inline code snippet (no repo clone needed) |
Translation Quality
| Tool | Description |
|---|---|
babelize_tm_get | List translation memory entries (owner-scoped — see note below) |
babelize_tm_set | Add a translation memory entry |
babelize_tm_export | Export translation memory as TMX |
babelize_glossary_get | List glossary entries for a project |
babelize_glossary_set | Add or update a glossary entry |
babelize_glossary_delete | Delete a glossary entry |
babelize_glossary_import | Bulk import glossary entries from CSV |
babelize_glossary_export | Export glossary entries as CSV |
Translation memory is owner-scoped. The
babelize_tm_*tools take aproject_idto 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
| Tool | Description |
|---|---|
babelize_member_list | List project members |
babelize_invitation_send | Send a team invitation |
babelize_pr_raise | Create 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_update | Push the latest run to the project's open Pull Request |
Account
| Tool | Description |
|---|---|
babelize_me | Get current user profile and credits |
babelize_provider_tokens_list | List connected BYOK translation provider tokens |
Configuration
The cloud API settings are resolved in this order:
- CLI args:
--api-key,--api-url - Environment variables:
BABELIZE_API_KEY,BABELIZE_API_URL - Local config file:
.babelize/config.jsonin 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 Var | Description | Default |
|---|---|---|
--api-key / BABELIZE_API_KEY | Your Babelize API key | — |
--api-url / BABELIZE_API_URL | API base URL (the client appends /api itself) | https://api.babelize.co |
--workspace / BABELIZE_WORKSPACE | Folder the local tools may work in | client roots, else the working directory |
Set
BABELIZE_API_URLto the origin only — do not include the/apisuffix (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:
babelize_project_list— find your projectbabelize_project_language_add— add French + Spanishbabelize_run_and_wait— start + wait for completionbabelize_project_download— download the translated ZIP
Translate local code without GitHub
"Scan my local project and translate it to German."
babelize_scan— find all hardcoded strings (no API key needed)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."
babelize_tm_get— check translation memory entriesbabelize_glossary_get— review glossary for consistent terminologybabelize_babel_get— inspect detailed run logsbabelize_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.