An MCP server for OECD health statistics
OECD health data sits in multi-dimensional cubes that a model struggles to query. I forked an open-source OECD MCP server and rebuilt it around health data, with curated indicators and country groups.
Updated18 May 2026
The problem
I wanted OECD health statistics as comparators inside a Claude session: life expectancy, physicians per 1,000 people, infant mortality, health spending, across groups such as the G7 or the Nordic countries. The OECD publishes them through a public SDMX API, but each dataset is a multi-dimensional cube (life expectancy has 14 dimensions, the health accounts 13), and asking a model to build a positional filter like MEASURE=LFEXP, SEX=_T, AGE=Y0 by hand is fragile.
What was out there
isakskogstad/OECD-MCP, an MIT-licensed open-source server, already gave assistants access to the OECD's statistics across all topics. I used it as the base and narrowed it to health.
What I built
A TypeScript MCP server for the OECD Health Division catalog, with 14 tools, 9 resources and 4 prompts. It covers 85 health dataflows in 12 themes, from expenditure and workforce to risk factors, quality and pharmaceuticals. Sixteen curated indicators let the assistant ask for "life expectancy at birth" and get one value per country and year, without writing SDMX filters. Named groups (all OECD members, G7, Nordic, EU members of the OECD, Anglosphere, Asia-Pacific, Southern Europe, Central and Eastern Europe, and the four Latin American members) resolve to country codes, and a coverage tool shows which countries actually return data for a dataflow.
Equipment
- OECD Health MCP MCP servers
- OECD health statistics (SDMX API) Data sources
- Node.js Code and infrastructure
- Claude Code Harnesses and agents
- Claude (Opus 4.6 to 5.5) AI models
- Codex CLI Harnesses and agents
How I built it
- Forked OECD-MCP, kept its stdio transport and removed everything outside health.
- Wrote a script that regenerates the catalog of health dataflows from the OECD's live SDMX catalog, with friendly aliases (
LEfor life expectancy) kept in a separate file so they survive each refresh. - Probed each candidate dataflow and added a curated indicator only when its slice returned real values for at least three countries.
- Built a filter builder that reads each dataflow's dimension order and refuses unknown keys, so a typo fails loudly instead of returning the wrong slice.
- Added a request throttle (at least 2.5 seconds between calls) and a circuit breaker for rate limits, then had Codex review the server twice and fixed what it found.
Results
- 14 tools, 9 resources and 4 prompts, registered in Claude Code.
- 85 dataflows, 16 curated indicators and 10 country-group names (9 groups plus an alias for all OECD members).
- A smoke test with 13 checks covers the protocol surface, alias resolution and real OECD fetches, and skips rather than fails when the API rate-limits.
What I learned
The OECD health accounts dataflow does not store precomputed totals. The headline "current health expenditure as a share of GDP" is aggregated by the OECD Data Explorer, so a request for a total slice returns zero observations. My spending indicators therefore target specific slices and say so in their notes.
OECD data is thin outside its members. I started with Latin America in mind, including 23 partner countries with sparse coverage, and then switched to a general OECD comparator: the Latin America group now holds only Chile, Colombia, Costa Rica and Mexico.
The OECD API's per-IP rate limit is strict: about 20 to 30 rapid requests trigger a block of 5 to 15 minutes. Failing fast with a clear retry message works better than letting every call wait for a 30-second timeout.
Lab notes
-
I dropped the Latin America focus, replacing 12 Latin American groups with 10 broad OECD group names, and added a circuit breaker that pauses all calls for 5 minutes when the OECD API rate-limits the server. Codex's second review caught a race in concurrent breaker checks and the silent dropping of unknown filter keys, and I fixed both.
-
I forked the open-source OECD-MCP server, removed the non-health categories, generated a catalog of the 85 dataflows of the OECD Health Division and added curated indicators that map a plain name to the exact slice of a dataflow. Codex's first review led to fixes in alias resolution, theme filtering and stray output on the protocol channel.