Skip to main content
Glama

Model Context Protocol (MCP) Server for Japanese Public Open Data (japan-data-mcp)

License: MIT MCP Standard Python Version RapidAPI Hub Smithery Verified Glama Quality

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

list_japan_datasets

query, limit

Search and list across 155 normalized Japanese public datasets in English or Japanese.

describe_japan_dataset

dataset_id

Inspect schema definitions, historical time-series range, primary sources, and sample rows.

search_japan_official_data

dataset_id, prefecture, municipality_code, corporate_number, q

Fast targeted search filtered by English/Japanese prefecture name, 5-digit JIS code, or 13-digit Corporate ID.

execute_japan_megabank_sql

sql

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 in procurement related to AI or cloud infrastructure."

  • "Look up Tokyo's Minato-ku and Shibuya-ku in demographics and compare their per capita taxable income and aging rate."

  • "Use execute_japan_megabank_sql to 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



โš ๏ธ 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 tools
describe_japan_datasetA
Read-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_sqlA
Read-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_bundlesA
Read-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_datasetsA
Read-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_dataA
Read-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

    A4.4/5.0

    Scored across 5 tools

    Disambiguation4/5

    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.

    Naming Consistency4/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityNo data
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A 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.
      19
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      An 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.
      23
      1
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      MCP server for searching Japanese government procurement notices via the Kanpou API. Enables LLMs to search by date, keyword, or detailed criteria.
      3
      1
      MIT