Skip to main content

razorpay-i18n-mcp

An MCP (Model Context Protocol) server that gives Claude agents the ability to detect and fix internationalization (i18n) violations in Go and TypeScript/JavaScript codebases.

Built on Razorpay's i18n-code-builder skill — 14 reference documents covering detection rules, i18nify API signatures, anomaly catalog (JPY zero-decimal, DST gaps, org-vs-country logic, etc.), and language-specific patterns across Go/TypeScript/React/Python.


How it works

The MCP exposes two tools. When Claude calls them, it gets back the actual code files plus the relevant skill reference docs — so Claude reasons about violations and writes fixes using the full i18n knowledge as context, rather than rigid regex matching or hardcoded templates.

Claude calls i18n_detect(path)
  → MCP reads code files from disk
  → MCP loads detection-rules.md + language-patterns.md + anomalies.md
  → Returns both to Claude

Claude reasons about violations using the skill patterns as guidance

Claude calls i18n_fix(path, violation_types)
  → MCP reads the file
  → MCP loads targeted reference docs (i18nify-api.md, currency.md, etc.)
  → Returns both to Claude

Claude writes the correct fix informed by the reference docs

No internal LLM calls. No API key required. Just file reading and knowledge delivery.


Tools

Tool Description
i18n_detect Read code files + load detection guidance. Claude identifies violations using skill patterns as inspiration.
i18n_fix Read a file + load fix reference docs targeted to the violation types. Claude writes the correct fix.

Install

pip install razorpay-i18n-mcp

Developer Integration Guide

Option 1 — Claude Code CLI (recommended)

For individual developers using Claude Code in the terminal or IDE.

pip install razorpay-i18n-mcp
claude mcp add --scope user i18n-code-builder razorpay-i18n-mcp

The --scope user flag registers it globally — available in every project, not just the current one.

Verify:

claude mcp list
# i18n-code-builder: razorpay-i18n-mcp  - ✓ Connected

Restart Claude Code, then use the tools:

Use the i18n_detect tool to scan ./internal/payment
Use the i18n_fix tool to fix ./internal/payment/processor.go

Option 2 — Project-level .mcp.json (team sharing)

For teams — commit this file so every developer who clones the repo gets the MCP automatically.

Create .mcp.json at the repo root:

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

Each developer still needs to run pip install razorpay-i18n-mcp once, then Claude Code picks up the server automatically from .mcp.json when they open the project.


Option 3 — Claude Desktop

For developers using the Claude Desktop app (Mac/Windows).

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

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

Restart Claude Desktop. The tools appear automatically in every conversation.


Option 4 — Claude Agent SDK (programmatic / CI)

For building automated agents or running i18n checks in CI pipelines.

import asyncio
from claude_agent_sdk import query

async def check_i18n(service_path: str):
    async for msg in query(
        prompt=f"Use the i18n_detect tool to scan {service_path}",
        options={
            "mcpServers": {
                "i18n-code-builder": {
                    "command": "razorpay-i18n-mcp"
                }
            }
        }
    ):
        if "result" in msg:
            print(msg["result"])

asyncio.run(check_i18n("./internal/payment"))

Install the Agent SDK: pip install claude-agent-sdk


Usage

Always name the tool explicitly (i18n_detect / i18n_fix) so Claude routes to the MCP.

Detect violations

Use the i18n_detect tool to scan ./internal/payment

Claude receives the file contents alongside the skill's detection rules and language patterns, then identifies violations such as:

  • Hardcoded currency codes — "INR", "MYR", "SGD"
  • Hardcoded timezones — "Asia/Kolkata", time.Local
  • Hardcoded dial codes — "+91", "+60"
  • Currency math — amount * 100 (breaks JPY/BHD)
  • Org-based country logic — OrgID == "curlec"
  • float64 for money amounts
  • Country conditionals — if country == "MY"
  • Switch on country — case "IN":

Fix violations

Use the i18n_fix tool to fix ./internal/payment/processor.go

Pass the violation types from the detect step to load the most targeted reference docs:

Use the i18n_fix tool on ./internal/payment/processor.go with violation_types ["currency", "timezone"]

Claude receives the file and the relevant i18nify API reference, fix patterns, and anomaly docs, then writes the corrected file using the exact import paths and function signatures from the skill.

Typical workflow

1. Use the i18n_detect tool to scan ./internal
2. Use the i18n_fix tool to fix ./internal/payment/processor.go
3. Use the i18n_detect tool to scan ./internal/payment/processor.go

What gets detected

Level Examples
BASIC "INR", "Asia/Kolkata", "+91", amount * 100, time.Local, OrgID == "curlec", float64 for money, hardcoded date format constants
LOW_LEVEL if country == "MY", switch country { case "IN": }
HIGH_LEVEL Architectural violations — entire service flow is country-specific, cross-team effort > 1 sprint

Requirements

  • Python ≥ 3.11
  • No API key — no LLM calls inside the MCP

PyPI

https://pypi.org/project/razorpay-i18n-mcp/

Metadata

Release files for razorpay-i18n-mcp 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for razorpay-i18n-mcp 1.0.1
File Size Uploaded
razorpay_i18n_mcp-1.0.1.tar.gz 76.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for razorpay-i18n-mcp 1.0.1
File Interpreter ABI Platform
razorpay_i18n_mcp-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 167.1 kB

Release files / razorpay_i18n_mcp-1.0.1.tar.gz

Download URL razorpay_i18n_mcp-1.0.1.tar.gz
Size 76.8 kB
Tags Source
SHA-256 checksum
How to use checksums
77cb4f16c6387e5586d6f476bf2bf00354ecba5d9366e1d4b0a1a154a1e15f87
BLAKE2b-256 checksum
How to use checksums
72dd934f0253ef3f6eb245ca1bfcff5f5887396fdb4a21e50a5980573abd4363
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Release files / razorpay_i18n_mcp-1.0.1-py3-none-any.whl

Download URL razorpay_i18n_mcp-1.0.1-py3-none-any.whl
Size 90.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e05b2bb33f305da0b0c64f900e89a1693c40cc0b8bd8e4fa9f92fb27ff9f863e
BLAKE2b-256 checksum
How to use checksums
7273a5a12c17c6a6c57e68b905cd85a2d72c8d06c2bca3f3641460d0e61e1c73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page