vivek081166/japan-utils-mcp
๐ ๐ ๐ ๐ช ๐ง - Japan-specific utilities for AI agents: era โ Western year conversion (ไปคๅ8ๅนด โ 2026), kanji-to-romaji transliteration, 7-digit postal code lookup, national holiday calendar, hiragana โ katakana conversion, full-width โ half-width normalization, and statistical Japanese name splitting. 9 tools, MIT licensed, installable via uvx japan-utils-mcp.
Quick Install
{
"mcpServers": {
"vivek081166-japan-utils-mcp": {
"command": "npx",
"args": [
"-y",
"vivek081166-japan-utils-mcp"
]
}
}
}Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.
Documentation Overview
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 ๏ผก๏ผข๏ผฃ๏ผ๏ผ๏ผ to half-width. โ
normalize_width("๏ผก๏ผข๏ผฃ๏ผ๏ผ๏ผ", "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