ISTAT MCP Server

v1.0.0Search & Data Extractionstable

MCP server to query Italian statistics (ISTAT) via SDMX API — compatible with any MCP client

aiclaudedataistatitaly
Share:
15
Stars
0
Downloads
0
Weekly
0/5

What is ISTAT MCP Server?

ISTAT MCP Server is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server to query italian statistics (istat) via sdmx api — compatible with any mcp client

MCP server to query Italian statistics (ISTAT) via SDMX API — compatible with any MCP client

This server falls under the Search & Data Extraction category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • MCP server to query Italian statistics (ISTAT) via SDMX API

Use Cases

Query Italian statistics via SDMX API
Access official government data
ondata

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 11, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx istat-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use ISTAT MCP Server

ISTAT MCP Server connects AI assistants to Italy's official national statistics via the ISTAT SDMX REST API, enabling natural-language queries against thousands of official datasets covering population, agriculture, economics, demographics, and regional data. It exposes eight tools for discovering dataflows by keyword, retrieving dimension structures and codelist values, fetching statistical data with precise filters, and resolving Italian territorial codes (regions, provinces, municipalities). Compatible with any MCP client, it is ideal for researchers, journalists, and policy analysts who need to explore and extract Italian government statistics without learning SDMX syntax.

Prerequisites

  • Python 3.9 or higher installed
  • uv package manager recommended (or pip with venv)
  • An MCP-capable client such as Claude Desktop or Claude Code
  • Internet access to reach esploradati.istat.it (no API key required)
1

Clone the repository

Clone the istat_mcp_server repository to your local machine.

git clone https://github.com/ondata/istat_mcp_server.git
cd istat_mcp_server
2

Install dependencies with uv (recommended)

Use uv to create a virtual environment and install all dependencies in one step.

uv sync
3

Install with pip (alternative)

If you prefer pip, create a virtual environment and install the package in editable mode.

python -m venv .venv
source .venv/bin/activate
pip install -e .
4

Optional: configure environment variables

Create a .env file to customize behavior. You can blacklist specific dataflows, adjust API timeouts, and set cache TTLs. The SDMX API enforces 3 requests per minute; the server auto-queues to respect this limit.

# .env (all optional)
LOG_LEVEL=INFO
MEMORY_CACHE_TTL_SECONDS=300
DATAFLOWS_CACHE_TTL_SECONDS=604800
OBSERVED_DATA_CACHE_TTL_SECONDS=86400
AVAILABLECONSTRAINT_TIMEOUT_SECONDS=180
# DATAFLOW_BLACKLIST=149_577_DF_DCSC_OROS_1_1
5

Configure Claude Desktop

Add the ISTAT MCP server to your Claude Desktop configuration file, pointing to your local clone.

{
  "mcpServers": {
    "istat": {
      "command": "python",
      "args": ["-m", "istat_mcp_server"],
      "cwd": "/path/to/istat_mcp_server"
    }
  }
}
6

Add via Claude Code CLI

Alternatively, register the server with Claude Code using the mcp add command.

claude mcp add istat -- python -m istat_mcp_server --cwd /path/to/istat_mcp_server

ISTAT MCP Server Examples

Client configuration

Configure Claude Desktop to run the ISTAT MCP server locally using Python.

{
  "mcpServers": {
    "istat": {
      "command": "python",
      "args": ["-m", "istat_mcp_server"],
      "cwd": "/path/to/istat_mcp_server",
      "env": {
        "LOG_LEVEL": "INFO",
        "MEMORY_CACHE_TTL_SECONDS": "300"
      }
    }
  }
}

Prompts to try

Use these prompts to explore Italian statistics through the ISTAT MCP server.

- "Show me all available dataflows about population in Italy"
- "Fetch population data for Italy from 2018 to 2023"
- "Get agricultural crop production data filtered by region Lombardia"
- "What are the available territorial codes for Italian provinces?"
- "Find dataflows related to unemployment and show me the latest figures"
- "Retrieve demographic statistics for the municipality of Rome"

Troubleshooting ISTAT MCP Server

SDMX API returns rate limit errors (429)

The ISTAT SDMX API allows only 3 requests per minute. The server auto-queues requests, but running multiple parallel queries may still trigger limits. Increase AVAILABLECONSTRAINT_TIMEOUT_SECONDS in .env and allow the queue to drain.

discover_dataflows returns no results

Try broader search terms in Italian (e.g., 'popolazione', 'agricoltura', 'lavoro'). The dataflow discovery searches dataset names and descriptions. Use get_cache_diagnostics to verify the dataflow list was cached successfully on first run.

get_data returns empty results despite valid dimension filters

First call get_constraints to see which dimension values are actually available. REF_AREA codes are ISTAT-specific (e.g., 'IT' for Italy, region codes like 'ITC1'); use get_territorial_codes to resolve the correct codes for your area of interest.

Frequently Asked Questions about ISTAT MCP Server

What is ISTAT MCP Server?

ISTAT MCP Server is a Model Context Protocol (MCP) server that mcp server to query italian statistics (istat) via sdmx api — compatible with any mcp client It connects AI assistants to external tools and data sources through a standardized interface.

How do I install ISTAT MCP Server?

Follow the installation instructions on the ISTAT MCP Server GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with ISTAT MCP Server?

ISTAT MCP Server works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is ISTAT MCP Server free to use?

Yes, ISTAT MCP Server is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Search & Data Extraction MCP Servers

Explore all search & data extraction servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "istat-mcp-server": { "command": "npx", "args": ["-y", "istat-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use ISTAT MCP Server?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides