I

I18n Codelens MCP

by hepter · io.github.hepter/i18n-codelens-mcp

Enables AI agents to inspect, audit and safely edit locale JSON files across flat, nested, and namespaced layouts without loading whole files into the model context, with compact token-efficient reads and write paths that cannot drop keys or overwrite silently. Ships ten tools plus slash-command prompts for project info, key search, reference lookup, translation upserts, and missing-translation audits.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-hepter-i18n-codelens-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "i18n-codelens-mcp"
      ],
      "env": {
        "WORKSPACE_ROOT": "<VALUE>",
        "I18N_GLOB": "**/locales/**/*.json",
        "I18N_CODE_GLOB": "**/*.{ts,tsx,js,jsx}",
        "I18N_IGNORE": "node_modules, .git, dist, build, out, coverage, .next, .turbo, .cache",
        "I18N_STRUCTURE": "auto",
        "I18N_CODE_REGEX": "built-in",
        "I18N_DEFAULT_NS": "<VALUE>",
        "I18N_INSERT_ORDER": "nearby",
        "I18N_MCP_LOG_PORT": "<VALUE>",
        "I18N_NS_SEPARATOR": ":",
        "CLAUDE_PROJECT_DIR": "<VALUE>",
        "I18N_ALLOW_ANY_WORKSPACE": "<VALUE>"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-hepter-i18n-codelens-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "i18n-codelens-mcp"
      ],
      "env": {
        "WORKSPACE_ROOT": "<VALUE>",
        "I18N_GLOB": "**/locales/**/*.json",
        "I18N_CODE_GLOB": "**/*.{ts,tsx,js,jsx}",
        "I18N_IGNORE": "node_modules, .git, dist, build, out, coverage, .next, .turbo, .cache",
        "I18N_STRUCTURE": "auto",
        "I18N_CODE_REGEX": "built-in",
        "I18N_DEFAULT_NS": "<VALUE>",
        "I18N_INSERT_ORDER": "nearby",
        "I18N_MCP_LOG_PORT": "<VALUE>",
        "I18N_NS_SEPARATOR": ":",
        "CLAUDE_PROJECT_DIR": "<VALUE>",
        "I18N_ALLOW_ANY_WORKSPACE": "<VALUE>"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-hepter-i18n-codelens-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "i18n-codelens-mcp"
      ],
      "env": {
        "WORKSPACE_ROOT": "<VALUE>",
        "I18N_GLOB": "**/locales/**/*.json",
        "I18N_CODE_GLOB": "**/*.{ts,tsx,js,jsx}",
        "I18N_IGNORE": "node_modules, .git, dist, build, out, coverage, .next, .turbo, .cache",
        "I18N_STRUCTURE": "auto",
        "I18N_CODE_REGEX": "built-in",
        "I18N_DEFAULT_NS": "<VALUE>",
        "I18N_INSERT_ORDER": "nearby",
        "I18N_MCP_LOG_PORT": "<VALUE>",
        "I18N_NS_SEPARATOR": ":",
        "CLAUDE_PROJECT_DIR": "<VALUE>",
        "I18N_ALLOW_ANY_WORKSPACE": "<VALUE>"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-hepter-i18n-codelens-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "i18n-codelens-mcp"
      ],
      "env": {
        "WORKSPACE_ROOT": "<VALUE>",
        "I18N_GLOB": "**/locales/**/*.json",
        "I18N_CODE_GLOB": "**/*.{ts,tsx,js,jsx}",
        "I18N_IGNORE": "node_modules, .git, dist, build, out, coverage, .next, .turbo, .cache",
        "I18N_STRUCTURE": "auto",
        "I18N_CODE_REGEX": "built-in",
        "I18N_DEFAULT_NS": "<VALUE>",
        "I18N_INSERT_ORDER": "nearby",
        "I18N_MCP_LOG_PORT": "<VALUE>",
        "I18N_NS_SEPARATOR": ":",
        "CLAUDE_PROJECT_DIR": "<VALUE>",
        "I18N_ALLOW_ANY_WORKSPACE": "<VALUE>"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-hepter-i18n-codelens-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "i18n-codelens-mcp"
      ],
      "env": {
        "WORKSPACE_ROOT": "<VALUE>",
        "I18N_GLOB": "**/locales/**/*.json",
        "I18N_CODE_GLOB": "**/*.{ts,tsx,js,jsx}",
        "I18N_IGNORE": "node_modules, .git, dist, build, out, coverage, .next, .turbo, .cache",
        "I18N_STRUCTURE": "auto",
        "I18N_CODE_REGEX": "built-in",
        "I18N_DEFAULT_NS": "<VALUE>",
        "I18N_INSERT_ORDER": "nearby",
        "I18N_MCP_LOG_PORT": "<VALUE>",
        "I18N_NS_SEPARATOR": ":",
        "CLAUDE_PROJECT_DIR": "<VALUE>",
        "I18N_ALLOW_ANY_WORKSPACE": "<VALUE>"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-hepter-i18n-codelens-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "i18n-codelens-mcp"
      ],
      "env": {
        "WORKSPACE_ROOT": "<VALUE>",
        "I18N_GLOB": "**/locales/**/*.json",
        "I18N_CODE_GLOB": "**/*.{ts,tsx,js,jsx}",
        "I18N_IGNORE": "node_modules, .git, dist, build, out, coverage, .next, .turbo, .cache",
        "I18N_STRUCTURE": "auto",
        "I18N_CODE_REGEX": "built-in",
        "I18N_DEFAULT_NS": "<VALUE>",
        "I18N_INSERT_ORDER": "nearby",
        "I18N_MCP_LOG_PORT": "<VALUE>",
        "I18N_NS_SEPARATOR": ":",
        "CLAUDE_PROJECT_DIR": "<VALUE>",
        "I18N_ALLOW_ANY_WORKSPACE": "<VALUE>"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
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_GLOB No Locale JSON glob. Default: **/locales/**/*.json
I18N_CODE_GLOB No Source glob for key scans. Default: **/*.{ts,tsx,js,jsx}
I18N_IGNORE No JSON array or comma/semicolon list of globs; .gitignore is honoured as well. Default: node_modules, .git, dist, build, out, coverage, .next, .turbo, .cache
I18N_STRUCTURE No Write shape: auto (keep), flat, nested. Default: auto
I18N_CODE_REGEX No Regex with a named group `key`; the default matches t("key"), T('key'), i18n.t("key") and /** @i18n */ "key". Default: 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. Default: 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. Default: :
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.

Similar servers