OECD MCP Server
This MCP server lets an AI assistant search OECD datasets and retrieve official OECD statistics directly from the public SDMX API.
Search ~1,500 OECD datasets by keyword and browse them by category.
Find popular/curated datasets and search for indicators like inflation, unemployment, or GDP.
Inspect a dataset’s structure, dimensions, valid codes, time coverage, and metadata.
Query actual statistical observations with dimension filters and time ranges, while limiting results to protect context.
Get links to the same selection in OECD Data Explorer for visual exploration and download.
Use it read-only with no account or API key required.
Access prompt templates and resources for guided dataset exploration, country comparisons, filter building, country codes, glossary, and API/rate-limit info.
Click on "Deploy 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 Server Compare GDP growth between US and Germany"
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.
OECD MCP Server
Give your AI assistant direct access to OECD statistics. This Model Context Protocol (MCP) server lets Claude Code, Codex and other MCP clients search all ~1,500 OECD datasets and fetch the numbers (GDP, inflation, unemployment, health spending, education, tax revenue, trade, environment and more) straight from the official OECD SDMX API.
No account and no API key: the OECD API is public.
Runs locally on your machine with one command.
Read-only: the server can only look up statistics.
🇸🇪 Svenska: En MCP-server som ger AI-assistenter som Claude Code och Codex tillgång till OECD:s cirka 1 500 statistikdatabaser. Ingen API-nyckel behövs. Följ Kom igång nedan: ett kommando räcker.
Contents
Related MCP server: global-education-mcp
Get started
You need: Node.js 20 or later. Check with:
node --versionThat is the only requirement. You do not have to download or install the
server yourself: npx fetches it the first time your client starts it.
Claude Code
Step 1. Add the server. Run this in your terminal (not inside a Claude Code session):
claude mcp add --scope user oecd -- npx -y oecd-mcpWhat the parts mean:
Part | Meaning |
| Makes the server available in all your projects. Leave it out to add it to the current project only. |
| The name you give the server. You will see it in tool names and commands. |
| Everything after this is the command Claude Code runs to start the server. |
| Downloads (first time) and starts the server. |
Step 2. Check that it is connected.
claude mcp listYou should see oecd with a ✓. Inside a Claude Code session you can also type
/mcp to see the server, its status and its tools.
Step 3. Ask something. Start claude and try:
Use OECD data to compare unemployment in Sweden, Norway and Denmark since 2020.Claude Code asks for permission the first time it uses a tool from the server. All tools are read-only, so it is safe to allow them.
Run the command with --scope project, or create a .mcp.json file in the
project root and commit it:
{
"mcpServers": {
"oecd": {
"type": "stdio",
"command": "npx",
"args": ["-y", "oecd-mcp"]
}
}
}Everyone who opens the project in Claude Code is asked to approve the server once.
Command | What it does |
| List servers and their connection status |
| Show how the server is configured |
| Remove the server |
| Status, tools and reconnect |
| Run one of the server's prompt templates |
| Attach one of the server's resources to your message |
Pass settings with --env, before the server name:
claude mcp add --scope user --env OECD_MCP_LOG_LEVEL=info oecd -- npx -y oecd-mcpCodex
The Codex CLI, the Codex IDE extension and the ChatGPT desktop app share one configuration, so you only need to do this once.
Step 1. Add the server.
codex mcp add oecd -- npx -y oecd-mcpStep 2. Check that it is connected.
codex mcp listInside the Codex terminal UI you can type /mcp to see active servers.
Step 3. Ask something. Start codex and try:
Use the OECD tools to show how inflation has developed in the G7 countries over the last two years.Codex stores MCP servers in ~/.codex/config.toml (or .codex/config.toml
inside a trusted project). Add:
[mcp_servers.oecd]
command = "npx"
args = ["-y", "oecd-mcp"]
# Optional, but recommended:
startup_timeout_sec = 30 # default 10; the first npx download can take longer
tool_timeout_sec = 120 # default 60; large OECD queries can be slowNote that the table is called mcp_servers (with an underscore).
To pass settings to the server, add an env table:
[mcp_servers.oecd.env]
OECD_MCP_LOG_LEVEL = "info"In the ChatGPT desktop app, open Settings → MCP servers → Add server. In the IDE extension, open the gear menu → MCP servers → Add server. Then:
Name:
oecdType: STDIO
Command:
npx -y oecd-mcpSave and restart when asked.
Other clients
Most MCP clients use the same JSON block. Add it to the client's MCP configuration file and restart the client.
{
"mcpServers": {
"oecd": {
"command": "npx",
"args": ["-y", "oecd-mcp"]
}
}
}Client | Where the block goes |
Claude Desktop | Settings → Developer → Edit Config ( |
Cursor |
|
VS Code |
|
Clients that only accept a URL (for example web-based assistants) need the server to run as an HTTP server.
Using the server
Just ask in plain language and mention OECD. The assistant picks the tools itself. Some questions to try:
"What is the latest OECD composite leading indicator for the US and Germany?"
"Compare health spending as a share of GDP in the Nordic countries, 2010–2023. Use OECD data."
"Which OECD datasets cover house prices?"
"Show Sweden's quarterly GDP growth for the last three years and link to the source."
"How does tax revenue as % of GDP differ between France, the UK and the US?"
Tips for good answers:
Name countries and years. "Sweden and Norway, 2015–2024" gives a precise query; "some countries recently" makes the assistant guess.
Ask for the source. Every result contains a link to the same selection in OECD Data Explorer, where you can view, chart and download the data.
One broad question beats many small ones. See the rate limit.
What the server offers
Tools
Tool | What it does |
| Search all OECD datasets by keyword, ranked by relevance |
| Browse datasets, optionally by category |
| OECD's topic categories and subcategories with dataset counts |
| A short curated list with easy aliases ( |
| Describe a dataset: dimensions, values that have data, time coverage, last update |
| List or search the codes of one dimension (countries, measures, …) |
| Fetch observations as a compact, labelled table |
| Link to the selection in OECD Data Explorer |
All tools are read-only.
Prompt templates
Ready-made starting points. In Claude Code they appear as slash commands, for
example /mcp__oecd__nordic_comparison.
Prompt | Purpose |
| How an indicator has developed over time |
| Compare countries on an indicator |
| The most recent figures on a topic |
| Guided tour of one dataset |
| Find the right dataset for a question |
| Help building the filters for a query |
| Compare Denmark, Finland, Iceland, Norway and Sweden |
Resources
Resource | Content |
| Categories and subcategories |
| Popular datasets and their aliases |
| Country codes, aggregates and country groups |
| How to select series and periods |
| Common dimensions, attributes and codes |
| Usage instructions for the assistant |
| The OECD API, its rate limit and the server's current usage |
Popular datasets
Alias | Dataset |
| Quarterly National Accounts (GDP and components) |
| National Accounts at a Glance (annual GDP, GDP per capita) |
| Composite leading indicators, business and consumer confidence |
| Consumer price indices (inflation) |
| OECD Economic Outlook (history and projections) |
| Monthly unemployment rates |
| Average annual wages |
| House price indices |
| Health expenditure and financing |
| Life expectancy |
| Income distribution (Gini, poverty) |
| Social expenditure |
| Tax revenues |
| Science and technology indicators (R&D) |
| Green growth indicators |
| Official development assistance |
These are shortcuts. Every other OECD dataset is reachable through
search_dataflows.
How a query works
You normally never see this, but it helps to know what the assistant does:
1. search_dataflows {"query": "leading indicators"}
→ DSD_STES@DF_CLI "Composite leading indicators" (alias CLI)
2. get_data_structure {"dataflow_id": "CLI"}
→ dimensions REF_AREA, FREQ, MEASURE, ADJUSTMENT, …
with the codes that have data, e.g. MEASURE: LI, BCICP, CCICP
3. query_data {
"dataflow_id": "CLI",
"filters": {"REF_AREA": ["USA", "DEU"], "FREQ": "M", "MEASURE": "LI", "ADJUSTMENT": "AA"},
"start_period": "2025-01"
}The result is a compact table:
{
"dataflow": { "id": "DSD_STES@DF_CLI", "name": "Composite leading indicators" },
"total_observations": 20,
"constants": { "FREQ": "M (Monthly)", "MEASURE": "LI (Composite leading indicator (CLI))", "UNIT_MEASURE": "IX (Index)" },
"columns": ["REF_AREA", "TIME_PERIOD", "OBS_VALUE"],
"rows": [["DEU", "2025-01", 100.3], ["DEU", "2025-02", 100.4], ["USA", "2025-01", 100.1]],
"labels": { "REF_AREA": { "DEU": "Germany", "USA": "United States" } },
"notes": [],
"explorer_url": "https://data-explorer.oecd.org/vis?df[ds]=dsDisseminateFinalDMZ&df[id]=DSD_STES%40DF_CLI&…"
}(The values above are illustrative.)
filtersis keyed by dimension ID. Dimensions you leave out stay open. Unknown dimensions or values are rejected with suggestions before OECD is called.constantsholds everything that is identical on every row, such as the unit, so it is not repeated.Time is selected with
start_period/end_period(2023,2023-Q4,2023-12) orlast_n_observations(latest N per series). Without a time range you get the latest 10 observations per series.At most
limitrows are returned (default 200, max 2,000). If a result is cut, the most recent rows are kept andnotessays so.The raw SDMX key (
"filter": "USA+DEU.M.LI......") is accepted as well.
Good to know: OECD's rate limit
OECD allows 60 downloads per hour per IP address, blocks requests from VPNs and anonymised networks, and may answer with errors when you are close to the limit (OECD's API best practices).
The server is built around this:
The dataset catalogue and dataset structures are cached for 24 hours and query results for 1 hour, in memory and on disk (
~/.cache/oecd-mcp), so restarts and repeated questions cost nothing.Searching and browsing datasets works from the cached catalogue.
When the limit is hit, the assistant gets a clear message with the current usage instead of a cryptic failure.
In practice the limit can kick in earlier when many requests arrive in a short burst. If you hit it, wait a while (typically some minutes) and continue. Asking for several countries and years in one question uses one download; asking country by country uses many.
Configuration
Everything is optional. Set these as environment variables for the server (see
the --env and env examples above).
Variable | Default | Meaning |
|
| Cache directory. Set to |
|
|
|
|
| Timeout for one request to OECD |
|
| Retries after network or server errors |
|
| Largest OECD response the server will download |
|
| How long query results are cached |
|
| How long dataset structures are cached |
|
| How long the dataset catalogue is cached |
|
| Minimum time between two requests to OECD |
|
| HTTP mode only |
| – | HTTP mode only: comma-separated |
Run as an HTTP server
For clients that connect to a URL, or to share one server (and one cache) between several users, run the server with the Streamable HTTP transport:
npx -y oecd-mcp --http # listens on http://127.0.0.1:3000/mcpConnect to it:
# Claude Code
claude mcp add --transport http oecd http://localhost:3000/mcp# Codex: ~/.codex/config.toml
[mcp_servers.oecd]
url = "http://localhost:3000/mcp"Endpoints: POST /mcp (MCP), GET /health (status and OECD usage).
Hosting it publicly. A Dockerfile is included:
docker build -t oecd-mcp .
docker run -p 3000:3000 -e OECD_MCP_ALLOWED_HOSTS=oecd.example.com oecd-mcpOne-click on Render (free plan). The repository contains a
render.yaml blueprint:
When the deploy is ready, your MCP endpoint is
https://<your-service>.onrender.com/mcp. Add that URL where your client asks
for a remote MCP server:
Client | Where |
Claude (claude.ai, desktop and mobile apps) | Settings → Connectors → Add custom connector |
ChatGPT | See OpenAI's guide: Connect an existing MCP server |
Claude Code |
|
Codex |
|
A free Render service sleeps after 15 minutes without traffic, so the first request after a pause can take up to a minute, and its cache is emptied on every restart.
Keep two things in mind. All users of a hosted server share the host's IP address and therefore OECD's 60 downloads per hour. And the server has no authentication of its own, so put it behind your own gateway if it should not be open to everyone.
Troubleshooting
Problem | What to do |
The server does not show up or fails to connect | Run |
Slow or timed-out start | The first |
"The OECD API rate limit was reached" or repeated server errors | You have used OECD's hourly quota. Wait and try again; cached results still work. |
"bot-verification page" or connection errors | OECD blocks VPNs and anonymised networks. Disconnect the VPN. |
"… is not an available value of dimension …" | The code does not exist in that dataset. Ask the assistant to look it up with |
No observations | Every value exists, but not in that combination. Ask the assistant to leave more dimensions open. |
Windows: | Use |
Want to see what happens | Set |
Development
git clone https://github.com/isakskogstad/OECD-MCP.git
cd OECD-MCP
npm install
npm run build
npm test # unit tests, offline
npm run test:live # contract tests against the real OECD API (uses ~8 requests)
npm run inspect # open the MCP Inspector against the local buildTo use a local build in a client, point it at the built file:
claude mcp add oecd -- node /absolute/path/to/OECD-MCP/dist/index.js
codex mcp add oecd -- node /absolute/path/to/OECD-MCP/dist/index.jsProject layout:
File | Responsibility |
| Entry point (stdio, |
| MCP tools, resources and instructions |
| Prompt templates and static guidance |
| Queries: builds requests, shapes results |
| Dataset catalogue, search and ID resolution |
| Dataset structures and filter-to-key conversion |
| OECD HTTP access, rate limit, cache |
| Short aliases for popular datasets |
| Streamable HTTP transport |
Changes are listed in CHANGELOG.md. Issues and pull requests are welcome.
About
Created by Isak Skogstad · isak.skogstad@me.com
This project is independent and is not affiliated with or endorsed by the OECD. Data comes from the OECD's public SDMX API and is subject to the OECD Terms and Conditions.
Licensed under the MIT License.
Available Tools
9 toolsget_categoriesA
Get all available OECD data categories (17 categories covering all topics: Economy, Health, Education, Environment, etc.)
Inputs: no named parameters.
get_dataflow_urlA
Generate an OECD Data Explorer URL for a dataset. Use this to provide users with a direct link to explore data visually in their browser.
Inputs: dataflow_id (required), filter.
get_data_structureA
Get the metadata and structure of a specific OECD dataset. Returns dimensions, attributes, and valid values for querying data.
Inputs: dataflow_id (required).
get_popular_datasetsA
Get a curated list of commonly used OECD datasets across all categories.
Inputs: no named parameters.
list_categories_detailedA
Get all OECD data categories with example datasets for each category. Returns comprehensive information about all 19 categories.
Inputs: no named parameters.
list_dataflowsA
List available OECD dataflows (datasets), optionally filtered by category. Use this to browse datasets by topic area.
Inputs: category, limit.
query_dataA
Query actual statistical data from an OECD dataset. ⚠️ IMPORTANT: Defaults to last 100 observations (max 1000) to protect context window. Use filters, time periods, or last_n_observations to control data size. Large datasets (e.g. SOCX_AGG) can have 70,000+ observations - always specify limits!
Inputs: dataflow_id (required), filter, start_period, end_period, +1 more.
search_dataflowsA
Search for OECD datasets (dataflows) by keyword. Returns matching datasets with their IDs, names, and descriptions.
Inputs: query (required), limit.
search_indicatorsB
Search for specific economic or social indicators by keyword (e.g., "inflation", "unemployment", "GDP").
Inputs: indicator (required), category.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools have distinct purposes, but get_categories and list_categories_detailed overlap in returning category info, though descriptions differentiate by detail level. search_dataflows and list_dataflows both return datasets but use different filters.
Tools follow a consistent verb_noun pattern (e.g., get_categories, search_dataflows). Minor deviations like list_categories_detailed and get_popular_datasets include adjectives, but overall pattern is clear.
9 tools cover the full workflow of browsing, searching, getting metadata, and querying data without being excessive. Each tool serves a clear role.
The set covers all necessary operations for exploring OECD data: listing/searching datasets, retrieving metadata, querying data, and generating visualization URLs. No obvious gaps for the read-only domain.
Maintenance
Related MCP Connectors
Search and query 1,500+ OECD statistical datasets via SDMX. Keyless.
Official statistics for AI agents: Eurostat, World Bank, OECD, IMF and WHO data for 150+ countries.
OECD MCP — Organisation for Economic Co-operation and Development data (free, no auth) via the…
Premium live data from S&P Global, FRED, OECD & more, plus web search, in one call.
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
- AlicenseAqualityBmaintenanceProvides 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.1024 PyPI1MIT
- AlicenseNot gradedqualityBmaintenanceEnables searching, exploring, and querying over 1,500 OECD statistical datasets via SDMX, covering national accounts, employment, trade, PISA, health, and more.384 npm5Apache 2.0
- 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