OECD MCP Server
Public Hosted Server: https://oecd.caseyjhand.com/mcp
Overview
OECD statistics across 1,500+ datasets on national accounts, employment, trade, education, and health. Search datasets, inspect their dimensions, query observations, and run SQL over large multi-country time series. No API key required.
Tools
Five discovery and data tools plus three DataCanvas tools for large query results:
Tool | Description |
| List OECD SDMX agencies with their directorate and the number of dataflows each publishes |
| Search 1,500+ OECD dataflows by keyword or theme |
| Fetch a dataflow's dimensions, key order, and codelist references |
| Fetch valid codes and labels for one dimension (countries, measures, frequencies) |
| Fetch observations filtered by dimension key and time range; spills large results to DataCanvas |
| List DataCanvas tables and columns staged by a prior |
| Run a read-only SQL SELECT against DataCanvas tables |
| Drop a staged DataCanvas table or view once the analysis is done — opt-in via |
Resources
Resource | Description |
| Dimension metadata for a single OECD dataflow — same content as |
All resource data is also reachable via tools. Use oecd_get_dataset_info for the same content.
Skill
Skill | Description |
Building SDMX keys, confirming which series a dataflow carries, and reading results without mixing breakdowns, units, or country aggregates. Served over MCP at |
Related MCP server: OECD Stats MCP
Capability reference
oecd_list_agencies tool
No inputs; returns every agency ID (e.g.
OECD.SDD.NAD) with its directorate name and dataflow count, sorted by countPublishers outside OECD that ship dataflows through the same catalog (
ESTAT,IAEG-SDGs) carry no directorate
oecd_search_datasets tool
querytoken-matched across dataflow names and descriptions; optionalagency_idscope;limit(1–100) andoffsetpaging withtotal_matchesEach result carries its
flow_ref— the identifier every other tool takes — andmatched_in(name,description, orboth)
oecd_get_dataset_info tool
Takes a
flow_ref; returns every dimension in key order with its concept name and codelist reference, plus akey_exampleforoecd_query_datasetFails
invalid_flow_reffor a string that is not a flow reference anddataflow_not_foundfor one OECD does not publish
oecd_get_dimension_values tool
Takes a
flow_refanddimension_id; optionalquerysubstring-matches both code and labellimit(1–500, default 50) andoffsetpage the matches, with the full match count when more remain
oecd_query_dataset tool
flow_refplus a dot-delimitedkey(+for multiple values, empty segments as wildcards) and optionalstart_period/end_periodOne row per observation with every dimension and attribute as its own column;
valueis pre-multiplied byvalue_scaleLarge results spill to DataCanvas with
truncated: true,canvas_id, andtable_name; without a canvas every row stays instructuredContentand only the rendered table is capped (content_table_capped)A spill includes a
noticenaming the canvas and table: inspect columns withoecd_dataframe_describe, then useoecd_dataframe_queryfor SQL over the full result. Fitting results allocate no new canvas; an explicitcanvas_idis checked before the download, so a stale one fails ascanvas_not_foundwithout spending an OECD request.
oecd_dataframe_describe tool
Takes the
canvas_idoecd_query_datasetreturned; lists each staged table and view with its row count and column names and types
oecd_dataframe_query tool
canvas_idplus one read-only SQLSELECT; writes, DDL, and system-catalog access are rejectedlimit(default 100) returns up to 1,000 rows per call, within 1 MiB of row data; alimitfrom 1,001 to 10,000 is served at 1,000 with a noticetruncated: truemarks a result with more rows than it returned, and itsnoticenames how to reach the rest;row_countcounts the rows returnedA query still running after 30 seconds is stopped with
query_timeout
oecd_dataframe_drop tool
canvas_idplus atable_nameasoecd_dataframe_describelists it; returns the dropped object'skindand theremaining_tablesOpt-in: listed but not callable unless
OECD_DATAFRAME_DROP_ENABLED=true
oecd://dataflow/{agency_id}/{flow_id} resource
Same content as
oecd_get_dataset_info, asapplication/json{flow_id}is{dsd_id}@{df_id}with@encoded as%40(e.g.oecd://dataflow/OECD.SDD.NAD/DSD_NAAG%40DF_NAAG_I), or the bare{df_id}
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
OECD-specific:
Keyless access — no API key required; OECD SDMX 2.1 REST API is fully public
Covers 1,500+ dataflows across 20+ OECD statistical departments (national accounts, employment, inflation, trade, education, health, environment, taxation, inequality)
Delegated dataflows and codelist revisions resolved end to end — a dataflow OECD catalogues on one service root but defines on another follows the catalog's own link for structure, codes, and observations, and codes come from the revision the datastructure names rather than the endpoint's current latest
AllDimensionsobservation mode — one-pass SDMX-JSON decoding into flat row objects, no nested series key reconstructionoecd_query_datasetmaterializes large observation sets (multi-country time-series) on a DuckDB DataCanvas for in-conversation SQL analytics; theoecd_dataframe_*tools work on it; DataCanvas is on by default andCANVAS_PROVIDER_TYPE=nonedisables it
Agent-friendly output:
Workflow-aware tool surface —
flow_reffrom search flows directly into info, values, and query tools without reconstructionSpill signaling —
truncated: true+canvas_idtells the agent to switch to SQL instead of parsing a truncated inline listFull SDMX decoding server-side — agents see
{ REF_AREA: "United States", MEASURE: "Gross domestic product", UNIT_MULT: "Billions", value: 26054614000000, value_scale: 1000000000 }, not raw index arrays
Getting started
Connect to the hosted instance, no install:
claude mcp add --transport http oecd-mcp-server https://oecd.caseyjhand.com/mcpOr run it locally:
claude mcp add oecd-mcp-server -- npx -y @cyanheads/oecd-mcp-serverFor other clients, add this to the MCP config file:
{
"mcpServers": {
"oecd-mcp-server": {
"command": "npx",
"args": ["-y", "@cyanheads/oecd-mcp-server"]
}
}
}No API key is needed — OECD SDMX is a free, public API. DataCanvas SQL analytics over large query results is on by default; set CANVAS_PROVIDER_TYPE=none to get capped inline previews instead. For Docker or a source build, see Running the server.
Configuration
All configuration is validated at startup via Zod schemas in src/config/server-config.ts. Key environment variables:
Variable | Description | Default |
| OECD SDMX REST API base URL. Must be an https origin that answers directly — no redirect is followed, so a plaintext |
|
| Per-request timeout in milliseconds. |
|
| Canvas engine. With |
|
| Set to |
|
| Transport: |
|
| Port for HTTP server. |
|
| HTTP session posture: |
|
| Auth mode: |
|
| Log level (RFC 5424). |
|
| Directory for log files (Node.js only). |
|
| Log each failed tool call's arguments and result, redacted by key name and capped at |
|
| Enable OpenTelemetry instrumentation. |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Requires Bun v1.4.0 or higher (or Node.js v24+).
Clone and install:
git clone https://github.com/cyanheads/oecd-mcp-server.git cd oecd-mcp-server && bun install cp .env.example .env # optional — every variable has a defaultBuild and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker run --rm -p 3010:3010 ghcr.io/cyanheads/oecd-mcp-server:latestThe image defaults to HTTP transport, stateless session mode, and logs to /var/log/oecd-mcp-server. To run it over stdio from an MCP client, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/oecd-mcp-server:latest"]. To build locally, docker build -t oecd-mcp-server .; OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
|
|
| Server-specific environment variable parsing and validation with Zod. |
| Tool definitions ( |
| Resource definitions ( |
| Shared OECD fetch boundary — timeout and retry-classification corrections used by both services below, the response-body reader both share, the origin check every delegated service root passes before it is addressed, the refusal of any redirect off the configured host, and the classification that gives an upstream refusal the same declared reason on every tool and resource. |
| OECD SDMX structure service — dataflows, data structures, codelists. |
| OECD SDMX data service — observations, SDMX-JSON decoding, DataCanvas spillover. |
| DataCanvas accessor — registers and exposes the framework canvas instance to tools. |
| Published agent skill ( |
| Unit and integration tests mirroring |
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 request-scoped logging,ctx.statefor tenant-scoped storageRegister new tools and resources via the barrels in
src/mcp-server/*/index.tsWrap external API calls: validate raw SDMX-JSON → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome — see CONTRIBUTING.md for what makes one actionable, and CODE_OF_CONDUCT.md for how we work together. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
OECD MCP — Organisation for Economic Co-operation and Development data (free, no auth) via the…
Query IMF SDMX 3.0 macroeconomic dataflows — WEO, BOP, CPI, exchange rates, 190 countries.
Macroeconomic and other official data from 170+ publishers, resolved from natural language with provenance.
SDMX Structure MCP — dataflow dimensions and code lists for any SDMX 2.1 registry: Eurostat, OECD…
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides AI assistants access to over 5,000 OECD economic and statistical datasets via the SDMX API for search, analysis, and comparison across 38 countries.939 npm7MIT
- AlicenseAqualityDmaintenanceProvides OECD statistical data (employment, wages, etc.) through SDMX API, supporting Korean-language queries. Enables listing indicators, retrieving stats, trends, comparisons, and rankings among OECD countries.8MIT
- AlicenseAqualityCmaintenanceEnables querying, exploring, and downloading ISTAT statistical datasets via SDMX REST API, with unified metadata, territorial code resolution, and data extraction.7MIT
- AlicenseNot gradedqualityDmaintenanceEnables discovery and retrieval of National Bank of Belgium statistical data across 221 SDMX dataflows, with search, descriptions, custom queries, and comparisons of economic indicators.46 PyPI3MIT