eurostat-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@eurostat-mcp-serversearch for datasets on unemployment"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Public Hosted Server: https://eurostat.caseyjhand.com/mcp
Tools
6 tools for discovering and querying Eurostat statistical datasets, plus 2 more when the optional dataframe canvas is enabled:
Tool | Description |
| Search the Eurostat catalogue by keyword — returns codes, descriptions, period coverage, and theme breadcrumbs |
| Navigate the Eurostat theme hierarchy — list root themes or drill into subthemes and datasets |
| Fetch metadata for a dataset: dimensions with sample values, time range, observation count, and last-update date |
| List all valid codes for a specific dimension (e.g., all geo codes, all unit codes); supports NUTS hierarchy filtering |
| Fetch decoded statistical observations with dimension filters, NUTS geo-level, and time-range controls |
| Download a whole dataset through the SDMX 2.1 TSV bulk endpoint and stage every observation on the dataframe canvas |
| List the tables staged on a dataframe canvas with their row counts and column types — canvas only |
| Run a read-only SQL SELECT across staged tables — canvas only |
eurostat_search_datasets
Search the Eurostat dataset catalogue by keyword.
Tokenized keyword match — whitespace-separated tokens are ANDed case-insensitively across each dataset's label, theme breadcrumb, and code, so word order and theme-named queries resolve without a verbatim label
Returns code, label, type (dataset/table), period coverage, observation count, and theme breadcrumb
One row per dataset code — Eurostat files some datasets under several theme branches; matches are deduplicated so
totalMatchesand page slots count unique query targetsCursor pagination:
limit(1–100, default 20) sets the page size,totalMatchesreports the full count, and passing the returnednextCursorback ascursorpages through every match over a stable order. Cursors are bound to their originating query and catalogue snapshot — reusing one with a different query, or after the catalogue refreshes, returnsinvalid_cursorinstead of a silently shifted pagenextStephint on each result points at the next tool to callCatalogue TOC cached in memory for 12 hours (
EUROSTAT_TOC_CACHE_TTL_MS), then refreshed on the next callPair with
eurostat_browse_themesfor structured domain exploration when keywords are unclear
eurostat_browse_themes
Navigate the Eurostat theme tree.
Without
theme_code: returns the top-level themes (Economy and finance, Population, Transport, etc.)With
theme_code: returns immediate children — subtheme folders and datasets in that branchEach entry includes code, label, type (folder/dataset/table), data period, and observation count where available
Returns a breadcrumb path from root to the current node, plus a
nextStephint suited to the level (drill into folders or inspect a dataset)One branch per folder code — Eurostat files a few folder codes under several branches; a code resolves to the first one the catalogue lists, which never has fewer children than the branches it shadows, and
otherPlacementsnames those so the ambiguity is visibleUse for structured discovery when you know the domain but not the exact dataset code
eurostat_get_dataset_info
Fetch metadata for a Eurostat dataset before querying it.
Returns all dimensions with their codes, labels, and up to 10 sample values each
Reports overall time range and total observation count across all periods, each omitted when Eurostat does not report it
Uses a minimal Statistics API call (most recent period only), plus one bounded follow-up to count the dataset's periods when it has a
timedimension. If that follow-up fails, the call still returns everything the first request produced, with thetimedimension's value count omitted rather than reported as 1For dimensions with more than 10 values, use
eurostat_get_dimension_valuesfor the full listProvides a link to the ESMS metadata page when available
eurostat_get_dimension_values
List all valid values for a specific dataset dimension.
Retrieves the complete set of valid codes and labels for any dimension (unit, na_item, geo, etc.)
For the
geodimension, supports NUTS hierarchy filtering:aggregate(EU/EA totals),country(41 states),nuts1(127 major regions),nuts2(309 basic regions),nuts3(1,343 small regions). Pairing it with any other dimension is rejected rather than ignoredPrevents silent no-data returns — invalid dimension values in
eurostat_query_datasetreturn nothing without error; verify codes here first
eurostat_query_dataset
Fetch statistical data from a Eurostat dataset.
Accepts dimension filters as a map of
{dimension_code: [value1, value2, ...]}NUTS geo-level filter (
aggregate,country,nuts1,nuts2,nuts3) — mutually exclusive with a non-emptygeoentry in filters; an empty array is treated as no filter and droppedTime range via
since_period/until_period(e.g.,"2020","2023-Q1") orlast_n_periodsfor the N most recentReturns decoded observations with dimension codes and labels, numeric values, an
OBS_FLAGstatus (p= provisional,e= estimated, etc.) and a separateCONF_STATUSconfidentiality marker (C= confidential, usually the reason a value is null)Reports total observation count, missing value count, and the effective time range of the result, each period bound omitted when neither the observations nor Eurostat report it
Inline rows are capped at 5,000, applied while decoding so a broad query never builds the rest;
obsCount,missingObsCountandtimeRangestill describe the whole match, andtruncatedflags when the cap bit. Filter the query to shrink what Eurostat sends — the cap bounds the decode, not the transferWith the dataframe canvas enabled, a match past the cap is also staged whole as a SQL table and the response returns
canvasId/tableName/stagedRowCount; the rows are streamed into the table one at a time from the response body already in memory, so nothing extra is fetched and the match is never materialized as an array. Without a canvas those fields are absent and narrowing the query is the way to the restPass
canvas_idfrom an earlier response to stage several results side by side and join across themAsync-response detection — large unfiltered queries return an actionable, non-retryable error with filter guidance rather than silently timing out
Fetches a slice. When the target is a whole dataset,
eurostat_download_datasetreads the SDMX bulk endpoint instead, at roughly half the bytes
eurostat_download_dataset
Download a whole dataset through the SDMX 2.1 TSV bulk endpoint (/sdmx/2.1/data/{dataset}?format=TSV).
The TSV wire format runs 48–63% of the JSON-stat body
eurostat_query_datasetreads for the same data, because the wide layout writes each dimension key once per row instead of once per observation. Measured across four datasets from 1.1M to 12.8M observationsFilters take the same
{dimension_code: [value, ...]}map aseurostat_query_datasetand are applied by Eurostat before the body is sent. They become a positional key on the request path, which must carry one position per dimension — the server builds it from the dataset's own dimension order, so a filter naming a dimension the dataset does not have is rejected with the real list rather than sent as a malformed keyNarrow periods with
since_period/until_period. There is deliberately no "last N periods": the TSV layout keeps a column for every period whichever selector is used, andlastNObservationsmerely blanks the unselected cells — measured at ~3× the equivalent JSON-stat body.startPeriodremoves the columnsByte budget enforced while streaming. Eurostat sends the body chunked with no
Content-Length, so the limit is applied as bytes arrive and the transfer is aborted the moment it is spent — not measured after the fact. A truncated download returns its rows withbudgetExceeded: truerather than an error, so the work already paid for is not discarded.EUROSTAT_BULK_MAX_BYTESsets the ceilinggzip is sniffed off the stream, not read from headers. Eurostat compresses large bodies with no
Content-Encodingheader; the only header-level tell is a.tsv.gzfilename onContent-Disposition, and the switch does not track dataset size, so the magic bytes are what decideThe asynchronous queue envelope is detected explicitly. When an extraction is too costly to serve inline Eurostat answers HTTP 200 with a SOAP
syncResponseticket instead of data; read as TSV that yields a header row of XML and no observations, so it is classified up front as a non-retryable error naming what to narrowErrors arrive as XML SOAP faults, not JSON: faultcode 100 →
not_found, 140 →filter_arity, 150 →invalid_dimension(which also covers a period range outside the dataset's coverage). Each maps to a typed reason with a recovery hint naming the tool to call nextWith the dataframe canvas enabled, every observation is staged as a SQL table and the response returns
canvasId/tableName/stagedRowCount; rows stream into the table one at a time, so a multi-million-row download never materializes as an array. Onlypreview_limitrows (default 50, max 500) come back inline, and they are the leading rows of the staged tableWithout a canvas the download still runs so
rowCount,missingCountandperiodRangedescribe it, but only the preview is retained — the response says so plainly instead of implying the rest is reachable
eurostat_dataframe_describe / eurostat_dataframe_query
SQL over the results eurostat_query_dataset and eurostat_download_dataset stage. Listed only when the dataframe canvas is enabled (CANVAS_PROVIDER_TYPE=duckdb); the server is fully functional without it, and clients never see tools they cannot call.
eurostat_dataframe_describelists the staged tables with row counts and column names and types — call it before writing SQLeurostat_dataframe_queryruns a single read-onlySELECT. Statement chaining, non-SELECTverbs, and functions that read files or external data are rejected with a typed errorStaged columns are flat, and the two stagers write different dimension columns — call
eurostat_dataframe_describerather than assuming.eurostat_query_datasetgives each dimension a code column named after the dimension (geo) plus a label companion (geo_label);eurostat_download_datasetgives code columns only, since the bulk endpoint carries no labels, plus atimecolumn. Both write the same five measure columns:obs_value,obs_flag,obs_flag_label,conf_status,conf_status_labelTables from the two stagers join on their dimension code columns and
time— same names, sameVARCHARtype,obs_valueDOUBLEon both — and their measure columns carry the same codes for the same observation. JSON-stat has noCONF_STATUSfield and folds the marker into the observation status as|C;eurostat_query_datasetsplits it back out before staging, so a confidential cell readsobs_flag = NULLwithconf_status = 'C'on either tableThe DuckDB binding ships with the server, so
CANVAS_PROVIDER_TYPE=duckdbis the only switch. The exception is the one-click.mcpbbundle, which strips platform-specific native bindings to stay portable — a bundle install cannot run the canvas, so reach for the npm, Docker, or from-source install for SQL analytics
Related MCP server: eurostat-mcp
Resource
Type | Name | Description |
Resource |
| Dataset metadata (dimensions, time range, obs count, last-updated) accessible by URI for cache-injectable context |
Features
Built on @cyanheads/mcp-ts-core:
Declarative tool definitions — single file per tool, framework handles registration and validation
Unified error handling across all tools
Pluggable auth (
none,jwt,oauth)Swappable storage backends:
in-memory,filesystem,Supabase,Cloudflare KV/R2/D1Structured logging with optional OpenTelemetry tracing
Runs locally (stdio/HTTP) or on Cloudflare Workers from the same codebase
Eurostat-specific:
TTL-bounded in-memory cache for the TOC file — reused across all search and browse calls, refreshed on the first call past its 12-hour lifetime, with the last loaded copy served if a refresh fails
JSON-stat 2.0 stride-based decoder for the Statistics API response format
Async-response detection — Eurostat returns a warning object rather than an error for over-limit queries; the server intercepts it and returns an actionable error with filter guidance
NUTS hierarchy geo-level filtering across query and dimension-value tools
Status decoding against both published codelists — the
OBS_FLAGobservation flag (provisional, estimated, definition differs) and theCONF_STATUSconfidentiality marker, each in its own field. JSON-stat folds the two into one string and SDMX TSV into one cell; both are split on their separator, so a given observation reads the same whichever endpoint served itOptional DuckDB dataframe canvas — a query matching more than the inline cap is streamed row by row into a SQL table, reaching the observations the cap drops without a second request to Eurostat
SDMX 2.1 TSV bulk downloads with streaming gzip detection, a mid-transfer byte budget, wide-to-long expansion, and SOAP fault classification — the whole-dataset counterpart to the per-query path
Agent-friendly output:
Discovery workflow:
eurostat_search_datasets/eurostat_browse_themes→eurostat_get_dataset_info→eurostat_get_dimension_values→eurostat_query_datasetfor a slice, oreurostat_download_datasetfor the whole datasetInvalid dimension codes in query filters silently return no data from Eurostat — the
eurostat_get_dimension_valuestool prevents this by letting agents verify codes firstStructured error contracts with typed reasons and recovery hints on all tools
Getting started
Public Hosted Instance
A public instance is available at https://eurostat.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"eurostat-mcp-server": {
"type": "streamable-http",
"url": "https://eurostat.caseyjhand.com/mcp"
}
}
}Self-Hosted / Local
Add the following to your MCP client configuration file.
{
"mcpServers": {
"eurostat-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/eurostat-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"eurostat-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/eurostat-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with Docker:
{
"mcpServers": {
"eurostat-mcp-server": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/eurostat-mcp-server:latest"]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
Bun v1.3.2 or higher. No API key required — Eurostat's dissemination API is public.
Installation
Clone the repository:
git clone https://github.com/cyanheads/eurostat-mcp-server.gitNavigate into the directory:
cd eurostat-mcp-serverInstall dependencies:
bun installConfiguration
All configuration is validated at startup via Zod schemas in src/config/server-config.ts. Key environment variables:
Variable | Description | Default |
| Transport: |
|
| HTTP server port |
|
| HTTP endpoint path |
|
| Public origin override for TLS-terminating reverse-proxy deployments | none |
| Authentication: |
|
| Log level ( |
|
| Opt-in Bun-only forced-GC pressure loop (ms). Recommended starting point if heap growth is observed: |
|
| Directory for log files (Node.js only) |
|
| Storage backend: |
|
| Eurostat API base URL |
|
| HTTP request timeout in ms |
|
| Catalogue TOC cache lifetime in ms — the first search or browse call past this age refreshes it |
|
| HTTP timeout for one |
|
| Byte budget for one bulk download, counted on the decoded TSV and enforced while streaming |
|
|
|
|
| Directory DuckDB writes canvas spill files to. Must be writable by the server process |
|
| Sliding lifetime of a staged canvas in ms; every call against it extends the window |
|
| Max rows one |
|
| Enable OpenTelemetry |
|
Running the server
Local development
Build and run the production version:
# One-time build bun run rebuild # Run the built server bun run start:http # or bun run start:stdioRun checks and tests:
bun run devcheck # Lints, formats, type-checks, and more bun run test # Runs the test suite
Project structure
Directory | Purpose |
| Tool definitions ( |
| Resource definitions. Dataset metadata resource. |
| Catalogue service — fetches and parses the Eurostat TOC TXT file; TTL-bounded in-memory cache. |
| Data service — Statistics API HTTP client, JSON-stat 2.0 decoder, async-response detection, dataframe row source. |
| Module-level accessor for the optional DataCanvas, plus the acquire helper that names the misconfigured path on a permission failure. |
| Server-specific environment variable parsing and validation with Zod. |
| Unit and integration tests, mirroring the |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor logging,ctx.statefor storageRegister new tools and resources in the
createApp()arrays
Contributing
Issues and pull requests are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
This server cannot be installed
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 gradedqualityDmaintenanceA Model Context Protocol (MCP) server that provides tools to query Eurostat APIs for European statistics data.9MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying Eurostat statistical data through natural language or direct MCP tools, wrapping the Eurostat API without authentication.6MIT
- AlicenseNot gradedqualityCmaintenanceEnables searching and accessing EU open datasets from data.europa.eu, including metadata discovery and dataset retrieval.11MIT
Related MCP Connectors
Eurostat MCP — wraps Eurostat Statistical Data API (no auth required)
Statistics Canada (StatCan) WDS MCP — Canadian official statistics (no auth)
data.europa.eu — official EU open-data hub (~1.6M datasets)
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/cyanheads/eurostat-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server