home / mcp / e-stat mcp server
Provides access to e-Stat statistics via MCP tools for searching, metadata, data retrieval, and data catalog queries.
Configuration
View docs{
"mcpServers": {
"koizumikento-e-stats-mcp": {
"command": "e-stats-mcp",
"args": [],
"env": {
"E_STAT_APP_ID": "your-app-id"
}
}
}
}The e-Stat MCP Server lets you query and retrieve statistics from the e-Stat API, including table search, metadata, data extraction, and data catalog information. It exposes a set of tools that you can invoke from an MCP client to perform targeted searches, fetch data in JSON or CSV, manage datasets, and explore data catalogs. This server family is designed to integrate with your MCP workflow so you can automate statistical data retrieval in your applications.
Set up the MCP server in your environment and run it through your MCP client. You will access tools to search statistics, fetch table metadata, obtain actual data, post and reference datasets, and retrieve data catalog information. Each tool accepts structured arguments such as keywords, survey years, data IDs, and dataset parameters. You can combine multiple tools in scripts to build automated data retrieval pipelines for reporting, analysis, or data curation tasks.
Common usage patterns include: performing keyword searches for statistics, retrieving CSV data for offline processing, obtaining detailed metadata for tables, downloading specific statistics datasets, and registering or referencing datasets for later reuse. Your MCP client will expose tools with clearly named endpoints like search_stats_by_keyword, get_stats_list, get_stats_data, post_dataset, and get_data_catalog to cover these tasks.
Prerequisites you need before installing the MCP server: a runtime environment with the MCP tooling installed (uv or uvx) and Git for cloning repositories when needed.
export PATH="$PATH:/path/to/uv/bin" # ensure uv is on your PATH
# Install the MCP server package from its source
uv tool install git+https://github.com/koizumikento/e-stats-mcp.git
# Or install locally by cloning the repository and syncing
git clone https://github.com/koizumikento/e-stats-mcp.git
cd e-stats-mcp
uv sync
# Note: You will need to configure your application ID as described in the configuration steps.Application ID to use the e-Stat API To access the e-Stat API, you must provide an Application ID. Obtain it by registering, logging in, and generating an application key on the e-Stat API portal.
Set the Application ID in your environment
``
export E_STAT_APP_ID="your-app-id"
``
MCP server configuration for the Claude Desktop client The MCP server can be added to Claude Desktop for easy management. Use the following configuration snippet to register the server in Claude’s config.
{
"mcpServers": {
"e-stats-mcp": {
"command": "e-stats-mcp",
"env": {
"E_STAT_APP_ID": "your-app-id"
}
}
}
}Alternative direct-from-GitHub and local development configurations are provided to run the MCP server via UVX or UV. Use one of these depending on your setup.
{
"mcpServers": {
"e-stats-mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/koizumikento/e-stats-mcp.git",
"e-stats-mcp"
],
"env": {
"E_STAT_APP_ID": "your-app-id"
}
}
}
}{
"mcpServers": {
"e-stats-mcp": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/e-stats-mcp",
"e-stats-mcp"
],
"env": {
"E_STAT_APP_ID": "your-app-id"
}
}
}
}Cursor-based project configuration mirrors the same approach and enables integration at the project level. You add a mcp.json in your project’s cursor folder with the same command structure used above to run the MCP server.
{
"mcpServers": {
"e-stats-mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/koizumikento/e-stats-mcp.git",
"e-stats-mcp"
],
"env": {
"E_STAT_APP_ID": "your-app-id"
}
}
}
}If you encounter issues connecting to the e-Stat API, verify that your Application ID is correct and that your network can reach the API endpoint. Ensure the environment variable E_STAT_APP_ID is exported in the shell that launches the MCP client.
When running locally, confirm that you are in the correct project directory and that the uv or uvx runtime is properly installed and available in your PATH. If you use a JSON config, verify that the JSON structure follows the exact examples shown to avoid parsing errors.
The server exposes a comprehensive set of tools to cover common data access tasks. You can search statistics, fetch metadata, retrieve statistics data, manage datasets, and explore data catalogs.
Search for statistics table information and fetch results in JSON or CSV.
Retrieve statistics table information as CSV format for easy processing.
Quick keyword search to find relevant statistics tables.
Fetch metadata information for a specific statistics table.
Retrieve metadata information in CSV format.
Obtain actual statistics data by ID with optional limits.
Fetch statistics data in CSV format.
Retrieve multiple statistics datasets in a single call.
Register a new dataset with specified conditions and metadata.
Reference an existing dataset by ID.
Obtain data catalog information in JSON or CSV.
Retrieve data catalog information as CSV.
List of statistic field codes for different domains.