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, median, variance, quartiles, CV)cagr(orgrowth): Compound Annual Growth Rateyoy: Year-Over-Year growthtrend: Linear trend (slope, R², direction)anomaly: Latest-point anomaly detection (Z-score)correlation: Correlation between two series
- Examples:
analyze_stats(data_json=..., analysis_type="cagr")analyze_stats(analysis_type="correlation", data_json=[{...}], data_json_b=[{...}])- Or server-side fetch:
analyze_stats(analysis_type="correlation", indicator_code="CODE_A", indicator_code_b="CODE_B")
- Or server-side fetch:
generate_graph_code(data_payload, 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 - data_payload: JSON string or already-parsed list of records (e.g.,
[{"date": "2020-01", "value": 10}]). If omitted, usedata_uri. - Examples:
generate_graph_code(data_payload=[{"date": "2020-01", "value": 10}], graph_type="line", title="Unemployment Rate")generate_graph_code(data_uri=..., graph_type="line", title="Unemployment Rate")
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 .
Metadata
Release files for e-stat-dashboard-mcp 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| e_stat_dashboard_mcp-0.1.3.tar.gz | 26.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| e_stat_dashboard_mcp-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.2 kB
Release files / e_stat_dashboard_mcp-0.1.3.tar.gz
| Download URL | e_stat_dashboard_mcp-0.1.3.tar.gz |
|---|---|
| Size | 26.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e13596170994fcd2cdf9c8ac81fb816c01acfc9201d8b36bc0d118f6cac587e7
|
|
BLAKE2b-256 checksum How to use checksums |
06f3b536562096d2b7b03891b40a50af39e3f6e10b9bc372c19191ff0945e6de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 10, 2026.
Transparency logRelease files / e_stat_dashboard_mcp-0.1.3-py3-none-any.whl
| Download URL | e_stat_dashboard_mcp-0.1.3-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f8c40164ba89080872728976d2b0f1a952b20aeeb27e503971aec4daafa53e2d
|
|
BLAKE2b-256 checksum How to use checksums |
4ad6414879046d2dc88ceacde71bbc47240b74ec0fa84461da09e25d1da94300
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 10, 2026.
Transparency log