OECD 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., "@OECD MCP Serversearch for PISA data"
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://oecd.caseyjhand.com/mcp
Tools
Five discovery and data tools plus two SQL analytics 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 |
oecd_list_agencies
Entry point for discovery — enumerate OECD's statistical departments before searching.
Returns agency IDs (e.g.
OECD.SDD.NAD,OECD.ELS.SPD,OECD.EDU.IMEP) and dataflow countsEach agency carries the name of its directorate —
OECD.CTP.TPSis the Centre for Tax Policy and Administration,OECD.SDD.NADthe Statistics and Data Directorate — so a department can be picked without decoding the identifierPublishers outside OECD that ship dataflows through the same catalog (
ESTAT,IAEG-SDGs) carry no directorateUseful for scoping
oecd_search_datasetsby department (national accounts, labour, education, etc.)
oecd_search_datasets
Search the full catalog of 1,500+ OECD dataflows by keyword or department.
Token-matching across dataflow names and descriptions — reaches datasets whose name never carries the term, so
inflationreturnsEconomic Outlook 119andpovertyreturnsIncome inequality - RegionsEach result reports
matched_in(name,description, orboth) and a plain-text description trimmed to 240 charactersOptional
agency_idfilter scopes results to a specific statistical departmentlimit(1–100) andoffsetpage through the match list;total_matchesreports the full countReturns
flow_refvalues (e.g.OECD.SDD.NAD,DSD_NAAG@DF_NAAG_I) — pass directly tooecd_get_dataset_infooroecd_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 aflow_refisFetches and filters in-memory; the full catalog is ~5.9 MB and bounded (OECD adds datasets weekly, not continuously)
oecd_get_dataset_info
Inspect a dataflow's structure before querying.
Returns all dimensions in key order (position 1, 2, 3 …) — dimension order is required to construct the dot-delimited key for
oecd_query_datasetEach dimension carries its concept name from the datastructure's concept scheme, so
INSTR_ASSETreads as "Financial instruments and non-financial assets" rather than repeating the id. A dimension the scheme does not cover keeps the idShows codelist references for each dimension — pass to
oecd_get_dimension_valuesto resolve human-readable names to SDMX codesSurfaces
NonProductionDataflowflag — marks experimental or deprecated dataflowsResolves a
flow_refwhose id prefix names no datastructure of its own by asking the dataflow for its structure —OECD.CFE.EDS,DSD_REG_LAB@DF_RATESis backed byDSD_REG_LABOUR, and answers here rather than reporting the dataflow as missingRequired before calling
oecd_query_dataseton an unfamiliar dataflow
oecd_get_dimension_values
Resolve human-readable names (countries, measures) to SDMX codes.
Returns code + label pairs for a single dimension (e.g.
REF_AREA→USA/United States,DEU/Germany)querymatches a case-insensitive substring against both the code and its label, soPAandpercenteach reachPA/Percent per annumlimit(1–500, default 50) andoffsetpage the matching list. Both client surfaces carry the same page, so a 1,164-code dimension likeUNIT_MEASUREno longer ships 66 KB of pairs tostructuredContentto find one codeWhen matches remain beyond the page, the response reports the full match count and how to reach the rest
oecd_query_dataset
Fetch observations from an OECD dataflow filtered by dimension key and time range.
Accepts a dot-delimited key (e.g.
A.USA+DEU.B1GQ_R.PC.) where empty segments are wildcards and+separates multiple valuesOptional
start_period/end_periodbound the time range (ISO format:2010,2010-Q1)Decodes SDMX-JSON index notation (
0:0:2:3:0) into human-readable row objects with dimension labelsObservation attributes (
UNIT_MULT,OBS_STATUS,PRICE_BASE,DECIMALS, …) each become their own column, so an estimated or break-flagged point is distinguishable from a confirmed onevaluearrives already multiplied by the observation'sUNIT_MULT— a GDP figure OECD publishes as26054.614billions comes back as26054614000000. Every row carriesvalue_scale, the power of ten applied; divide by it for the figure as OECD published itEvery response row includes
source: "OECD"per OECD terms of useSmall results (few countries, narrow time range): every observation is returned inline, in
structuredContentand in the rendered table alike — nocanvas_id, andtruncatedis omitted rather than set tofalseLarge results (multi-country, multi-year time-series) with
CANVAS_PROVIDER_TYPE=duckdb: a leading preview slice pluscanvas_id+truncated: true— useoecd_dataframe_describeto list tables, thenoecd_dataframe_queryfor SQL analyticsLarge results without DataCanvas: there is nowhere to stage the remainder, so every observation still comes back in
structuredContent, while the rendered table stops at the same preview budget a canvas would have used — the response reportscontent_table_cappedand the number of rows it showed. Narrow the key or thestart_period/end_periodrange to shrink the result itself
oecd_dataframe_describe / oecd_dataframe_query
SQL analytics over observation data staged by oecd_query_dataset.
When oecd_query_dataset returns truncated: true, the full result is staged on a DuckDB-backed DataCanvas. Pass the canvas_id to:
oecd_dataframe_describe— list staged table names and their columns. Run this first to discover the schema before writing SQL.oecd_dataframe_query— run a single-statement SQL SELECT. Supports aggregates, window functions, GROUP BY, ORDER BY, and standard DuckDB SQL.
Requires CANVAS_PROVIDER_TYPE=duckdb. Read-only: writes, DDL, and system catalog access are rejected.
Typical workflow for a large query:
oecd_query_dataset → { canvas_id, table_name, truncated: true, rows: [preview...] }
→ oecd_dataframe_describe(canvas_id) → table/column names
→ oecd_dataframe_query(canvas_id, "SELECT REF_AREA, AVG(value) FROM spilled_... GROUP BY REF_AREA")Related MCP server: global-education-mcp
Resources
Type | Name | Description |
Resource |
| Dimension metadata for a single OECD dataflow — same content as |
{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 prefix. Example: oecd://dataflow/OECD.SDD.NAD/DSD_NAAG%40DF_NAAG_I.
All resource data is also reachable via tools. Use oecd_get_dataset_info for the same content.
Features
Built on @cyanheads/mcp-ts-core:
Declarative tool, resource, and prompt definitions — single file per primitive, framework handles registration and validation
Unified error handling — handlers throw, framework catches, classifies, and formats
Pluggable auth:
none,jwt,oauthSwappable storage backends:
in-memory,filesystem,Supabase,Cloudflare KV/R2/D1Structured logging with optional OpenTelemetry tracing
STDIO and Streamable HTTP transports
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 resolved end to end — the entries OECD catalogues on one service root but defines on another (Trade in Value Added, the DAC creditor-reporting aid series) follow the catalog's own link for structure, codes, and observations, with the target checked against the configured origin before any request goes out
Codes read at the revision the dataflow references — a codelist moves on independently of the datastructures using it, so a dimension's values come from the version its structure names rather than the endpoint's current latest, and never include a code the dimension rejects
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 analyticsOECD source attribution (
source: "OECD") on every observation row per OECD terms of use
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
Public Hosted Instance
A 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"
}
}
}Self-Hosted / Local
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/mcpPrerequisites
Bun v1.3.14 or higher (or Node.js v24+).
No API key required — OECD SDMX is a free, public API.
Installation
Clone the repository:
git clone https://github.com/cyanheads/oecd-mcp-server.gitNavigate into the directory:
cd oecd-mcp-serverInstall dependencies:
bun installConfigure environment:
cp .env.example .env
# edit .env — most vars are optional; no API key requiredConfiguration
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. Set to |
|
| Transport: |
|
| Port for HTTP server. |
|
| Auth mode: |
|
| Log level (RFC 5424). |
|
| Directory for log files (Node.js only). |
|
| Enable OpenTelemetry instrumentation. |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Build 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 build -t oecd-mcp-server .
docker run --rm -p 3010:3010 oecd-mcp-serverThe 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.
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 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. |
| 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 and pull requests are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE 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
- AlicenseBqualityDmaintenanceA model Context Protocol (MCP) server that provides comprehensive OECD statistics through the SDMX API, supporting AI assistants and chatbots to query OECD datasets in areas such as economy, health, education, and environment.92Apache 2.0
- AlicenseAqualityAmaintenanceProvides AI assistants access to international education data from UNESCO UIS (4,000+ indicators) and OECD Education at a Glance via SDMX, with no API keys required.101MIT
- AlicenseAqualityFmaintenanceProvides AI assistants access to over 5,000 OECD economic and statistical datasets via the SDMX API for search, analysis, and comparison across 38 countries.9317MIT
- AlicenseAqualityBmaintenanceProvides access to UK economic, social, and labour-market statistics via the ONS beta and Nomis APIs, enabling discovery and retrieval of time series, datasets, and census data.18MIT
Related MCP Connectors
Query IMF SDMX 3.0 macroeconomic dataflows — WEO, BOP, CPI, exchange rates, 190 countries.
UK Office for National Statistics dataset catalogue + Beta JSON API
Query 29,500+ World Bank development indicators for 200+ countries across 60+ years.
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/oecd-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server