Skip to main content

MCP server for Razorpay i18n-code-builder — detect and fix i18n violations in Go/TypeScript using Claude

Project description

i18n-code-builder MCP

A Claude plugin (MCP server) that embeds the full i18n-code-builder skill — including all 14 reference documents — and exposes it as two focused tools for Claude agents:

Tool Purpose
i18n_detect Scan a file or directory; return all i18n violations as structured JSON
i18n_fix Fix all BASIC + LOW_LEVEL violations in a file; return corrected code

Powered by Claude claude-opus-4-6 with adaptive thinking. Not regex — Claude reads the actual code and applies the full Razorpay i18n knowledge: detection rules, i18nify API reference, anomalies catalog (JPY zero-decimal, DST gaps, etc.), language patterns across Go/TypeScript/React/Python, and more.


Prerequisites — gcloud auth

Authentication uses Google Application Default Credentials (ADC). No API key needed.

gcloud auth application-default login

Your credentials are stored at ~/.config/gcloud/application_default_credentials.json and picked up automatically by the MCP server.


Install

pip install i18n-code-builder-mcp

Or use without installing via uvx:

uvx i18n-code-builder-mcp

Configure in Claude Code

Add to ~/.claude/settings.json — no API key needed:

{
  "mcpServers": {
    "i18n-code-builder": {
      "command": "i18n-code-builder-mcp"
    }
  }
}

To override the GCP project or region explicitly:

{
  "mcpServers": {
    "i18n-code-builder": {
      "command": "i18n-code-builder-mcp",
      "env": {
        "VERTEX_PROJECT": "pod-velocity-claude-code",
        "VERTEX_REGION": "us-east5",
        "VERTEX_MODEL": "claude-opus-4-6@20251001"
      }
    }
  }
}

Restart Claude Code after saving.


Configure in Claude Desktop

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

{
  "mcpServers": {
    "i18n-code-builder": {
      "command": "i18n-code-builder-mcp"
    }
  }
}

Environment Variables

Variable Default Description
VERTEX_PROJECT auto from ADC GCP project ID
VERTEX_REGION us-east5 Vertex AI region
VERTEX_MODEL claude-opus-4-6@20251001 Claude model on Vertex

Import into Other Claude Agents (Agent SDK)

from claude_agent_sdk import query

async for msg in query(
    prompt="Scan ./internal/payment for i18n violations, then fix the file with the most issues",
    options={
        "mcpServers": {
            "i18n-code-builder": {
                "command": "i18n-code-builder-mcp",
                "env": {
                    "VERTEX_PROJECT": "pod-velocity-claude-code",
                    "VERTEX_REGION": "us-east5"
                }
            }
        }
    }
):
    if "result" in msg:
        print(msg["result"])

Usage

Detect violations in a directory

Scan ./internal/payment for i18n violations

Returns JSON:

[
  {
    "file": "processor.go",
    "line": 45,
    "level": "BASIC",
    "type": "currency",
    "description": "Hardcoded \"INR\" currency code",
    "snippet": "currency := \"INR\"",
    "fix_summary": "Use country_metadata.GetMetadataInformation(countryCode).DefaultCurrency"
  },
  {
    "file": "scheduler.go",
    "line": 88,
    "level": "BASIC",
    "type": "timezone",
    "description": "Hardcoded Asia/Kolkata timezone",
    "snippet": "loc, _ := time.LoadLocation(\"Asia/Kolkata\")",
    "fix_summary": "Use i18nify.NewCountry(countryCode).GetCountryMetadata().TimezoneOfCapital"
  }
]

Fix a file

Fix all i18n violations in ./internal/payment/processor.go

Returns the complete corrected file with:

  • "INR"country_metadata.GetMetadataInformation(countryCode).DefaultCurrency
  • "Asia/Kolkata" → i18nify country metadata lookup
  • amount * 100currency.ConvertToMinorUnit(currencyCode, amount)
  • Country conditionals → DCS/GeoSDK lookups
  • All required imports added

Typical workflow

1. Scan the repo:   "Detect all i18n violations in ./internal"
2. Fix by file:     "Fix i18n violations in ./internal/payment/processor.go"
3. Verify:          "Scan ./internal/payment/processor.go again to confirm no violations remain"

What's Detected

Level Examples
BASIC (auto-fixable) "INR", "Asia/Kolkata", "+91", amount * 100, time.Local, OrgID == "curlec", float64 for money, hardcoded format constants
LOW_LEVEL (auto-fixable) if country == "MY", switch country { case "IN": }
HIGH_LEVEL (needs architecture) Entire service flow India-specific, cross-team effort > 1 sprint

Publish to PyPI

cd development/skills/i18n/i18n-code-builder-mcp-py
pip install build twine
python -m build
twine upload dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

razorpay_i18n_mcp-1.0.0.tar.gz (76.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

razorpay_i18n_mcp-1.0.0-py3-none-any.whl (90.0 kB view details)

Uploaded Python 3

File details

Details for the file razorpay_i18n_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: razorpay_i18n_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 76.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for razorpay_i18n_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5c5e0618d1328a38021a6e86af0de89d8d9b4fb0cfe247df811aa62047651b22
MD5 0f5e92169ba6aca6c79ff5c13a004cec
BLAKE2b-256 dde1e29bcabf47bc4e2a8a2613cb44634cda9b5d41b0066717e31fc10c60b989

See more details on using hashes here.

File details

Details for the file razorpay_i18n_mcp-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for razorpay_i18n_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66e372b12299f1f4106d34c4b63d37af119bfb276917c2ca90fdfec58c107fa3
MD5 1cec9b72802a9d5d32fae82ea1b01619
BLAKE2b-256 d4e5834d793e094805b29bfeed275498c9a2f35f12d54aeb02952998292d64ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page