jp-postal-code-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@jp-postal-code-mcp 郵便番号100-0001に対応する住所を教えて。"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
jp-postal-code-mcp
日本郵便の公開データから、郵便番号に対応する町域や、住所に対応する郵便番号を調べられます。大口事業所や私書箱の個別郵便番号も照会できます。
MCP登録 · CLI · Pythonライブラリ
利用前に
uv と Git が必要です。Python 3.12以上に対応しています。APIキーの設定は不要です。
Related MCP server: Japan Area Code MCP Server
MCPクライアントに登録する
公開GitHubリポジトリから uvx で起動します。初回は依存関係の準備に時間がかかることがあります。
Codex
codex mcp add jp-postal-code-mcp -- uvx --python 3.12 --from git+https://github.com/koizumikento/jp-postal-code-mcp.git@main jp-postal-code-mcp
codex mcp listcodex mcp list で登録を確認し、Codexの新しいセッションで /mcp を開くと、接続状態を確認できます。Codexの公式設定ガイド
Codexのデスクトップアプリでは、設定の「MCP servers」でSTDIOサーバーを追加し、下のJSON例と同じコマンド・引数を指定する方法もあります。
Claude Desktop / Cursor
次のファイルに設定します。
Claude Desktop(Windows)
%APPDATA%/Claude/claude_desktop_config.jsonClaude Desktop(macOS)
~/Library/Application Support/Claude/claude_desktop_config.jsonCursor
.cursor/mcp.json(プロジェクト内)
既に mcpServers がある場合は、その中にサーバーの項目を追加してください。保存後にクライアントを再起動し、ツールが表示されるか確認します。設定ファイルの場所と接続手順
{
"mcpServers": {
"jp-postal-code-mcp": {
"command": "uvx",
"args": [
"--python",
"3.12",
"--from",
"git+https://github.com/koizumikento/jp-postal-code-mcp.git@main",
"jp-postal-code-mcp"
]
}
}
}uvx が見つからない場合は、設定のコマンドに実行ファイルの絶対パスを指定してください。
登録後は、チャットで次のように聞けます。
郵便番号100-0001に対応する住所を教えて。
北海道札幌市中央区の「北一条西」に対応する郵便番号を探して。
MCPツール
ツール | 用途 |
| 7桁の郵便番号に対応する町域をすべて返す。ハイフンは省略可 |
| 都道府県・市区町村・町域の住所文字列から郵便番号を探す。都道府県を指定して絞り込める |
| 7桁の個別郵便番号で、事業所名や所在地、取扱郵便局を照会 |
住所検索は、都道府県名・市区町村名・町域名をつないだ文字列に部分一致します。空白と文字幅の違いを吸収します。next_offset が返ったら、次の検索の offset に指定してください。
CLIで使う
結果は標準出力にUTF-8のJSONで返ります。
uvx --python 3.12 --from git+https://github.com/koizumikento/jp-postal-code-mcp.git@main jp-postal-code-mcp lookup-postal-code --postal-code 100-0001
uvx --python 3.12 --from git+https://github.com/koizumikento/jp-postal-code-mcp.git@main jp-postal-code-mcp search-postal-codes --address "札幌市中央区北一条西" --prefecture "北海道"
uvx --python 3.12 --from git+https://github.com/koizumikento/jp-postal-code-mcp.git@main jp-postal-code-mcp lookup-business-postal-code --postal-code 060-8621Pythonライブラリとして使う
自分のPythonプロジェクト(pyproject.toml があるディレクトリ)で依存関係に追加します。
uv add "git+https://github.com/koizumikento/jp-postal-code-mcp.git@main"次のコードを example.py に保存し、同じディレクトリで uv run python example.py を実行します。
import asyncio
from jp_postal_code_mcp import lookup_business_postal_code, search_postal_codes
print(asyncio.run(search_postal_codes(address="札幌市中央区北一条西")))
print(asyncio.run(lookup_business_postal_code(postal_code="060-8621")))データの更新
MCP・CLI・Pythonは同じローカルキャッシュを使います。町域用と事業所用は、それぞれ初回の利用時に公式CSVを取得します。確認間隔は7日で、期限を過ぎた最初の照会時に更新を確認します。更新に失敗した場合は直前の正常な版を返し、cache.refresh_failed と cache.checked_at で失敗の有無と最後に確認できた日時を判別できます。初回取得に失敗した場合はエラーになります。
すぐに更新したいときは次を実行します。
uvx --python 3.12 --from git+https://github.com/koizumikento/jp-postal-code-mcp.git@main jp-postal-code-mcp refresh
uvx --python 3.12 --from git+https://github.com/koizumikento/jp-postal-code-mcp.git@main jp-postal-code-mcp refresh --dataset businessキャッシュはWindowsでは %LOCALAPPDATA%/jp-postal-code-mcp、その他では $XDG_CACHE_HOME/jp-postal-code-mcp または ~/.cache/jp-postal-code-mcp に保存されます。JP_POSTAL_CODE_CACHE_DIR で保存先を指定できます。
データの出典と利用条件
町域の照会・検索は日本郵便の住所用CSVを使います。結果の data_as_of は配布元が返すアーカイブの更新日時です。更新日時が得られない場合は null になります。住所用CSVの配布ページ・データ説明
個別郵便番号の照会は事業所用CSVを使います。公表を希望しない事業所は収録されません。結果の type_code は 0 が大口事業所、1 が私書箱です。事業所用CSVの配布ページ・データ説明
MIT Licenseはこのリポジトリのコードに適用します。
Available Tools
3 toolslookup_business_postal_codeBRead-onlyIdempotent
Find entries for a Japan Post individual business or post office box postal code.
Inputs: postal_code (required). Returns: object
lookup_postal_codeBRead-onlyIdempotent
Find every town-area entry for a seven-digit Japan Post address postal code.
Inputs: postal_code (required). Returns: object
search_postal_codesBRead-onlyIdempotent
Find address postal codes by partial prefecture, municipality or town name.
Inputs: address (required), limit, offset, prefecture. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The forward search (name → code) versus reverse lookup (code → address) split is clear, and the business/PO-box lookup is described as a distinct code category. The only risk is that an agent must already know whether a given seven-digit code is a town-area or business/PO-box code to pick between the two lookup tools.
All three names follow a snake_case verb_noun pattern with a clear postal-code object, which is predictable. Minor deviation: 'search' vs 'lookup' verbs and singular/plural object ('search_postal_codes' vs 'lookup_postal_code'), but the intent remains readable.
Three tools is a tight, well-scoped surface for a narrow postal-code lookup domain, and each tool covers a genuinely different query direction or code category rather than duplicating functionality.
Both lookup directions (name → code, code → address) plus the business/PO-box variant are covered, which handles the core workflows. Minor gaps: no bulk/batch lookup, no prefecture listing for browsing, and no code-format validation or suggestion when a code is in the wrong category.
Maintenance
Related MCP Connectors
Resolve Japanese 〒 postcodes to prefecture, city and town.
日本の住所⇄郵便番号を変換。表記ゆれも吸収。Japan address ⇄ postal code, handles messy input. Free tier, no API key.
Normalize and romanize Japanese addresses, look up postal codes, count Japanese business days.
Normalize and verify Japanese postal addresses into structured fields for agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides Japanese postal code to address lookup functionality that can be integrated with AI assistants and other MCP clients.3MIT
- AlicenseAqualityDmaintenanceProvides access to Japanese statistical standard area codes (標準地域コード) from official government data, enabling users to list and search area codes by prefecture or municipality name.2Apache 2.0
- AlicenseBqualityDmaintenanceEnables searching Japanese addresses by 7-digit zip code using the zipcloud API.1ISC

jpzip MCP serverofficial
AlicenseAqualityDmaintenanceEnables to look up Japanese postal codes, convert zipcodes to addresses, search addresses by query, and list cities in a prefecture using the jpzip dataset.49 npmMIT