I18n Codelens MCP logo

I18n Codelens MCP

Inspect, audit and safely edit i18n locale JSON files from AI agents.

Install I18n Codelens MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "i18n-codelens-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "i18n-codelens-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

The install command started, but didn't respond the way we expected when we tried to talk to it.

npx -y i18n-codelens-mcp

initialize succeeded but no response to tools/list.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

Tools10

What I18n Codelens MCP lets your agent do. Expand a tool for its parameters.

Self-reported~229 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 60d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 4d ago via OSV.dev · i18n-codelens-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads252Package downloads in the last 30 days.
Last commit2mo agoMost recent push to the default branch.
Install checkInconclusiveStarted but did not complete the MCP handshake in our test.
Tools exposed10Callable tools this server registers over MCP.

From the project README

i18n-codelens-mcp

Model Context Protocol (MCP) server for i18n translation files. It lets AI agents (Claude Code, Cursor, Antigravity, GitHub Copilot, Codex, Gemini CLI and any other MCP client) inspect, audit and safely edit locale JSON files without ever loading a whole locale file into the model context.

  • Compact by design. Ten tools, single-line JSON results, no echoed input, limit/includeValues everywhere. A typical read costs 50-200 tokens.
  • Safe by construction. No write path can reduce a locale file's key set; mixed flat/nested files are edited in place, never converted; upserts report conflicts instead of overwriting.
  • Current MCP. Built on the TypeScript SDK v2: protocol revision 2026-07-28 and the 2025 revisions, server instructions, prompts (slash commands), cache hints and elicitation-based confirmation for destructive tools.
  • Any layout. locales/en.json, locales/en-US.json, messages.en.json and i18next-style locales/en/common.json (namespace files, keys as common:nav.home).

This package is also the MCP backend of the i18n CodeLens VS Code extension.

Requirements

  • Node.js 20 or newer
  • Locale resources as JSON files
  • An MCP client that supports stdio servers

Install

Terminal
npx -y i18n-codelens-mcp
# or
npm install -g i18n-codelens-mcp

Client setup

Every command below registers the same thing: a stdio server named i18n-codelens running npx -y i18n-codelens-mcp. Pick your client, run one line, done.

The server needs to know which project to work on. Most clients start it in the project directory, and Claude Code passes the project root explicitly, so nothing else is needed. When your client starts the server from somewhere else, add the project path with the client's env flag, for example -e WORKSPACE_ROOT=/absolute/path/to/project.

Windows PowerShell: PowerShell can swallow a bare -- before it reaches the CLI, which then reports unknown option '-y'. If that happens, quote the separator as '--', or run the command from cmd, Git Bash or WSL.

Claude Code

bash
# for the whole team: writes .mcp.json in the repo
claude mcp add --scope project i18n-codelens -- npx -y i18n-codelens-mcp

# just for you, in every project
claude mcp add --scope user i18n-codelens -- npx -y i18n-codelens-mcp

Claude Code sets CLAUDE_PROJECT_DIR for stdio servers, so the server always finds the right project. Its tool-search feature defers MCP tools; i18n_upsert_translations and i18n_get_translations are marked anthropic/alwaysLoad so the two everyday tools need no lookup. The prompts show up as /i18n-codelens:audit, /i18n-codelens:add-key and /i18n-codelens:translate-missing.

Manual configuration

Project scope is .mcp.json in the repository root:

config.json
{
  "mcpServers": {
    "i18n-codelens": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "i18n-codelens-mcp"]
    }
  }
}

Google Antigravity

bash
agy mcp add i18n-codelens -- npx -y i18n-codelens-mcp

agy mcp list, agy mcp disable i18n-codelens and agy mcp remove i18n-codelens manage it afterwards. Inside the IDE, /mcp opens the MCP manager.

Manual configuration

Global is ~/.gemini/config/mcp_config.json (Windows: %USERPROFILE%\.gemini\config\mcp_config.json), per project .agents/mcp_config.json. In the IDE: … → MCP Servers → Manage MCP Servers → View raw config.

