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 & Usage
Using uv (Recommended)
You can run the server directly without installing it using uvx:
uvx e-stat-dashboard-mcp
via Claude Desktop config
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"e-stat-dashboard": {
"command": "uvx",
"args": ["e-stat-dashboard-mcp"]
}
}
}
Manual Installation (pip)
pip install e-stat-dashboard-mcp
python -m e_stat_dashboard_mcp.server
Local Development
Clone the repository and install dependencies:
git clone https://github.com/takurot/e-stat-dashboard-mcp.git
cd e-stat-dashboard-mcp
uv sync
Running the Server (Local)
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(orgrowth): Compound Annual Growth Rateyoy: 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file e_stat_dashboard_mcp-0.1.2.tar.gz.
File metadata
- Download URL: e_stat_dashboard_mcp-0.1.2.tar.gz
- Upload date:
- Size: 134.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
255cb4cb813258f4fe6228bb284d0453d2a00899271d06855f2216807bdbefa9
|
|
| MD5 |
0fa08c4cf19f5705f35833d958d5f0e1
|
|
| BLAKE2b-256 |
4cae62a528d68164b0d4852378ef283b681d7287097714800471493555bffae9
|
Provenance
The following attestation bundles were made for e_stat_dashboard_mcp-0.1.2.tar.gz:
Publisher:
release.yml on takurot/e-stat-dashboard-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
e_stat_dashboard_mcp-0.1.2.tar.gz -
Subject digest:
255cb4cb813258f4fe6228bb284d0453d2a00899271d06855f2216807bdbefa9 - Sigstore transparency entry: 813116097
- Sigstore integration time:
-
Permalink:
takurot/e-stat-dashboard-mcp@abef37a584a064e0237f8c0427e2052a037589bc -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/takurot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@abef37a584a064e0237f8c0427e2052a037589bc -
Trigger Event:
release
-
Statement type:
File details
Details for the file e_stat_dashboard_mcp-0.1.2-py3-none-any.whl.
File metadata
- Download URL: e_stat_dashboard_mcp-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2210967f89d791bf16d8385ccc1e32a7061e21c3b8db01861816300a3d388c3
|
|
| MD5 |
6273e245c61ed7ba609ed734fb2bf293
|
|
| BLAKE2b-256 |
02e018072db2cd482b155d9e2995d3c1215bdfb4926eaf857be96e1575fc5e68
|
Provenance
The following attestation bundles were made for e_stat_dashboard_mcp-0.1.2-py3-none-any.whl:
Publisher:
release.yml on takurot/e-stat-dashboard-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
e_stat_dashboard_mcp-0.1.2-py3-none-any.whl -
Subject digest:
b2210967f89d791bf16d8385ccc1e32a7061e21c3b8db01861816300a3d388c3 - Sigstore transparency entry: 813116099
- Sigstore integration time:
-
Permalink:
takurot/e-stat-dashboard-mcp@abef37a584a064e0237f8c0427e2052a037589bc -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/takurot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@abef37a584a064e0237f8c0427e2052a037589bc -
Trigger Event:
release
-
Statement type: