Japan Data
БесплатноНе проверенEnables AI agents to query Japanese public data (laws, corporations, statistics) from official government APIs, returning normalized English metadata with sourc
Описание
Enables AI agents to query Japanese public data (laws, corporations, statistics) from official government APIs, returning normalized English metadata with source attribution.
README
An MCP server that gives AI agents cross-source access to Japanese public data — law, corporations, and statistics — normalized to English metadata, with source attribution on every response.
Live endpoint: https://japan-data-mcp.netlify.app/mcp (MCP over Streamable HTTP) — hosted and free, no install, no API key for the law tools.
Most authoritative Japanese public-data APIs return Japanese-only fields, which is a barrier for non-Japanese agents and tools. This server queries the official government APIs and returns clean, English-labelled structured metadata, so an AI agent can identify and quote Japanese law/corporation/statistics data without reading Japanese. What makes it different:
- English-normalized metadata (law type, era, dates, categories) on every record — the original legal text stays authentic Japanese, never an unofficial translation.
- Mandatory source attribution on every response (Government of Japan Standard Terms of Use v2.0, National Tax Agency no-warranty note, e-Stat credit line) — safe to cite downstream.
- Hosted live endpoint — agents connect over HTTP; nothing to run locally.
- Relevance-ranked law search — combines e-Gov title search and full-text search, so a query like
個人情報保護returns the canonical Act first (the raw e-Gov API returns matches in law-number order, oldest first).
Connect
Claude Code:
claude mcp add --transport http japan-data https://japan-data-mcp.netlify.app/mcp
Claude Desktop / Cursor / any MCP client (Streamable HTTP):
{
"mcpServers": {
"japan-data": {
"type": "streamable-http",
"url": "https://japan-data-mcp.netlify.app/mcp"
}
}
}
Tools
| Tool | Upstream source | API key | Status |
|---|---|---|---|
search_japanese_law |
e-Gov Law API (title + full-text, relevance-ranked) | not required | Fully working (verified against the live API) |
get_law_text |
e-Gov Law Data API | not required | Fully working — whole law or a single article |
search_corporation |
Corporate Number Web-API (National Tax Agency) | requires appId |
Works with a key; without one, returns English registration guidance |
search_statistics |
e-Stat API (Statistics Bureau) | requires appId |
Same as above |
Typical agent flow — both steps need no key: search_japanese_law to identify the law, then get_law_text to quote its exact text.
Real examples (captured from the live endpoint)
1. Find the canonical law. search_japanese_law with {"keyword": "個人情報保護", "limit": 2} — note the top result is the Personal Information Protection Act itself, not the oldest law that merely mentions the phrase:
{
"query": "個人情報保護",
"title_match_count": 17,
"full_text_match_count": 694,
"order": "reranked: title matches first, weighted by law type (Act highest) and query coverage",
"results": [
{
"law_id": "415AC0000000057",
"law_number_ja": "平成十五年法律第五十七号",
"law_type": "Act (法律)",
"era": "Heisei",
"year": 15,
"promulgation_date": "2003-05-30",
"title_ja": "個人情報の保護に関する法律",
"title_reading_kana": "こじんじょうほうのほごにかんするほうりつ",
"revision_id": "415AC0000000057_20260624_508AC0000000046",
"match": "title"
}
],
"attribution": "Source: e-Gov Law Search API (Digital Agency, Japan). Government of Japan Standard Terms of Use v2.0. Original text is Japanese; English fields are normalized metadata, not an official translation."
}
2. Quote its exact text. get_law_text with {"law_id": "415AC0000000057", "article": "1"}:
{
"law_id": "415AC0000000057",
"title_ja": "個人情報の保護に関する法律",
"article": "1",
"text_ja": "(目的)\n第一条\nこの法律は、デジタル社会の進展に伴い個人情報の利用が著しく拡大していることに鑑み、個人情報の適正な取扱いに関し、基本理念及び政府による基本方針の作成その他の個人情報の保護に関する施策の基本となる事項を定め、(…)個人の権利利益を保護することを目的とする。",
"total_chars": 329,
"truncated": false,
"attribution": "Source: e-Gov Law Search API (Digital Agency, Japan). Government of Japan Standard Terms of Use v2.0. Original text is Japanese; English fields are normalized metadata, not an official translation."
}
(The second example is abbreviated at (…) for this README; the live response carries the full article text.)
Quick check from a shell:
curl -s https://japan-data-mcp.netlify.app/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_law_text","arguments":{"law_id":"321CONSTITUTION","article":"9"}}}'
A plain GET /mcp returns server info and the tool list (useful for liveness checks). Tool calls use JSON-RPC 2.0 over POST /mcp (initialize → tools/list → tools/call).
Usage transparency
Anonymous aggregate usage is public at /stats. No raw IPs or user agents are stored — clients are counted via salted hashes only.
Run locally
node test/local-test.mjs
ALL PASS means the MCP initialize / tools/list / tools/call respond, the law search returns the canonical Act first, and get_law_text extracts real article text from the live e-Gov API.
Deploy
The server is a Web-standard fetch handler (export default { fetch(request, env) }), so it runs on either platform:
- Netlify (current live deployment): a thin adapter in
netlify/functions/mcp.mjsexposes it at/mcpand records anonymous usage via Netlify Blobs. Deploy withnetlify deploy --prod. - Cloudflare Workers:
wrangler deploy(seewrangler.toml; telemetry is Netlify-only).
The two API keys are injected as environment variables (HOJIN_APP_ID, ESTAT_APP_ID); the law tools need no key, so the server is useful even without them. Get the keys from the Corporate Number Web-API and e-Stat API.
License
MIT
Установка Japan Data
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/yurukusa/japan-data-mcpFAQ
Japan Data MCP бесплатный?
Да, Japan Data MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Japan Data?
Нет, Japan Data работает без API-ключей и переменных окружения.
Japan Data — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить Japan Data в Claude Desktop, Claude Code или Cursor?
Открой Japan Data на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Japan Data with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
