Search and query 1,500+ OECD statistical datasets via SDMX. Keyless.
Search, explore, and query 1,500+ OECD statistical datasets (national accounts, employment, trade, education, health) via SDMX via MCP. STDIO or Streamable HTTP.
Public Hosted Server: https://oecd.caseyjhand.com/mcp
OECD statistical data via the SDMX 2.1 REST API — 1,500+ dataflows spanning national accounts, employment, trade, education, and health. Search datasets, inspect their dimensions, resolve codes, and query observations, with large multi-country time-series spilling to a queryable DataCanvas table for SQL analysis. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
Five discovery and data tools plus two SQL analytics tools for large query results:
| Tool | Description |
|---|---|
oecd_list_agencies | List OECD SDMX agencies with their directorate and the number of dataflows each publishes |
oecd_search_datasets | Search 1,500+ OECD dataflows by keyword or theme |
oecd_get_dataset_info | Fetch a dataflow's dimensions, key order, and codelist references |
oecd_get_dimension_values | Fetch valid codes and labels for one dimension (countries, measures, frequencies) |
oecd_query_dataset | Fetch observations filtered by dimension key and time range; spills large results to DataCanvas |
oecd_dataframe_describe | List DataCanvas tables and columns staged by a prior oecd_query_dataset spill |
oecd_dataframe_query | Run a read-only SQL SELECT against DataCanvas tables |
| Resource | Description |
|---|---|
oecd://dataflow/{agency_id}/{flow_id} | Dimension metadata for a single OECD dataflow — same content as oecd_get_dataset_info |
All resource data is also reachable via tools. Use oecd_get_dataset_info for the same content.
oecd_list_agencies toolOECD.SDD.NAD, OECD.ELS.SPD, OECD.EDU.IMEP) and dataflow counts, sorted descending by countOECD.CTP.TPS is the Centre for Tax Policy and Administration, OECD.SDD.NAD the Statistics and Data Directorate — so a department can be picked without decoding the identifierESTAT, IAEG-SDGs) carry no directorateoecd_search_datasets by department (national accounts, labour, education, etc.)oecd_search_datasets toolinflation returns Economic Outlook 119 and poverty returns Income inequality - Regionsmatched_in (name, description, or both) and a plain-text description trimmed to 240 charactersagency_id filter scopes results to a specific statistical departmentlimit (1–100) and offset page through the match list; total_matches reports the full countflow_ref values (e.g. OECD.SDD.NAD,DSD_NAAG@DF_NAAG_I) — pass directly to oecd_get_dataset_info or oecd_query_dataset. A handful of dataflows are catalogued without a datastructure prefix and come back in the bare {agencyID},{df_id} form (OECD.TAD.ARP,DF_AEI2024_DASHBOARD); both forms are accepted everywhere a flow_ref isoecd_get_dataset_info tooloecd_query_datasetINSTR_ASSET reads as "Financial instruments and non-financial assets" rather than repeating the id. A dimension the scheme does not cover keeps the idoecd_get_dimension_values to resolve human-readable names to SDMX codesNonProductionDataflow flag — marks experimental or deprecated dataflowsflow_ref whose id prefix names no datastructure of its own by asking the dataflow for its structure — OECD.CFE.EDS,DSD_REG_LAB@DF_RATES is backed by DSD_REG_LABOUR, and answers here rather than reporting the dataflow as missingoecd_query_dataset on an unfamiliar dataflowoecd_get_dimension_values toolREF_AREA → USA/United States, DEU/Germany)query matches a case-insensitive substring against both the code and its label, so PA and percent each reach PA / Percent per annumlimit (1–500, default 50) and offset page the matching list. Both client surfaces carry the same page, so a 1,164-code dimension like UNIT_MEASURE no longer ships 66 KB of pairs to structuredContent to find one codeoecd_query_dataset toolA.USA+DEU.B1GQ_R.PC.) with +-separated multi-values and empty wildcard segments; optional start_period / end_period bound the range (ISO format: 2010, 2010-Q1)UNIT_MULT, OBS_STATUS, PRICE_BASE, DECIMALS, …) becomes its own column, so an estimated or break-flagged point is distinguishable from a confirmed onevalue is pre-multiplied by value_scale (the observation's unit multiplier) — a GDP figure OECD publishes as 26054.614 billions comes back as 26054614000000; divide by value_scale for the figure as OECD published it. Every row carries source: "OECD"canvas_id; large results (multi-country, multi-year) spill to DataCanvas (CANVAS_PROVIDER_TYPE=duckdb) with truncated: true plus a canvas_id / table_name for oecd_dataframe_describe and oecd_dataframe_query; without DataCanvas every row still returns in structuredContent, but the rendered table caps at a preview slice, reported via content_table_cappedoecd_dataframe_describe tooloecd_query_dataset spillcanvas_id oecd_query_dataset returnedCANVAS_PROVIDER_TYPE=duckdb is set — call before oecd_dataframe_query to discover exact table and column names for SQLoecd_dataframe_query toolSELECT against the staged tables — aggregates, window functions, GROUP BY, ORDER BY, and standard DuckDB SQLrow_count reports the full count before the capCANVAS_PROVIDER_TYPE=duckdb is setoecd://dataflow/{agency_id}/{flow_id} resourceapplication/json — same content as oecd_get_dataset_info{flow_id} is the combined {dsd_id}@{df_id} string with @ percent-encoded as %40, or the bare {df_id} for a dataflow catalogued without a datastructure prefixoecd://dataflow/OECD.SDD.NAD/DSD_NAAG%40DF_NAAG_IBuilt 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:
AllDimensions observation mode — one-pass SDMX-JSON decoding into flat row objects, no nested series key reconstructionoecd_query_dataset materializes large observation sets (multi-country time-series) on a DuckDB DataCanvas for in-conversation SQL analyticsAgent-friendly output:
flow_ref from search flows directly into info, values, and query tools without reconstructiontruncated: true + canvas_id tells the agent to switch to SQL instead of parsing a truncated inline list{ REF_AREA: "United States", MEASURE: "Gross domestic product", UNIT_MULT: "Billions", value: 26054614000000, value_scale: 1000000000 }, not raw index arraysA public instance is available at https://oecd.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"oecd-mcp-server": {
"type": "streamable-http",
"url": "https://oecd.caseyjhand.com/mcp"
}
}
}
Add the following to your MCP client configuration file.
{
"mcpServers": {
"oecd-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/oecd-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with npx (no Bun required):
{
"mcpServers": {
"oecd-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/oecd-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with Docker:
{
"mcpServers": {
"oecd-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"ghcr.io/cyanheads/oecd-mcp-server:latest"
]
}
}
}
To enable DataCanvas SQL analytics for large query results, add CANVAS_PROVIDER_TYPE=duckdb:
{
"mcpServers": {
"oecd-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/oecd-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"CANVAS_PROVIDER_TYPE": "duckdb"
}
}
}
}
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/mcp
git clone https://github.com/cyanheads/oecd-mcp-server.git
cd oecd-mcp-server
bun install
cp .env.example .env
# edit .env — most vars are optional; no API key required
All configuration is validated at startup via Zod schemas in src/config/server-config.ts. Key environment variables:
| Variable | Description | Default |
|---|---|---|
OECD_BASE_URL | OECD SDMX REST API base URL. Must be an https origin that answers directly — no redirect is followed, so a plaintext http:// origin fails instead of being upgraded to https. | https://sdmx.oecd.org/public/rest |
OECD_TIMEOUT_MS | Per-request timeout in milliseconds. | 30000 |
CANVAS_PROVIDER_TYPE | Canvas engine. Set to duckdb so a large oecd_query_dataset result spills to a queryable table instead of just capping the rendered preview — unset, every row still comes back in structuredContent, only the rendered table is capped. | none |
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | Port for HTTP server. | 3010 |
MCP_SESSION_MODE | HTTP session posture: stateful, stateless, or auto. The server declares stateless in source — it keeps no per-session state, and a DataCanvas handle is keyed by canvas_id — so set this only to override that. | stateless |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (RFC 5424). | info |
LOGS_DIR | Directory for log files (Node.js only). | <project-root>/logs |
OTEL_ENABLED | Enable OpenTelemetry instrumentation. | false |
See .env.example for the full list of optional overrides.
Build and run:
# One-time build
bun run rebuild
# Run the built server
bun run start:stdio
# or
bun run start:http
Run 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 build -t oecd-mcp-server .
docker run --rm -p 3010:3010 oecd-mcp-server
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/oecd-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point — registers tools/resources and initializes services. |
src/config/ | Server-specific environment variable parsing and validation with Zod. |
src/mcp-server/tools/definitions/ | Tool definitions (*.tool.ts) — seven tools for OECD data discovery and retrieval. |
src/mcp-server/resources/definitions/ | Resource definitions (*.resource.ts) — the oecd://dataflow resource. |
src/services/oecd-http/ | Shared OECD fetch boundary — timeout and retry-classification corrections used by both services below, 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. |
src/services/oecd-structure/ | OECD SDMX structure service — dataflows, data structures, codelists. |
src/services/oecd-data/ | OECD SDMX data service — observations, SDMX-JSON decoding, DataCanvas spillover. |
src/services/canvas-accessor/ | DataCanvas accessor — registers and exposes the framework canvas instance to tools. |
tests/ | Unit and integration tests mirroring src/. |
See CLAUDE.md for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for request-scoped logging, ctx.state for tenant-scoped storagesrc/mcp-server/*/index.tsIssues 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 test
Apache-2.0 — see LICENSE for details.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @cyanheads/oecd-mcp-serverMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-cyanheads-oecd-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/oecd-mcp-server"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referenceio.github.cyanheads/oecd-mcp-server works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.