ajtgjmdjp/estat-mcp
Free日本政府统计门户 [e-Stat](https://www.e-stat.go.jp/) 的 MCP 服务器。搜索和获取人口、GDP、CPI、劳动、贸易等 3,000+ 统计表。
FreeFree tier
About ajtgjmdjp/estat-mcp
e-Stat (政府統計の総合窓口) API client and MCP server for Japanese government statistics. Provides programmatic access to over 3,000 statistical tables covering population, economy, prices, labor, agriculture, and regional data. Supports keyword search, metadata retrieval (table structure, time periods, areas), and data fetching with automatic pagination. Features type-safe Pydantic models with Polars/pandas DataFrame export, built-in rate limiting, and a 4-tool MCP server for AI assistants like Claude Desktop. Includes a CLI for quick queries and testing.
Key Features
Search statistics by keyword (人口, GDP, CPI, etc.)
Retrieve metadata to understand table structure (表章事項, 分類事項, 時間軸, 地域)
Fetch statistical data with automatic pagination for large datasets
Type-safe Pydantic models with Polars/pandas DataFrame export
Built-in rate limiting for API compliance
MCP server with 4 tools: search_statistics, get_statistic_meta, get_statistic_data, get_all_statistic_data
CLI for testing, searching, and fetching data
Pros & Cons
Pros
- Free and open-source (MIT license)
- Comprehensive coverage of Japanese government statistics (3,000+ tables)
- Integrates seamlessly with AI tools via MCP protocol
- Python async client and CLI for flexible usage
- Automatic pagination and rate limiting for large data fetches
- DataFrame export for easy analysis (Polars/pandas)
Cons
- Requires a free API key from e-Stat to use
- Limited to Japanese official statistics only
- Documentation primarily in Japanese (README offers some English)
- Dependency on e-Stat API availability and rate limits
Best For
Querying Japanese official statistics via AI assistants (Claude Desktop, Cursor)Analyzing population, economic, and price trends in Python with DataFrame exportAutomating statistical data retrieval for dashboards or reportsEducational use for learning about Japan's socioeconomic indicators
FAQ
What is estat-mcp?
estat-mcp is an open-source API client and MCP server that provides programmatic access to Japan's e-Stat portal, which hosts over 3,000 official statistical tables.
How do I get started?
Install via pip ('estat-mcp'), get a free API key from e-Stat, set the ESTAT_APP_ID environment variable, and then use the Python API or CLI.
Can I use this with Claude Desktop?
Yes, estat-mcp includes an MCP server that can be added to Claude Desktop's configuration. Then you can ask Claude questions like '日本の人口統計を教えて'.
What data can I access?
You can search and fetch statistical data on population, economy, prices (CPI), labor, trade, agriculture, and regional data from over 3,000 tables.
Is there a CLI?
Yes, the package includes a CLI with commands for testing connectivity, searching statistics, fetching data, and starting the MCP server.