Japan Data Mcp

io.github.IzyuusyaPublished by GitHub account Izyuusyav0.1.1Updated Oct 25, 2026

日本の公的データ(統計・法人・不動産)にAIからアクセスするMCPサーバー。e-Stat統計API・法人番号Web-API・不動産情報ライブラリAPIの3API統合。全国約1,700市区町村対応。

Overview

AI-generated overview

A local MCP server that gives an assistant access to Japanese public data: e-Stat statistics, corporate numbers, invoice registration and real estate prices.

What you can do
Search statistics tables and fetch regional data, population figures or a combined regional profile for a named area, with codes converted to readable names and sources cited. Compare several regions side by side in a pivot table and resolve place names to area codes. Search corporations by name or look up details by corporate number. Look up invoice registration numbers by company name and check registration status or validity on a given date. Retrieve real estate transaction prices for an area with a price summary.
When to use it
Useful when you need Japanese official statistics, company or invoice registration checks, or property transaction data for regional analysis and comparison, without knowing the underlying statistics table IDs.
Requirements
Runs locally as a Python package (uvx, uv or pip). An e-Stat application ID in ESTAT_APP_ID is required or the server will not start. Optional keys: CORP_APP_ID for the corporate number and invoice APIs, REALESTATE_API_KEY for real estate data. All keys are free to obtain; network access to the government APIs is needed.
Before you install
The server needs API credentials: ESTAT_APP_ID is mandatory, CORP_APP_ID and REALESTATE_API_KEY are optional. Keys are stored in a .env file or passed in the client configuration, so keep that file private. Queries and area or company names are sent to the Japanese government APIs. Output is reference data from those providers and is not guaranteed by them.

Installation

In SourceWeft

  1. Open Japan Data Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

japan-data-mcp

日本の地域分析・比較に特化した MCP(Model Context Protocol)サーバーです。

e-Stat(政府統計の総合窓口)、 国税庁 法人番号公表サイト、 国土交通省 不動産情報ライブラリ、 適格請求書発行事業者公表サイト の API を通じて 日本の公的データにアクセスし、人間が読みやすい形式に自動変換して返します。

[japan-data-mcp デモ: Claude Desktopで「札幌市の人口を教えて」と聞くと、出典付きデータが返る]

解説記事: e-Stat APIを100回叩いてわかった、政府データが宝の持ち腐れな件|DATA POPCORN

特徴

  • コード自動変換 — e-Stat が返すコード番号(13000 → 東京都)を名称に自動変換
  • 全国市区町村対応 — 47 都道府県 + 20 政令指定都市 + 全国約 1,700 市区町村に対応
  • 地域比較 — 複数地域のデータをピボットテーブルで並べて比較
  • プリセット分析 — 統計表 ID を知らなくても、地域名だけで人口データや地域プロファイルを取得
  • 法人検索 — 法人名から企業の法人番号・所在地・種別を検索
  • インボイス確認 — 会社名からインボイス登録番号を検索、登録状況・有効性を確認
  • 不動産取引価格 — 地域の不動産取引データと価格サマリーを取得
  • データ検証 — 全ての出力にデータ出典・検証リンク・取得日時を付与

提供ツール一覧

統計データ(e-Stat API)

ツール名説明
search_statisticsキーワードで統計表を検索
get_regional_data指定地域の統計データを取得(summary=True で最新データのみ)
compare_regions複数地域のデータを比較(ピボットテーブル)
get_meta_info統計表のメタ情報(分類コード体系)を確認
resolve_area地域名 → 地域コードを検索
list_available_stats統計分野コードの一覧を表示
get_population地域の人口データを自動取得(プリセット)
get_regional_profile地域の総合プロファイルを自動取得(プリセット)

法人情報(法人番号 Web-API)

ツール名説明
search_corporations法人名で企業を検索(地域・種別で絞り込み可)
get_corporation法人番号から企業の詳細情報を取得

インボイス(適格請求書発行事業者公表 Web-API)

ツール名説明
search_invoice_by_name会社名からインボイス登録番号を検索(法人のみ)
check_invoice_registration登録番号(T+13桁)でインボイス登録状況を確認
validate_invoice_on_date指定日時点でのインボイス登録有効性を確認

不動産取引(不動産情報ライブラリ API)

ツール名説明
get_real_estate_transactions不動産取引価格情報を取得(価格サマリー付き)

セットアップ

1. インストール

bash
# uv(推奨)uv add japan-data-mcp
# pippip install japan-data-mcp
# ソースからgit clone https://github.com/Izyuusya/japan-data-mcp.gitcd japan-data-mcpuv sync

2. APIキー設定

対話的セットアップコマンドで簡単に設定できます:

bash
japan-data-mcp setup

画面の案内に従って API キーを入力すると .env ファイルが自動生成されます。

必要なAPIキー
環境変数API必須取得先
ESTAT_APP_IDe-Stat API必須e-Stat API ガイド
CORP_APP_ID法人番号 Web-API任意法人番号公表サイト(発行まで2〜4週間)
REALESTATE_API_KEY不動産情報ライブラリ API任意不動産情報ライブラリ
  • e-Stat API は必須 です。未設定の場合サーバーが起動しません。
  • 法人番号・不動産 API は任意です。未設定でも他の機能は正常に動作します。
  • CORP_APP_ID はインボイスAPIでも共用されます(追加キー不要)。
  • 全て 無料 で取得できます。
手動設定する場合

プロジェクトルートに .env ファイルを作成:

ESTAT_APP_ID=あなたのアプリケーションIDCORP_APP_ID=あなたのアプリケーションIDREALESTATE_API_KEY=あなたのAPIキー

3. サーバー起動

bash
japan-data-mcp

Claude Desktop での設定

claude_desktop_config.json に以下を追加してください。

uv でインストールした場合

json
{  "mcpServers": {    "japan-data-mcp": {      "command": "uv",      "args": ["run", "japan-data-mcp"],      "env": {        "ESTAT_APP_ID": "あなたのアプリケーションID",        "CORP_APP_ID": "あなたのアプリケーションID(任意)",        "REALESTATE_API_KEY": "あなたのAPIキー(任意)"      }    }  }}

pip でインストールした場合

json
{  "mcpServers": {    "japan-data-mcp": {      "command": "japan-data-mcp",      "env": {        "ESTAT_APP_ID": "あなたのアプリケーションID",        "CORP_APP_ID": "あなたのアプリケーションID(任意)",        "REALESTATE_API_KEY": "あなたのAPIキー(任意)"      }    }  }}

ヒント: .env ファイルに設定済みの場合は env セクションを省略できます。

使用例

地域の人口データを取得する

get_population("札幌市")

複数地域を比較する

compare_regions(    stats_data_id="0003433219",    areas=["札幌市", "仙台市", "福岡市"])

法人を検索する

search_corporations("トヨタ", area="愛知県")

インボイス登録を確認する

search_invoice_by_name("トヨタ自動車", area="愛知県")

不動産取引価格を調べる

get_real_estate_transactions("札幌市", year=2023)

地域の総合プロファイルを取得する

get_regional_profile("東京都")

人口・経済・労働など複数分野のデータをまとめて取得し、1 つのレポートとして返します。

開発

bash
# 依存関係のインストールuv sync
# テスト実行uv run python -m pytest tests/ -v
# サーバーの直接起動uv run japan-data-mcp

出典

このプロジェクトは以下の API を利用しています:

このサービスは各 API 提供元のデータを利用していますが、サービスの内容は各機関によって保証されたものではありません。

ライセンス

MIT License

Source: README.md at commit 5e8a6ec

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts