Japan Utils

io.github.vivek081166由 GitHub 账号 vivek081166 发布v0.1.2更新于 Oct 27, 2026

Japan utilities for AI agents: era, romaji, postal codes, holidays, kana, name splitting.

已验证STDIO仅桌面位置与生活开发者工具

概览

AI 生成的概览

本地 MCP 服务器,为助手提供确定性的日本实用工具:年号换算、罗马字、邮编、节假日、假名与姓名拆分。

可以做什么
  • 在日本年号与公历年份之间双向换算
  • 将混合日文文本转写为赫本式罗马字并给出平假名读音
  • 查询日本邮政编码对应的都道府县、市区与地区,并按日期或年份判断或列出国民节假日
  • 在平假名、片假名与半角片假名之间转换,并规范化全角与半角字符
  • 用统计模型把日本人全名拆分为姓与名
适用场景
适合经常处理日本相关事务的助手,例如地址、日期、姓名或文本规范化,需要准确答案而非猜测时。适用于处理日文表单、邮寄、日历或数据清洗的场景。
运行要求
以 stdio 本地进程运行,可用 uvx(来自 uv)一键启动或从源码用 uv 运行;未声明需要账号、API 密钥或环境变量。邮编数据随 posuto 库一同提供。
安装前请注意
仅做只读查询,不涉及凭据或写入。部分结果为启发式:人名罗马字采用最常见读音,姓名拆分基于统计模型,节假日仅含国民祝日,年号换算仅支持明治及以后。邮编数据的新旧取决于所捆绑的 posuto 数据集。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Japan Utils,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

japan-utils-mcp

[PyPI] [License: MIT]

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-03 a 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

ToolWhat it does
era_to_western令和8年 / R8 / Reiwa 8 / 令和元年 → Gregorian year + era metadata
western_to_era2026 → era kanji (令和), English (Reiwa), year-of-era (8), formatted strings
kanji_to_romajiMixed Japanese text → Hepburn romaji + hiragana reading
lookup_postal_code7-digit JP postal code → prefecture / city / area, with kana readings
is_holidayDate string → is it a national holiday? + Japanese name + weekday
list_holidaysYear → all national holidays for that year
convert_kanahiragana ↔ katakana ↔ half-width katakana, any direction
normalize_widthFull-width ↔ half-width for ASCII, digits, kana (with per-category control)
split_japanese_nameJapanese 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)

bash
uvx japan-utils-mcp

That's it. uvx (from uv) handles install + run in one shot, isolated from your global Python.

From source

bash
git clone https://github.com/vivek081166/japan-utils-mcp.gitcd japan-utils-mcpuv syncuv 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):

json
{  "mcpServers": {    "japan-utils": {      "command": "uvx",      "args": ["japan-utils-mcp"]    }  }}

Claude Code

bash
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 ABC123 to half-width. → normalize_width("ABC123", "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 posuto library, refreshed against Japan Post's monthly KEN_ALL. If you need ultra-fresh data, refresh posuto periodically.
  • Holidays covers national holidays (国民の祝日) only — not company-specific or regional observances.
  • Era conversion supports Meiji (明治) through Reiwa (令和). Earlier eras are not supported.

Development

bash
git clone https://github.com/vivek081166/japan-utils-mcp.gitcd japan-utils-mcpuv syncuv run python -c "from japan_utils_mcp.server import era_to_western; print(era_to_western('令和8年'))"

License

MIT

来源:README.md,提交 56d203a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分