i18n-mcp

i18n-mcp

An MCP server for managing Rails-style localization files (YAML/JSON), enabling coding agents to read, search, write, and audit translations without hand-editing files.

Category
Visit Server

README

i18n-mcp

An MCP (Model Context Protocol) server that gives coding agents tools to manage Rails-style localization files (YAML or JSON). Point it at a Rails app's config/locales directory and the agent can read, search, write and audit translations without hand-editing files.

Supported layouts

Both common Rails layouts are detected automatically, and can be mixed:

config/locales/
  en/                  # per-locale directories (nesting allowed)
    common.yml         # rooted at the locale code: `en: ...`
    admin/users.yml
  th/common.yml
  legacy.yml           # flat files whose top-level keys are locale codes

Files may be .yml, .yaml or .json. Writes go through the YAML AST, so existing comments and key order survive edits. Duplicate keys are tolerated with last-wins semantics, matching Rails (Psych). Files that cannot be parsed are reported in locales output under problems instead of aborting the server.

Install and build

Run directly from npm without installing:

npx -y mcp-i18n --locales-dir /path/to/rails-app/config/locales

Or build from source:

npm install
npm run build

Usage with an MCP client

Add the server to your MCP client configuration (Kimi Code, Claude Desktop, etc.). Via npx (no local checkout needed):

{
  "mcpServers": {
    "i18n": {
      "command": "npx",
      "args": [
        "-y", "mcp-i18n",
        "--locales-dir", "/path/to/rails-app/config/locales"
      ]
    }
  }
}

Or from a local build:

{
  "mcpServers": {
    "i18n": {
      "command": "node",
      "args": [
        "/path/to/i18n-mcp/dist/src/index.js",
        "--locales-dir", "/path/to/rails-app/config/locales"
      ]
    }
  }
}

Options:

  • --locales-dir <path> — locales directory. Falls back to the I18N_LOCALES_DIR environment variable, then <cwd>/config/locales.
  • --default-file <name> — file name (relative to the locale directory) for brand-new keys. Default: common.yml (or common.json for JSON-only locales).

Tools

Tool Description
locales List locales with file/key counts and parse problems.
keys List translation key paths; filter by locale and/or prefix.
get_key Get a key's values across locales, with the file each lives in.
search Substring search over translation keys (optionally values).
set_key Create or update a key per locale. Writes to the key's current file, the nearest prefix's file, or the locale default. Warns on %{placeholder} mismatch.
delete_key Delete a key from locales (default: all); prunes empty parents.
missing Audit keys: missing per locale, empty values, %{placeholder} mismatches vs base locale (default en).

Examples

// get_key
{ "key": "roles_scope.super_admin" }

// set_key
{ "key": "features.reports.title", "values": { "en": "Reports", "th": "Reports (th)" } }

// missing, scoped to one subtree
{ "prefix": "dashboards", "limit": 50 }

All responses are JSON. Errors (unknown locale, missing key, write failures) are returned as tool errors with a human-readable message.

Development

npm test            # vitest unit/handler tests
npm run coverage    # tests + v8 coverage report (enforced thresholds: 85% lines/statements, 80% branches/functions)
npm run lint        # eslint (zero errors required)
npm run typecheck   # tsc --noEmit, strict (zero errors required)
npm run build       # compile to dist/
npm run smoke       # end-to-end test over real stdio transport

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured