eurostat-mcp
A Model Context Protocol (MCP) server that provides tools to query Eurostat APIs for European statistics data.
README
Eurostat MCP Server
A Model Context Protocol (MCP) server that provides tools to query Eurostat APIs for European statistics data.
Features
- Search datasets - Find Eurostat datasets by keyword
- Query data - Retrieve data with flexible filtering options
- Export to CSV - Save data locally for further analysis
- Support for both APIs:
- SDMX 3.0 API for regular datasets (GDP, unemployment, population, etc.)
- SDMX 2.1 Comext API for trade/production datasets (DS-prefixed)
Available Tools
| Tool | Description |
|---|---|
search_datasets |
Search for datasets by keyword |
get_dataset_info |
Get metadata and dimensions for a dataset |
query_eurostat_data |
Query data with filters (geo, time, etc.) |
get_available_values |
List valid values for a dimension |
list_popular_datasets |
Show commonly used datasets by category |
export_to_csv |
Export data to a local CSV file |
export_multiple_datasets |
Batch export multiple datasets |
Installation
Prerequisites
- Python 3.10 or higher
- uv (recommended) or pip
Install with uv (recommended)
# Clone the repository
git clone https://github.com/YOUR_USERNAME/eurostat-mcp.git
cd eurostat-mcp
# Install dependencies
uv pip install -r requirements.txt
Install with pip
# Clone the repository
git clone https://github.com/YOUR_USERNAME/eurostat-mcp.git
cd eurostat-mcp
# Create virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
Configuration
Claude Desktop
Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"eurostat": {
"command": "uv",
"args": [
"--directory",
"/path/to/eurostat-mcp",
"run",
"server.py"
]
}
}
}
Or with Python directly:
{
"mcpServers": {
"eurostat": {
"command": "python",
"args": ["/path/to/eurostat-mcp/server.py"]
}
}
}
Claude Code (CLI)
Add to your Claude Code settings (.claude/settings.json in your project or ~/.claude/settings.json globally):
{
"mcpServers": {
"eurostat": {
"command": "python",
"args": ["/path/to/eurostat-mcp/server.py"]
}
}
}
Usage Examples
Search for datasets
Search for GDP datasets
→ search_datasets("GDP")
Query unemployment data
Get monthly unemployment rate for Germany and France in 2024
→ query_eurostat_data(
dataset_id="UNE_RT_M",
geo="DE+FR",
time_period="ge:2024"
)
Query international trade data (Comext)
Get German exports to China in 2024
→ query_eurostat_data(
dataset_id="DS-059341",
filters="REPORTER=DE&PARTNER=CN&FLOW=2",
time_period="2024"
)
Export data to CSV
Export GDP data for EU countries
→ export_to_csv(
dataset_id="NAMA_10_GDP",
output_path="data/gdp_eu.csv",
geo="EU27_2020",
time_period="ge:2015"
)
Popular Datasets
Economic
NAMA_10_GDP- GDP and main componentsNAMQ_10_GDP- Quarterly GDP
Labour Market
UNE_RT_M- Monthly unemployment rateUNE_RT_A- Annual unemployment rateLFSI_EMP_A- Employment rates
Population
DEMO_PJAN- Population on 1 JanuaryDEMO_GIND- Population change
Prices
PRC_HICP_MANR- Monthly inflation rates (HICP)
International Trade (Comext)
DS-059341- Trade by HS2-4-6 product codesDS-059331- Trade by SITC codes
Business Surveys
ei_bsin_q_r2- Industry survey results (quarterly)ei_bsin_m_r2- Industry confidence indicator (monthly)
Note: DS-prefixed datasets (Comext/Prodcom) require heavy filtering due to their size. Always specify REPORTER, PARTNER, PRODUCT, or other filters.
API Reference
This server uses the official Eurostat APIs:
Troubleshooting
"Data too large" error
Apply more filters to reduce the data size:
- Add
geoparameter for specific countries - Add
time_periodfor date ranges - For Comext datasets, specify
REPORTER,PARTNER,PRODUCT,FLOW
Timeout errors
Large datasets may timeout. Try:
- Using
last_n_observationsto limit results - Adding more specific filters
- Using
export_to_csvfor large extractions
Dataset not found
Use search_datasets() to find the correct dataset ID, or list_popular_datasets() to browse common datasets.
License
MIT License - see LICENSE file.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Acknowledgments
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。