# the-i18n-mcp [Health: Active]

**Category:** 🌎 Translation Services  
**Repository:** https://github.com/fabkho/the-i18n-kit  
**GitHub Stars:** 11  
**npm Downloads (last month):** 98  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/the-i18n-mcp

## Description
Compatibility alias for @the-i18n-kit/mcp. Install @the-i18n-kit/mcp directly; this package only forwards to it.

## Tools
Capabilities this server exposes over MCP:

- **discover** — Describe the project: detected config, locale directories per layer with file counts and top-level namespaces, the layer graph, and the hand-maintained locales. Call this first to understand the project before reading or writing translations. The result also names the active translation mode ("provider" when the server has an env-configured LLM provider, "agent" otherwise). layerGraph answers where a new key belongs: a key used by more than one app belongs in a layer those apps share, and layerGraph.shared names those layers.
- **list_namespaces** — List the translation key tree grouped by namespace prefix, with a count per namespace node. Use this to explore the available keys without guessing path prefixes. limit counts top-level namespace nodes across the scanned layers, each of which brings its whole subtree; totalNamespaces counts them all, whatever the limit let through.
- **get_translations** — Get translation values by key path or by key prefix, from one layer or from every layer that defines them. Use "*" as the locale to read from all locales. Pass keys for an explicit list, or keyPrefix to read a whole namespace at once — one of the two is required, and a call with neither fails with EARG. With layer, the result is locale → key → value, exactly as it always was — unless limit cut it short, in which case it answers in the { byLayer } shape below, which has room for truncated and nextOffset. Without layer, every non-alias layer is read and the result is { byLayer, layersSearched }: byLayer holds that same shape per layer and names only the layers defining at least one of the keys, which is what answers where a key lives. limit counts one key per layer read, so a prefix read of seven layers is capped across all of them rather than per layer.
- **write_translations** — Write translation key-value pairs to a layer. Keys are inserted in alphabetical order. Mode "upsert" adds new keys and updates existing ones (default, most common). Mode "add" only creates new keys, skipping existing ones. Mode "update" only modifies existing keys, skipping missing ones. Use dryRun to preview without writing.
- **get_missing_translations** — Find translation keys that exist in the reference locale but are missing in other locales. Scans a specific layer or all layers. summary.totalMissingKeys counts every missing key in the project; limit caps only how many of them are listed under missing, over the nested map flattened to one entry per locale, layer and key.
- **get_translation_status** — Translation coverage in one call: per-locale and per-layer counts of total, translated, missing and empty keys, plus an overall completion percentage. Use this instead of calling get_missing_translations per layer and counting keys yourself. Empty-string values count as untranslated; set listEmpty to get the keys behind that count — they exist in the locale file, so they are never reported as missing, and they render as nothing in the UI. Locales listed in protectedLocales are reported but excluded from the overall figure, since they are maintained by hand. Where a translation memory lockfile exists, each locale and layer also carries stale — keys whose target was written from source text that has changed since — and the summary carries staleCount; translate with overwriteStale refreshes them.
- **search_translations** — Search translation files by key path or value, one compact row per matching key rather than one per key and locale. Useful for finding an existing translation before adding a duplicate of it. A key that seven layers and thirty locales define comes back as a single row: layers names every layer that defines it, which is what tells reuse from duplication, and value is the one the reference locale holds. Pass includeLocales for the detail rows — one per key and locale — when what each locale holds is the question. Matching is a case-insensitive substring unless matchMode says otherwise.
- **remove_translations** — Remove one or more translation keys from ALL locale files in the given layer. Use dryRun to preview the changes before applying them.
- **move_translation_key** — Move a translation key to another layer, to another key path, or both, carrying every locale that defines it. Pass toLayer to promote an app-layer key to a shared layer once a second app needs it (or to demote a shared key that turned out to be app-specific); call discover first, layerGraph.shared names the layers more than one app consumes. Pass newKey alone to rename the key in place across every locale file of its layer. Writes nothing at all if the destination already holds the key with a different value in any locale; if it holds the same value, that locale is deduplicated instead. Use dryRun to preview the plan.
- **translate_missing** — Find the keys missing in the target locales and translate them. Without a translation backend nothing is written: the result carries per-locale fallback contexts to translate by hand instead. Two modes: in provider mode (the server env-configured with I18N_PROVIDER, I18N_MODEL and an API key) it calls the LLM provider directly and writes the results; in agent mode it returns those fallbackContexts — translate them inline and persist via write_translations. Check the discover output for the active mode. Uses the project config (glossary, translation prompt, locale notes, examples) where there is one. Translates all locales concurrently, so pass every target locale at once.
- **translate_key** — Add or update one source translation key and translate it into the target locales. Unlike translate_missing, this can overwrite an existing but stale target translation. Same two modes as translate_missing: provider mode (the server env-configured) translates directly; agent mode returns a fallbackContext — translate it inline and persist via write_translations.
- **find_undefined_keys** — Find keys referenced in source code but defined in NO locale layer the using app consumes — the direction that ships raw keys to production. The inverse of find_orphan_keys. Scope-aware: each scan unit (app) is checked against the layers it consumes (summary.searchedLayersByApp), so a key defined only in a layer the using app does not consume is still undefined for that app. Known limitation: extraction is line-based and static — dynamically built keys (template literals, concatenation) cannot be verified and are reported as uncertainKeys, never as hard findings. With write, the hard findings are also added to a locale file as empty translations, which is the first half of the fix; uncertain findings are never written.
- **find_orphan_keys** — Report translation keys that no source code references. Nothing is deleted unless remove is set. Scans a specific layer or all layers, and also detects dynamic key patterns and uncertain matches. Scope-aware: each layer is checked only against the code of the apps that consume it (summary.scanScope shows each layer's effective scope), and keys referenced only from non-consuming apps are reported separately as misplacedUsages rather than as orphans. With remove the orphan keys are deleted from every locale file of their layer — uncertain keys and misplaced usages are never deleted, in any mode.
- **find_duplicate_keys** — Find translation keys defined in BOTH a shared layer and an app layer that consumes it. For example the same key in a monorepo root layer and in app-shop. At runtime the app layer's value shadows the shared one, so a collision with divergent values is the dangerous case: the shared value silently never shows. Compares one reference locale and reports each collision with both values and a divergent flag. Fix by deleting one side, never by moving.
- **scaffold_locale** — Create empty locale files for new languages, copying the key structure of the default locale with every value set to an empty string. Supports both JSON (Nuxt) and PHP (Laravel) formats. Does NOT modify the framework configuration — add the locale there first, then call this.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "the-i18n-mcp": {
    "command": "npx",
    "args": ["@the-i18n-kit/mcp@latest"]
  }
}
```

## Documentation

## What the-i18n-mcp MCP server does

The-i18n-mcp connects an MCP-compatible coding agent to a project's translation files and configuration. It is designed for repositories with multiple applications, shared translation layers, and locale files in formats such as Nuxt JSON and Laravel PHP. The server can inspect where keys are defined, determine which applications consume each layer, and apply coordinated changes across locales.

Its workflow covers both maintenance and translation: discover the repository structure, inspect namespaces or values, measure coverage, find problems in source usage, then write, move, rename, or remove keys. It can also create the empty structure for a new locale.

## How it works

Call `discover` first. Its response describes detected configuration, locale directories, file counts, top-level namespaces, the layer graph, hand-maintained locales, and whether translation is operating in provider or agent mode. The layer graph helps determine where a key belongs when several applications share it.

Reads can target explicit key paths or an entire namespace prefix. They can be limited to one layer or searched across all non-alias layers, and `*` reads every locale. Write operations support upsert, add-only, update-only, and dry-run behavior. Key moves can change a layer, a key path, or both while carrying values across locales and avoiding destructive conflicts.

Provider mode uses the configured LLM provider directly. Agent mode returns translation context instead, allowing the calling agent to translate inline and persist results with `write_translations`. Project configuration such as glossaries, prompts, locale notes, and examples is used when available.

## Setup and configuration

Install the maintained package with `@the-i18n-kit/mcp`. An MCP host can launch it through `npx` using the `@latest` tag:

```json
{
  "mcpServers": {
    "the-i18n-mcp": {
      "command": "npx",
      "args": ["@the-i18n-kit/mcp@latest"]
    }
  }
}
```

For direct provider mode, configure `I18N_PROVIDER`, `I18N_MODEL`, and an API key for the selected provider. Without a translation backend, use the fallback contexts returned in agent mode. Add a new language to the framework configuration before calling `scaffold_locale`.

## Tools and capabilities

- Inspect project layers, locale directories, namespaces, and translation mode.
- Read values by key list or namespace prefix across selected locales and layers.
- Write, add, update, remove, rename, or move keys with dry-run previews.
- Find missing, empty, stale, undefined, orphaned, duplicate, and misplaced keys.
- Report per-locale and per-layer translation coverage.
- Translate missing keys or one source key into multiple target locales.
- Create empty JSON or PHP locale files based on the default locale's key structure.

## Limitations and notes

Source analysis is static and line-based. Dynamically constructed keys, including template literals and concatenated paths, are reported as uncertain rather than treated as definite findings. Orphan cleanup never removes uncertain keys or usages from applications that do not consume the scanned layer.

`find_duplicate_keys` compares a reference locale and reports collisions between shared and consuming application layers; it is intended to guide deletion of one side rather than moving the key. Empty strings count as untranslated but are distinct from missing keys. Protected locales appear in reports but are excluded from the overall completion percentage.

Translation runs process target locales concurrently, so pass the complete target set when using the translation tools. `scaffold_locale` creates locale files but does not change framework locale configuration.

_Full upstream README: https://allmcps.com/mcp/the-i18n-mcp/readme_

