eurostat-mcp
eurostat-mcp
Serveur MCP d'accès aux données Eurostat, conçu pour des modèles locaux (testé pour Qwen3.8-27B) : 4 tools, schémas étroits, validation côté serveur, sorties compactées.
Architecture
Modèle (Qwen3.8-27B via vLLM / llama.cpp + harness MCP)
│ tool calls
▼
server.py 4 tools : search_datasets, get_structure, list_codes, query_data
│ validation DSD + suggestions difflib + plafond 400 cellules
▼
store.py SQLite : catalogue en FTS5 (TTL 24h), structures DSD (TTL 24h)
▼
eurostat_client.py API dissémination Eurostat (catalogue TSV + Statistics JSON-stat)Le modèle ne construit jamais d'URL SDMX. Toute requête passe par
query_data, qui valide dimensions et codes contre le DSD en cache et
renvoie des erreurs actionnables (Code 'FRA' inconnu. Vouliez-vous : FR ?).
Related MCP server: DuckDB Eurostat MCP Server
Installation
pip install "mcp>=1.2" httpx pyarrow duckdb # SDK mcp 1.x et 2.x
python -m territorial_mcp.server # stdio
MCP_TRANSPORT=http python -m territorial_mcp.server # streamable HTTPConfig client MCP (stdio) :
{
"mcpServers": {
"eurostat": {
"command": "python",
"args": ["-m", "territorial_mcp.server"],
"cwd": "/chemin/vers/eurostat-mcp"
}
}
}Séquence type côté modèle
search_datasets("GDP quarterly")→ codes candidatsget_structure("namq_10_gdp")→ dimensions, codes tronquéslist_codes("namq_10_gdp", "geo", contains="fr")si besoinquery_data("namq_10_gdp", {"geo": "FR+BE", "na_item": "B1GQ", "unit": "CP_MEUR"}, time_from="2022")
Note pour Qwen3.8-27B : forcer un niveau de raisonnement moyen/bas
(le défaut xhigh sur-réfléchit les enchaînements de tools simples).
Mode offline total
# 1. (en ligne) construire le miroir — TOC-driven, idempotent
python -m territorial_mcp.mirror --datasets nama_10_gdp,une_rt_m
python -m territorial_mcp.mirror --all # tout le catalogue, ~24 Go compressés
python -m territorial_mcp.mirror --resync # cron quotidien : ne retélécharge
# que ce que le TOC signale comme modifié
# 2. (hors ligne) servir uniquement depuis le miroir + caches
EUROSTAT_OFFLINE=1 python -m territorial_mcp.serverDonnées : Parquet zstd long format (dims, time, value, flag), un fichier par dataset, interrogé par DuckDB.
query_datasert le miroir en priorité même hors mode offline, et affiche la date des données ("miroir local, données Eurostat du JJ.MM.AAAA").Structures + catalogue : mis à jour à chaque sync, servis sans TTL en mode offline ; serve-stale-on-error quand Eurostat est injoignable.
L'invalidation est pilotée par les colonnes
last update of datadu TOC, pas par un TTL :--resyncne touche que les datasets modifiés.
Limites du squelette et évolutions
Recherche : FTS5/BM25 seul. Ajouter une recherche hybride avec embeddings (ex. bge-m3 dans sqlite-vec) pour les requêtes vagues.
Structures : récupérées via l'astuce
lastTimePeriod=1sur l'API Statistics. Pour les très gros datasets, basculer sur l'endpoint SDMX 2.1datastructure(XML) avec parsing dédié.Cache données : seules les structures sont cachées. Ajouter un cache des réponses
query_data(TTL 24h — Eurostat publie à 11h/23h).Agrégations : migrer store.py vers DuckDB pour offrir des agrégations côté serveur (moyennes, croissance) au lieu de renvoyer des données brutes au modèle.
HTTP multi-utilisateurs : ajouter auth (bearer) et rate limiting devant le transport streamable HTTP.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceExposes the Eurostat Statistics API, enabling LLMs to discover, explore, and retrieve official EU statistical data through search, dimension inspection, and data retrieval tools.2
- AlicenseNot gradedqualityCmaintenanceEnables querying Eurostat data using natural language, powered by DuckDB for optimized performance.MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying Eurostat statistical data through natural language or direct MCP tools, wrapping the Eurostat API without authentication.6MIT
- AlicenseNot gradedqualityCmaintenanceProvides access to European Central Bank statistical data through SDMX data flows, enabling querying and listing of data flows via natural language or direct tool calls.3MIT
Related MCP Connectors
Search and query the Eurostat catalogue — EU economy, demography, trade, and NUTS regional data.
Eurostat MCP — wraps Eurostat Statistical Data API (no auth required)
Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/scampion/nutshell-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server