i18n-codelens-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| I18N_GLOB | No | Locale JSON glob. | **/locales/**/*.json |
| I18N_IGNORE | No | JSON array or comma/semicolon list of globs; .gitignore is honoured as well. | node_modules, .git, dist, build, out, coverage, .next, .turbo, .cache |
| I18N_CODE_GLOB | No | Source glob for key scans. | **/*.{ts,tsx,js,jsx} |
| I18N_STRUCTURE | No | Write shape: auto (keep), flat, nested. | auto |
| WORKSPACE_ROOT | No | Project root to scan and edit. Resolution order: per-tool `workspaceDir` argument, CLI `--workspaceRoot <path>` / `--workspace-root <path>`, WORKSPACE_ROOT, CLAUDE_PROJECT_DIR (set by Claude Code), current working directory, server package directory. Default: cwd. | |
| I18N_CODE_REGEX | No | Regex with a named group `key`; the default matches t("key"), T('key'), i18n.t("key") and /** @i18n */ "key". | built-in |
| I18N_DEFAULT_NS | No | Namespace used for keys written without one in a namespaced project. Unset by default. | |
| I18N_INSERT_ORDER | No | Where new keys go: nearby, append, sort. | nearby |
| I18N_MCP_LOG_PORT | No | Log relay used by the VS Code extension. Unset by default. | |
| I18N_NS_SEPARATOR | No | Separator between namespace and key for {locale}/{namespace}.json layouts. | : |
| CLAUDE_PROJECT_DIR | No | Project directory set automatically by Claude Code for stdio servers; used as a fallback when resolving the workspace root. | |
| I18N_ALLOW_ANY_WORKSPACE | No | Let the `workspaceDir` tool argument escape the configured root. Unset by default. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| i18n_project_infoA | Locales, key format (plain or namespace:key), key counts, resolved config and warnings. Call once per session before other tools. |
| i18n_get_translationsA | Values of specific keys in every (or selected) locale; null marks a missing translation. A key ending with '.' returns the whole namespace. Use includeValues:false for presence only. |
| i18n_search_keysA | Find keys by substring of the key or the translated text, optionally under a key prefix. Keys missing from some locales are marked with "in". Add includeValues to see the text. |
| i18n_file_keysA | Translation keys referenced in one source file and the locales that lack each of them. Run after editing a component to verify its copy is complete. |
| i18n_key_referencesA | Where keys are used in code, as path:line:column, with exact totals. Useful before renaming or deleting a key. |
| i18n_auditA | Project-wide health check: keys missing in some locale (vs the base locale), placeholder mismatches, keys used in code but untranslated, and keys never referenced in code. Choose checks to keep the response small. |
| i18n_upsert_translationsA | Create or update keys in one call, with a value per locale. Writes immediately and never deletes keys. An existing value that differs is reported as a conflict unless overwrite:true. Reports missing locales and placeholder mismatches. |
| i18n_delete_keysA | Remove keys from all or selected locales. Previews by default; pass dryRun:false to delete (or confirm the dialog). |
| i18n_rename_keyA | Rename a key across locales, or move a whole namespace when from ends with '.' (e.g. 'nav.' -> 'menu.'). Refuses when a target exists. Previews by default; pass dryRun:false to apply. |
| i18n_format_resourcesA | Normalize JSON formatting and sort keys (top level only for mixed files). Previews by default; pass dryRun:false to rewrite. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| audit | Run a full i18n audit and propose fixes. |
| add-key | Add one key with copy for every locale through the MCP tools. |
| translate-missing | Find keys missing in a locale and fill them in batches. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Most tools have clearly distinct purposes, but some overlap exists between i18n_get_translations and i18n_search_keys (both retrieve translation values) and between i18n_key_references and i18n_file_keys (both report code references). Descriptions help clarify the intended use, but an agent might still misselect for tasks like finding missing translations.
All names share the i18n_ prefix and snake_case, but the verb/noun structure is mixed: some are noun phrases (i18n_key_references, i18n_project_info, i18n_file_keys, i18n_audit) and others are verb_noun (i18n_get_translations, i18n_search_keys, i18n_upsert_translations). This deviation from a uniform verb_noun pattern makes it only moderately consistent.
With 10 tools, the set is well-scoped for an i18n code lens server. Each tool covers a distinct operation (references, info, get, search, file keys, audit, upsert, delete, rename, format) without obvious redundancy, and the count sits comfortably in the recommended 3–15 range.
The surface covers the core i18n key lifecycle: create/update (upsert), read (get/search), delete, rename, format, audit, and code references. Minor gaps exist, such as no explicit tool to list all keys or manage locales, but these can be worked around with search or project info.