Skip to main content

Add your description here

Project description

e-Stat Dashboard MCP Server

An MCP (Model Context Protocol) server to interact with the e-Stat Dashboard API, providing Japanese statistical data to LLMs.

Installation

Prerequisites:

  • Python 3.10+
  • uv (recommended)
uv sync

Running the Server

uv run python -m e_stat_dashboard_mcp.server

Or via MCP Inspector:

npx @modelcontextprotocol/inspector uv run python -m e_stat_dashboard_mcp.server

Tools

search_indicators(keyword: str) -> str

Search for statistical indicators.

  • Example: search_indicators(keyword="失業率")
  • Returns a Markdown list of matching indicators with codes.

get_stats_data(indicator_code: str, from_date: str = None, to_date: str = None, cycle: str = None) -> str

Get statistical data for a specific indicator.

  • Example: get_stats_data(indicator_code="0301010000020020010", from_date="20230100")
  • Returns a JSON string of flattened data points.

analyze_stats(data_json: str, analysis_type: str) -> str

Analyze the retrieved data.

  • Types:
    • summary: Basic stats (mean, max, min, etc.)
    • cagr (or growth): Compound Annual Growth Rate
    • yoy: Year-Over-Year growth
  • Example: analyze_stats(data_json=..., analysis_type="cagr")

generate_graph_code(data_payload: str, graph_type: str, title: str, x_label: str = "Date", y_label: str = "Value") -> str

Generate Python code to visualize data using Matplotlib (with Japanese font support).

  • Types: line, bar, scatter
  • Example: generate_graph_code(data_payload=..., graph_type="line", title="Unemployment Rate", y_label="Percentage")

list_regions(parent_region_code: str = None) -> str

List regions (Prefectures, etc).

  • Example: list_regions(parent_region_code="00000") (Lists prefectures)

Configuration

Environment variables can be set in .env or passed directly. Prefix is ESTAT_.

Variable Default Description
ESTAT_API_BASE_URL https://dashboard.e-stat.go.jp/api/1.0/Json API Endpoint
ESTAT_LANG JP Language

Development

Run tests:

uv run pytest

Run linter:

uv run ruff check .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

e_stat_dashboard_mcp-0.1.0.tar.gz (133.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

e_stat_dashboard_mcp-0.1.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file e_stat_dashboard_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: e_stat_dashboard_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 133.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for e_stat_dashboard_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9312e1f463b0f7597a54661e2058cbc3699b38d6ad3630c0d17cb053e7f10bd7
MD5 82a54b4f5893a6b921edcad7c3986709
BLAKE2b-256 3aadf2f20c32cf5deee71279d286624ac023723d011423adff755e63899fde50

See more details on using hashes here.

Provenance

The following attestation bundles were made for e_stat_dashboard_mcp-0.1.0.tar.gz:

Publisher: release.yml on takurot/e-stat-dashboard-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file e_stat_dashboard_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for e_stat_dashboard_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ac22cc4ef98626a05f94ead1f8be513fc8351affc80956bdd8a68e6c97b84ee
MD5 b9fec6973446c5e47e86f81a2c69a042
BLAKE2b-256 29659a769336539bd3cb4b5cf8297b0896a1158cb37254be761d0b117652d50b

See more details on using hashes here.

Provenance

The following attestation bundles were made for e_stat_dashboard_mcp-0.1.0-py3-none-any.whl:

Publisher: release.yml on takurot/e-stat-dashboard-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page