mcp-locator
Provides tools for managing locale JSON translation files in i18next projects, enabling AI agents to read, write, search, and batch-edit translations without loading the entire catalog into context.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-locatorget the value of 'welcome.message' in English locale"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Point the server at one or more JSON files with --locale-<CODE>=<PATH> and it dynamically creates a set of tools for every locale. The AI sees set_en, get_fr, tree_de, search_uk, etc. and knows immediately which language each tool targets.
💸 Why — token savings on large catalogs
The usual way an agent edits translations is to read the entire locale file into context, edit, and write it back. That cost scales with the size of your catalog and repeats on every turn.
mcp-locator instead exposes targeted tools — the agent fetches only the keys it needs (get, search, diff) and writes only what changed (set_batch). The full catalog never enters the context window.
Rough estimate (≈ 18–22 tokens per "key.path": "value" entry, measured on typical nested JSON):
Catalog size | Locales | Paste whole files into context |
| Saved |
500 keys | 2 | ~20k tokens | ~1.5k tokens | ~92% |
1,500 keys | 3 | ~90k tokens | ~2k tokens | ~97% |
4,000 keys | 4 | ~320k tokens | ~3k tokens | ~99% |
Numbers are estimates for illustration — actual usage depends on key-path length, value length, and how many keys a task touches. The point holds: cost grows with what you change, not with how big the catalog is.
Related MCP server: i18n-mcp
📦 Install
Global (use as a CLI):
npm install -g mcp-locator
mcp-locator --locale-en=./locales/en.json --locale-fr=./locales/fr.jsonWithout installing (npx):
npx mcp-locator --locale-en=./locales/en.json --locale-fr=./locales/fr.jsonFrom source:
git clone https://github.com/Tankonyako/mcp-locator.git
cd mcp-locator
npm install
node bin/mcp-locator.js --locale-en=./locales/en.json🤖 Agent / MCP client setup
Most agents just need a command + args pointing at mcp-locator. Use absolute paths in global configs so the server finds files regardless of the working directory.
Claude Code
One-liner:
claude mcp add locator -- npx mcp-locator \
--locale-en=./locales/en.json --locale-uk=./locales/uk.jsonOr commit a project-scoped .mcp.json to the repo root:
{
"mcpServers": {
"locator": {
"command": "npx",
"args": [
"mcp-locator",
"--locale-en=./locales/en.json",
"--locale-uk=./locales/uk.json",
"--mode=pretty"
]
}
}
}Gemini CLI
Add to ~/.gemini/settings.json (or a project .gemini/settings.json):
{
"mcpServers": {
"locator": {
"command": "npx",
"args": [
"mcp-locator",
"--locale-en=./locales/en.json",
"--locale-uk=./locales/uk.json"
]
}
}
}Codex CLI
Add to ~/.codex/config.toml:
[mcp_servers.locator]
command = "npx"
args = [
"mcp-locator",
"--locale-en=./locales/en.json",
"--locale-uk=./locales/uk.json",
]Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"locator": {
"command": "npx",
"args": [
"mcp-locator",
"--locale-en=/absolute/path/to/locales/en.json",
"--locale-fr=/absolute/path/to/locales/fr.json"
]
}
}
}🧭 Practical workflow: English as the source of truth
A common setup is "always write in English while you build, then translate the missing locales later in one pass." Drop an instruction block like this into your agent's AGENTS.md / CLAUDE.md / system prompt:
You manage translations through the `locator` MCP server. Rules:
1. ALWAYS write user-facing strings in English (`en`) — and ONLY `en`.
English is the single source of truth. Use set_en / set_batch_en.
2. Do NOT translate into other locales while building a feature. Leave the
other locales alone — they get filled in later, on demand (see below).
3. Never hand-edit the locale JSON files. Always go through the tools.
4. Keys are namespaced by domain: `OrderTopUp.minDepositTitle`, not full
sentences. Search before inventing — reuse beats duplicate (search_en).Then, once the English copy is finished, you ask for translations as a separate step. A natural-language command like this scans for everything missing and fills it in across every locale and phrase:
"Sync translations: run
diffto find keys missing from each locale, read the English source for each withget_en, translate them, and write them back withset_batch_<code>."
Under the hood the agent runs:
diff→ for each non-base locale, the list of keys present inenbut missing.get_batch_en→ the English source strings for those keys (one call).translate them, then
set_batch_<code>→ write all translations per locale in one call.
Because only the missing keys move through the context, syncing a 2,000-key catalog costs a few thousand tokens, not a few hundred thousand.
🗂️ Works with any locale JSON — nested or flat
mcp-locator reads any JSON object, whether your keys are nested objects or a flat map. The on-disk shape is controlled by --mode; tool inputs always use the same dotted key paths (user.profile.name).
Nested keys (--mode=pretty, the default):
{
"app": { "title": "My App" },
"user": {
"email": "Email address",
"profile": { "name": "Name", "age": "Age" }
}
}Flat keys (--mode=inline):
{
"app.title": "My App",
"user.email": "Email address",
"user.profile.name": "Name",
"user.profile.age": "Age"
}Both files expose the exact same key paths to the AI. Pick whichever your project already uses — point the server at it and go.
✨ Ideal for next-intl & one-file-per-locale projects
mcp-locator fits perfectly with next-intl, i18next, react-i18next, vue-i18n, and any setup where each locale lives in a single JSON file (messages/en.json, messages/uk.json, …). That's the canonical layout these libraries use, and it's exactly what --locale-<CODE>=<PATH> maps onto:
mcp-locator \
--locale-en=./messages/en.json \
--locale-uk=./messages/uk.json🛣️ Roadmap: today each locale is one JSON file (one file = one locale's full catalog). Pointing a locale at a folder of split message files (e.g.
messages/en/*.jsonnamespaced per file) is planned — for now, consolidate to a single file per locale.
🚩 CLI flags
Flag | Required | Default | Description |
| Yes (at least one) | — | Locale code → JSON file path. Repeat for multiple locales. |
| No |
| JSON storage format (see above). |
| No |
| Key delimiter used in tool inputs and |
| No | — | Print version and exit. |
| No | — | Print help and exit. |
# Two locales, default pretty mode with dot splitter
mcp-locator --locale-en=./en.json --locale-fr=./fr.json
# Three locales, inline mode, double-underscore splitter
mcp-locator --locale-en=./en.json --locale-fr=./fr.json --locale-de=./de.json \
--mode=inline --splitter=__🛠️ Tools (per locale)
For each locale <CODE>, the server registers these tools:
set_<CODE>
Set (create or overwrite) a translation value. Writes to disk atomically.
Input | Type | Description |
| string | Full key path, e.g. |
| string | Translation string in that language |
{ "ok": true, "locale": "en", "key": "user.profile.name", "value": "Alice" }get_<CODE>
Get a translation by key. Throws if the key does not exist.
{ "locale": "en", "key": "user.profile.name", "value": "Alice" }has_<CODE>
Check whether a key exists.
{ "locale": "en", "key": "user.profile.name", "exists": true }list_<CODE>
Return every key in the locale, sorted alphabetically.
{ "locale": "en", "count": 3, "keys": ["app.title", "user.email", "user.profile.name"] }tree_<CODE>
Render the locale keys as an ASCII tree, reconstructed from the key paths.
Input | Type | Description |
| boolean |
|
depth: true — the whole tree:
EN locale — 4 key(s)
├─ app
│ └─ title
└─ user
├─ email
└─ profile
├─ age
└─ namedepth: false — structure only (string leaves hidden — great for a quick map of a large catalog):
EN locale — 4 key(s) (structure only)
├─ app
└─ user
└─ profilesearch_<CODE>
Substring-search key paths. Returns all matching key/value pairs.
Input | Type | Description |
| string | Substring to search for in key paths |
{
"locale": "en",
"query": "profile",
"count": 1,
"matches": [{ "key": "user.profile.name", "value": "Alice" }]
}Batch tools (per locale)
has_batch_<CODE>, get_batch_<CODE>, set_batch_<CODE> — the same operations across many keys in a single call. set_batch_<CODE> writes all entries and saves the file once at the end.
Cross-locale tools
get_all— get one key's value across every loaded locale at once.set_all— set one key in many locales in a single call (pass{ "en": "Hello", "fr": "Bonjour" }).diff— compare every locale against the base (first-loaded) locale; reportsmissingandextrakeys per locale. This is what powers the "sync translations" workflow above.
🧪 Testing with MCP Inspector
npm install
npx @modelcontextprotocol/inspector node bin/mcp-locator.js -- \
--locale-en=/tmp/en.json --locale-fr=/tmp/fr.json --mode=prettyOpen the Inspector URL shown in the terminal to call tools interactively.
🔧 Troubleshooting
Server logs appear in tool output — logs go to
stderr, notstdout.stdoutis the JSON-RPC channel. Check your client's stderr pane.File not found on startup — the server starts with an empty locale and creates the file on the first
set_*call.Atomic writes — all saves write to a
.tmpfile first, then rename, so a crash mid-write never corrupts your locale file.Non-string values in existing files — numbers, booleans, and arrays are coerced to strings with a warning logged to stderr.
🐛 Issues & contributing
Hit a bug, or want a feature? 🙌 Open an issue at
https://github.com/Tankonyako/mcp-locator/issues — please include your
--mode, your --splitter, and a small snippet of the locale file if it's
relevant. 💬
Pull requests are very welcome! 🚀 Fork, branch, and open a PR against main.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityBmaintenanceMCP server for AI-powered translation management in i18n projects, enabling automated locale detection, translation status checks, and sync via LangAPI.Last updated641MIT
- Alicense-qualityCmaintenanceMCP server for managing i18n JSON translation files. Provides Claude with structured read/write access to translation files for adding keys, checking coverage, and finding duplicates.Last updated2051MIT
- AlicenseAqualityCmaintenanceMCP server for managing i18n translation files — gives your AI agent full control over your app's translations without dumping entire locale files into context.Last updated1325110MIT
- Alicense-qualityDmaintenanceAn MCP server that provides comprehensive localization data for 174 locales, enabling AI agents to generate culturally-adapted multilingual content.Last updatedMIT
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
MCP server for AI dialogue using various LLM models via AceDataCloud
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tankonyako/mcp-locator'
If you have feedback or need assistance with the MCP directory API, please join our Discord server