config.json
{
  "mcpServers": {
    "i18n-codelens": {
      "command": "npx",
      "args": ["-y", "i18n-codelens-mcp"],
      "cwd": "/absolute/path/to/project",
      "env": { "WORKSPACE_ROOT": "/absolute/path/to/project" }
    }
  }
}

Antigravity also accepts disabled: true and disabledTools: ["i18n_format_resources"] per server.

Gemini CLI

bash
gemini mcp add -s user i18n-codelens npx -y i18n-codelens-mcp

Use -s project to write the project's settings instead. Gemini takes the command and its arguments positionally, so no -- is needed.

OpenAI Codex CLI

bash
codex mcp add i18n-codelens -- npx -y i18n-codelens-mcp
Manual configuration

~/.codex/config.toml:

toml
[mcp_servers.i18n-codelens]
command = "npx"
args = ["-y", "i18n-codelens-mcp"]

VS Code and Copilot Chat

bash
code --add-mcp "{\"name\":\"i18n-codelens\",\"command\":\"npx\",\"args\":[\"-y\",\"i18n-codelens-mcp\"]}"

That writes the user profile. MCP: Add Server in the Command Palette does the same through a guided flow and can target the workspace.

Manual configuration

.vscode/mcp.json in the repository, which you can commit:

config.json
{
  "servers": {
    "i18n-codelens": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "i18n-codelens-mcp"],
      "env": { "WORKSPACE_ROOT": "${workspaceFolder}" }
    }
  }
}

OpenCode

bash
opencode mcp add i18n-codelens -- npx -y i18n-codelens-mcp
Manual configuration

opencode.json in the project root, or ~/.config/opencode/opencode.json:

config.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "i18n-codelens": {
      "type": "local",
      "command": ["npx", "-y", "i18n-codelens-mcp"],
      "enabled": true
    }
  }
}

GitHub Copilot CLI

Copilot CLI adds servers from inside a session rather than from the shell. Start copilot, then:

text
/mcp add

Fill in the form: Server Name i18n-codelens, Server Type STDIO, Command npx -y i18n-codelens-mcp. /mcp, /mcp show i18n-codelens and /mcp delete i18n-codelens manage it afterwards.

Manual configuration

User level is ~/.copilot/mcp-config.json; for a repository commit .github/mcp.json, or drop an uncommitted .mcp.json at the project root.

config.json
{
  "mcpServers": {
    "i18n-codelens": {
      "type": "local",
      "command": "npx",
      "args": ["-y", "i18n-codelens-mcp"],
      "env": {},
      "tools": ["*"]
    }
  }
}

Cursor, Windsurf, Claude Desktop, Kiro, Cline and Roo Code

These clients have no command to add a server, so the configuration file is the way in. The shape is the same everywhere; only the path differs.

Cursor and Windsurf

.cursor/mcp.json in the project or ~/.cursor/mcp.json; Windsurf uses ~/.codeium/windsurf/mcp_config.json.

config.json
{
  "mcpServers": {
    "i18n-codelens": {
      "command": "npx",
      "args": ["-y", "i18n-codelens-mcp"],
      "env": { "WORKSPACE_ROOT": "/absolute/path/to/project" }
    }
  }
}

cursor-agent mcp list and cursor-agent mcp enable i18n-codelens manage it from the terminal once it is configured.

Claude Desktop

Open Settings → Developer → Edit Config.

config.json
{
  "mcpServers": {
    "i18n-codelens": {
      "command": "npx",
      "args": ["-y", "i18n-codelens-mcp"],
      "env": { "WORKSPACE_ROOT": "/absolute/path/to/project" }
    }
  }
}
Kiro

Command palette: Kiro: Open workspace MCP config (JSON) for .kiro/settings/mcp.json, or the user config at ~/.kiro/settings/mcp.json.

