japan-data-mcp
Summary: japan-data-mcp connects AI agents to 155 normalized Japanese government open datasets, letting you discover, inspect, search, and analytically query them via MCP tools.
Discover datasets (
list_japan_datasets): keyword-search the 155-dataset catalog (English or Japanese) for dataset IDs, titles, record counts, and coverage years.Inspect schemas (
describe_japan_dataset): get exact columns, data types, historical time range, source ministry, and a sanitized sample record.Fetch filtered records (
search_japan_official_data): single-table lookups filtered by prefecture (romaji/kanji), 5-digit JIS municipality code, 13-digit corporate number, or free-text keyword, combined with AND.Run cross-dataset analytics (
execute_japan_megabank_sql): read-only DuckDB SELECT queries over 10.16M+ records with GROUP BY, SUM/AVG, and multi-table JOINs (requires MEGA tier or local DB).Browse B2B bundles (
list_flagship_b2b_bundles): 5 enterprise all-in-one ZIP packages with dataset counts, records, JPY pricing, discounts, and invoice availability.Covered domains: procurement (GEPS), corporate tax registry, land valuation, healthcare/senior care, demographics & municipal finance, and GHG emissions.
Safe by design: all tools are read-only, idempotent, non-destructive; access via RapidAPI key (free BASIC tier up to MEGA).
Connects to the Japan Official Data Megabank API on RapidAPI, enabling AI agents to search, describe, and query Japanese public open datasets (procurement, corporate registry, land valuation, healthcare, demographics, GHG emissions) through RapidAPI endpoints.
Model Context Protocol (MCP) Server for Japanese Public Open Data (japan-data-mcp)
Model Context Protocol (MCP) Server for Japanese Public Open Data (maintained independently by Japan Open Data Lab).
Connect Claude Desktop, Cursor, Windsurf, Cline, and LangChain agents directly to clean, standardized Japanese government open data.
Quick Start (Claude Desktop / Cursor)
Option 1: Direct Run via Python (Zero Dependencies)
Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"japan-data-mcp": {
"command": "python",
"args": ["-m", "server"],
"env": {
"RAPIDAPI_KEY": "YOUR_RAPIDAPI_KEY_HERE"
}
}
}
}Option 2: Run in Cursor IDE
Add to .cursor/mcp.json:
{
"mcpServers": {
"japan-data-mcp": {
"command": "python server.py",
"env": {
"RAPIDAPI_KEY": "YOUR_RAPIDAPI_KEY_HERE"
}
}
}
}Related MCP server: ontario-data-mcp
๐ ๏ธ Available MCP Tools
Tool Name | Parameters | Description |
|
| Search and list across 155 normalized Japanese public datasets in English or Japanese. |
|
| Inspect schema definitions, historical time-series range, primary sources, and sample rows. |
|
| Fast targeted search filtered by English/Japanese prefecture name, 5-digit JIS code, or 13-digit Corporate ID. |
|
| Execute multi-table in-memory analytical DuckDB SQL queries across datasets (MEGA tier / local). |
๐ก Example Prompts to Ask Your AI Agent
Once connected, your AI assistant can execute prompts like:
"Using
search_japan_official_data, find the top 5 central government tender awards inprocurementrelated to AI or cloud infrastructure.""Look up Tokyo's Minato-ku and Shibuya-ku in
demographicsand compare their per capita taxable income and aging rate.""Use
execute_japan_megabank_sqlto calculate the total public procurement amount won by company with corporate_number '1010001008844'.""Find all hospitals with more than 300 beds in Osaka from
medical."
๐ฆ Data Domains Covered
Government Procurement (GEPS): 2020โ2026 Nationwide central ministry contract awards (100% electronic disclosure archive).
Corporate Tax Registry: Nationwide registered commercial entities (13-digit NTA key, zero PII).
Land Valuation Benchmark (MLIT): 1983โ2026 (44-year archive) official land price points.
Healthcare & Senior Care: 220,000+ hospitals/clinics and 250,000+ nursing care welfare facilities.
Demographics & Public Finance: All 1,741 Japanese municipalities (taxable income, population, aging).
GHG Emissions: Mandatory industrial emission disclosures from Ministry of the Environment.
๐ Authentication & API Access
This MCP server connects to the live Japan Official Data Megabank API on RapidAPI.
BASIC Tier: Free ($0/mo, 50 requests/mo) for testing and development.
PRO / ULTRA / MEGA Tiers: High-volume quotas, 40+ year archives, and direct multi-table DuckDB SQL execution.
Get your API key at: RapidAPI Hub
๐ Related Ecosystem Resources
๐ Interactive Google Colab Recipe (3 Minutes): Query sample Parquet datasets in browser via DuckDB.
๐ Python SDK & Starter Kit: Official client library and automated cross-domain analytics.
๐ค Hugging Face Showcase Dataset: Free downloadable Parquet samples across 7 major domains.
โ ๏ธ Disclaimer & Attribution
Independent Project: This MCP server is developed and maintained independently by Japan Open Data Lab.
Not Government Affiliated: This project is not endorsed by, operated by, or affiliated with the Government of Japan or any public ministry.
Source Attribution: All underlying public domain/CC BY data is cited with full attribution to original government ministries pursuant to the Government of Japan Standard Terms of Use (Version 2.0).
๐ License & Attribution
MCP Server Code: MIT License
Source Data: Government of Japan Standard Terms of Use v2.0 (CC BY 4.0 compatible).
Maintained by: Japan Open Data Lab (
japan.opendata.lab@gmail.com)
Available Tools
5 toolsdescribe_japan_datasetARead-onlyIdempotent
Retrieve the exact column schema, data types, historical coverage range, primary government ministry source, and a representative sample record (including English 'prefecture_en' and 'city_en') for a single dataset. WHEN TO USE: Call this after 'list_japan_datasets' and before 'execute_japan_megabank_sql' or 'search_japan_official_data' to verify exact column names and data formats. WHEN NOT TO USE: Do not use this to search or filter multiple records (use 'search_japan_official_data' for filtered rows or 'execute_japan_megabank_sql' for aggregations).
Inputs: dataset_id (required). Returns: schema, dataset_id, sample_record
execute_japan_megabank_sqlARead-onlyIdempotent
Execute a read-only DuckDB SQL SELECT query across all 155 mounted datasets (10.16M+ records). Enables complex aggregations (COUNT, SUM, AVG, GROUP BY) and multi-table JOINs using 'municipality_code' (5-digit JIS code) or 'corporate_number' (13-digit ID). Enforces AST validation (single SELECT only, max 10,000 rows). PREREQUISITE: Requires a MEGA tier subscription on RapidAPI or local database access; always call 'describe_japan_dataset' first to confirm table and column names. WHEN NOT TO USE: Do not use for simple single-table keyword or prefecture lookups (use 'search_japan_official_data' instead, which works on all tiers including BASIC) or for browsing available tables (use 'list_japan_datasets').
Inputs: sql (required). Returns: rows, columns, row_count
list_flagship_b2b_bundlesARead-onlyIdempotent
List the 5 Flagship Enterprise All-in-One Data Bundles (BUNDLE-01 Real Estate, BUNDLE-02 Government Procurement, BUNDLE-03 Healthcare, BUNDLE-04 Renewable Energy/GX, BUNDLE-05 Municipal Finance/Resilience) with included dataset counts, total records, JPY pricing, discount rates, and qualified B2B invoice availability. WHEN TO USE: Use only when the user asks about bulk downloadable ZIP packages, enterprise pricing, or B2B invoice options. WHEN NOT TO USE: Do not use for listing individual API datasets (use 'list_japan_datasets') or querying actual data records (use 'search_japan_official_data').
Inputs: bundle_code. Returns: total, bundles
list_japan_datasetsARead-onlyIdempotent
Discover and list available dataset IDs, titles, record counts, and coverage years across all 155 official Japanese datasets in Japan Official Data Megabank (demographics, real_estate, procurement, companies, medical, renewable_energy, grid_capacity, etc.). WHEN TO USE: Call this tool first when you do not know the exact 'dataset_id' to query. NEXT STEP: Pass a discovered 'dataset_id' to 'describe_japan_dataset' to inspect columns, or directly to 'search_japan_official_data' to fetch rows. WHEN NOT TO USE: Do not use this tool to fetch actual data rows (use 'search_japan_official_data' instead) or B2B bulk product bundles (use 'list_flagship_b2b_bundles').
Inputs: limit, query. Returns: total, datasets
search_japan_official_dataARead-onlyIdempotent
Fetch and filter actual data records from a single dataset using standardized parameters (prefecture name, 5-digit JIS municipality code, 13-digit corporate number, or free-text keyword). Multiple filters are combined using logical AND. WHEN TO USE: Use for fast, single-table record lookups and filtered sampling once you know the 'dataset_id'. WHEN NOT TO USE: Do not use for discovering dataset IDs (use 'list_japan_datasets'), inspecting column schemas (use 'describe_japan_dataset'), or performing cross-table JOINs and GROUP BY aggregations (use 'execute_japan_megabank_sql').
Inputs: dataset_id (required), q, limit, prefecture, +2 more. Returns: count, records
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 5 tools
Each tool has a clearly distinct role (discover datasets, inspect schema, fetch rows, run SQL, list B2B bundles), and descriptions explicitly cross-reference WHEN NOT TO USE. The only mild overlap is between search_japan_official_data and execute_japan_megabank_sql, since both retrieve records, but the simple-lookup vs JOIN/aggregation boundary is well delineated.
All names follow a consistent snake_case verb_noun pattern (list_*, describe_*, search_*, execute_*). Minor inconsistency in the domain qualifier used (japan, japan_official, japan_megabank, flagship_b2b) and singular/plural switch between describe_japan_dataset and list_japan_datasets, but the convention is still predictable.
Five tools is well-scoped for a data-discovery-and-query server, and each earns its place covering a distinct stage of the workflow. No redundant or trivial tools, and nothing feels artificially padded.
The read-only lifecycle is well covered: discover datasets, inspect schema, fetch rows, run cross-table SQL, plus a B2B bundle listing. The main gap is the absence of an export/download or bundle-purchase action, but for a read-only query surface the coverage is essentially complete.
Maintenance
Related MCP Connectors
MCP server for Japan geodata: cadastral lot numbers (chiban) and reverse geocoding, for AI agents.
An MCP server that audits the fairness of construction and renovation estimates in Japan. Provides fair-price ranges, overcharge detection, and verifiable unit-cost data based on JCCDB (65,520 items across 402 categories, CC BY 4.0, DOI-backed).
Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.
Japanese law, corporation & statistics data as MCP, normalized to English with source attribution.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server implementation that connects AI assistants to DuckDB, enabling them to query and analyze data from various sources including CSV, Parquet, JSON, and cloud storage through SQL.19MIT
- AlicenseAqualityCmaintenanceAn MCP server for discovering, downloading, querying, and analyzing datasets from Ontario's open data portals, allowing natural language questions and high-performance analytics via DuckDB.231MIT
- AlicenseBqualityDmaintenanceMCP server for accessing Japanese government statistics portal 'e-Stat' API, enabling language models to search and retrieve statistical data.521MIT
- AlicenseBqualityDmaintenanceMCP server for searching Japanese government procurement notices via the Kanpou API. Enables LLMs to search by date, keyword, or detailed criteria.31MIT