japan-utils-mcp
<!-- mcp-name: io.github.vivek081166/japan-utils-mcp -->MCP server exposing Japan-specific utilities to AI agents (Claude, Cursor, Cline, Continue, etc.). Hand your agent the small bag of JP-specific functions every Japan-related task needs but no generic LLM gets right reliably:
- šļø Era ā Western year ā
令å8幓ā2026 - š¤ Kanji ā Hepburn romaji ā
å±±ē°å¤Ŗéāyamada tarou - š® Postal code lookup ā
150-0001āę±äŗ¬é½ ęøč°·åŗ ē„å®®å - š National holiday calendar ā is
2026-05-03a holiday? what about all of 2026? - š °ļø Kana conversion ā hiragana ā katakana ā half-width katakana
- š Width normalization ā full-width (å Øč§) ā half-width (åč§) for ASCII, digits, kana
- š¤ Name splitting ā
å±±ē°å¤Ŗéā surnameå±±ē°+ given太é(statistical model)
Built on top of well-maintained Japanese libraries (jpholiday, posuto, pykakasi, jaconv, namedivider-python) ā wrapped as MCP tools so any AI agent can call them without re-implementing reading rules, era arithmetic, postal data, or name-splitting heuristics.
Why this exists
Generic LLMs hallucinate on JP-specific data:
- "What year is 令å8幓?" ā often wrong
- "Convert å±±ē°å¤Ŗé to romaji" ā gets the surname wrong half the time
- "What's the address for postal code 150-0001?" ā fabricates plausible-looking nonsense
- "Is May 3rd a Japanese holiday?" ā guesses
This MCP gives them a deterministic answer.
Tools
| Tool | What it does |
|---|---|
era_to_western | 令å8幓 / R8 / Reiwa 8 / 令åå
幓 ā Gregorian year + era metadata |
western_to_era | 2026 ā era kanji (令å), English (Reiwa), year-of-era (8), formatted strings |
kanji_to_romaji | Mixed Japanese text ā Hepburn romaji + hiragana reading |
lookup_postal_code | 7-digit JP postal code ā prefecture / city / area, with kana readings |
is_holiday | Date string ā is it a national holiday? + Japanese name + weekday |
list_holidays | Year ā all national holidays for that year |
convert_kana | hiragana ā katakana ā half-width katakana, any direction |
normalize_width | Full-width ā half-width for ASCII, digits, kana (with per-category control) |
split_japanese_name | Japanese full name ā surname + given name (statistical model with confidence) |
All tools return structured JSON. See tool docstrings in src/japan_utils_mcp/server.py for full schemas and examples.
Installation
Run with uvx (no install ā recommended)
uvx japan-utils-mcp
That's it. uvx (from uv) handles install + run in one shot, isolated from your global Python.
From source
git clone https://github.com/vivek081166/japan-utils-mcp.git
cd japan-utils-mcp
uv sync
uv run japan-utils-mcp
Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"japan-utils": {
"command": "uvx",
"args": ["japan-utils-mcp"]
}
}
}
Claude Code
claude mcp add japan-utils -- uvx japan-utils-mcp
Cursor / Cline / Continue
Same JSON snippet as Claude Desktop, in their respective MCP config files.
Examples
Once connected, ask your agent things like:
What year is 令å8幓? ā
era_to_western("令å8幓")ā2026
What's the address for postal code 150-0001? ā
lookup_postal_code("150-0001")āę±äŗ¬é½ ęøč°·åŗ ē„å®®å
Convert å±±ē°å¤Ŗé to romaji. ā
kanji_to_romaji("å±±ē°å¤Ŗé")āyamada tarou
Is May 3rd 2026 a Japanese holiday? ā
is_holiday("2026-05-03")āę²ę³čØåæµę„(Constitution Memorial Day)
List all Japanese holidays in 2026. ā
list_holidays(2026)ā 18 holidays with names and dates
Convert ć¤ćććæć㦠to hiragana. ā
convert_kana("ć¤ćććæćć¦", "hiragana")āćć¾ć ććć
Normalize 4BCļ¼ļ¼ļ¼ to half-width. ā
normalize_width("4BCļ¼ļ¼ļ¼", "to_half")āABC123
Split é·č°·å·å„太 into surname and given name. ā
split_japanese_name("é·č°·å·å„太")āé·č°·å·/å„太
Caveats
- Romaji of personal names uses the most common reading ā proper nouns with unusual readings will be wrong. This is a fundamental limitation of any kanji-to-romaji conversion without disambiguation context.
- Postal code dataset ships via the
posutolibrary, refreshed against Japan Post's monthly KEN_ALL. If you need ultra-fresh data, refreshposutoperiodically. - Holidays covers national holidays (å½ę°ć®ē„ę„) only ā not company-specific or regional observances.
- Era conversion supports Meiji (ęę²») through Reiwa (令å). Earlier eras are not supported.
Development
git clone https://github.com/vivek081166/japan-utils-mcp.git
cd japan-utils-mcp
uv sync
uv run python -c "from japan_utils_mcp.server import era_to_western; print(era_to_western('令å8幓'))"
License
MIT