config.json
{
  "mcpServers": {
    "i18n-codelens": {
      "command": "npx",
      "args": ["-y", "i18n-codelens-mcp"],
      "env": { "WORKSPACE_ROOT": "/absolute/path/to/project" },
      "disabled": false,
      "autoApprove": ["i18n_project_info", "i18n_get_translations", "i18n_search_keys", "i18n_file_keys", "i18n_key_references", "i18n_audit"]
    }
  }
}
Zed

~/.config/zed/settings.json, or .zed/settings.json for the team. Zed calls MCP servers context_servers.

config.json
{
  "context_servers": {
    "i18n-codelens": {
      "source": "custom",
      "command": "npx",
      "args": ["-y", "i18n-codelens-mcp"],
      "env": { "WORKSPACE_ROOT": "/absolute/path/to/project" }
    }
  }
}
Cline and Roo Code

Open the extension panel → MCP Servers → Configure MCP Servers. Cline writes cline_mcp_settings.json, Roo Code mcp_settings.json or .roo/mcp.json per project.

config.json
{
  "mcpServers": {
    "i18n-codelens": {
      "command": "npx",
      "args": ["-y", "i18n-codelens-mcp"],
      "env": { "WORKSPACE_ROOT": "/absolute/path/to/project" },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Sharing with a team

Commit a project-level configuration so every teammate and every agent picks up the same server without touching global settings.

ClientProject-level fileOne-liner
Claude Code.mcp.jsonclaude mcp add --scope project i18n-codelens -- npx -y i18n-codelens-mcp
Antigravity.agents/mcp_config.json
GitHub Copilot CLI.github/mcp.json or .mcp.json
VS Code / Copilot Chat.vscode/mcp.json
Gemini CLIproject settingsgemini mcp add -s project i18n-codelens npx -y i18n-codelens-mcp
OpenCodeopencode.jsonopencode mcp add i18n-codelens -- npx -y i18n-codelens-mcp
Cursor.cursor/mcp.json
Kiro.kiro/settings/mcp.json
Zed.zed/settings.json
Roo Code.roo/mcp.json

Workspace root

Resolution order:

  1. Per-tool workspaceDir argument (must be inside the configured root, see below)
  2. CLI --workspaceRoot <path> / --workspace-root <path>
  3. WORKSPACE_ROOT
  4. CLAUDE_PROJECT_DIR (set by Claude Code)
  5. Current working directory
  6. Server package directory

The workspaceDir tool argument can only select a sub-directory of the configured root. A model cannot point the server at another directory on disk unless the server is started with I18N_ALLOW_ANY_WORKSPACE=1.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about I18n Codelens MCP

i18n-codelens-mcp is an MCP server that lets AI agents inspect, audit, and safely edit i18n locale JSON files without loading an entire locale into model context. It provides ten compact tools with single-line JSON results, limits, and optional values, while preserving key sets and mixed flat/nested layouts during edits.

Install i18n-codelens-mcp by running `npx -y i18n-codelens-mcp`, or install it globally with `npm install -g i18n-codelens-mcp`. The server requires Node.js 20 or newer, locale resources in JSON format, and an MCP client that supports stdio servers.

i18n-codelens-mcp supports flat and nested locale JSON layouts, including `locales/en.json`, `locales/en-US.json`, `messages.en.json`, and i18next-style namespace files such as `locales/en/common.json`. Namespace keys use the `common:nav.home` format.

i18n-codelens-mcp prevents unsafe edits by ensuring write operations cannot reduce a locale file’s key set, preserving mixed flat/nested files in place, and reporting conflicts instead of overwriting existing values during upserts.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewI18n Codelens MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/i18n-codelens-mcp?style=directory)](https://allmcps.com/mcp/i18n-codelens-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/i18n-codelens-mcp"><img src="https://allmcps.com/api/badge/i18n-codelens-mcp?style=directory" alt="I18n Codelens MCP on AllMCPs" /></a>