oecd-mcp-server

v0.3.0 pre-1.0

Search, explore, and query 1,500+ OECD statistical datasets (national accounts, employment, trade, education, health) via SDMX via MCP. STDIO or Streamable HTTP.

oecd.caseyjhand.com/mcp
claude mcp add --transport http oecd-mcp-server https://oecd.caseyjhand.com/mcp
codex mcp add oecd-mcp-server --url https://oecd.caseyjhand.com/mcp
{
  "mcpServers": {
    "oecd-mcp-server": {
      "url": "https://oecd.caseyjhand.com/mcp"
    }
  }
}
gemini mcp add --transport http oecd-mcp-server https://oecd.caseyjhand.com/mcp
{
  "mcpServers": {
    "oecd-mcp-server": {
      "command": "bunx",
      "args": [
        "mcp-remote",
        "https://oecd.caseyjhand.com/mcp"
      ]
    }
  }
}
{
  "mcpServers": {
    "oecd-mcp-server": {
      "type": "http",
      "url": "https://oecd.caseyjhand.com/mcp"
    }
  }
}
curl -X POST https://oecd.caseyjhand.com/mcp \
  -H "Content-Type: application/json" \
  -H "MCP-Protocol-Version: 2025-11-25" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1.0.0"}}}'

Tools

7

oecd_list_agencies

open-world

List OECD SDMX agencies, the directorate each belongs to, and the number of dataflows each publishes. Use to discover agency IDs before filtering oecd_search_datasets by department.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "oecd_list_agencies",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
view source ↗

oecd_search_datasets

open-world

Search OECD dataflows by keyword or theme, matching against dataflow names and descriptions. Returns flow_ref identifiers, names, and agency IDs for use with oecd_get_dataset_info.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "oecd_search_datasets",
    "arguments": {
      "query": "<query>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Keyword or phrase to search for in dataflow names and descriptions — e.g. \"GDP\", \"employment\", \"education\". Every whitespace-separated token must appear somewhere in the name or description."
    },
    "agency_id": {
      "description": "Optional agency identifier to restrict the search scope — e.g. \"OECD.SDD.NAD\". Obtain valid agency IDs from oecd_list_agencies.",
      "type": "string"
    },
    "limit": {
      "default": 20,
      "description": "Maximum number of results to return (1–100, default 20).",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "offset": {
      "default": 0,
      "description": "Zero-based index of the first match to return, applied before limit. Page through results past the limit by advancing it; an offset at or past total_matches returns an empty list.",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "query",
    "limit",
    "offset"
  ],
  "additionalProperties": false
}
view source ↗

oecd_get_dataset_info

open-world

Fetch a dataflow's dimensions, their order, and how to construct a query key. Returns per-dimension names, codelist references, and position in the dot-delimited key. Required before calling oecd_query_dataset to understand key structure.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "oecd_get_dataset_info",
    "arguments": {
      "flow_ref": "<flow_ref>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "flow_ref": {
      "type": "string",
      "description": "Full flow reference, either {agencyID},{dsd_id}@{df_id} — e.g. \"OECD.SDD.NAD,DSD_NAAG@DF_NAAG_I\" — or the bare {agencyID},{df_id} form OECD uses for the few dataflows published without a datastructure prefix. Obtain from oecd_search_datasets."
    }
  },
  "required": [
    "flow_ref"
  ],
  "additionalProperties": false
}
view source ↗

oecd_get_dimension_values

open-world

Fetch the valid codes and labels for one dimension of a dataflow. Use to resolve human-readable names (countries, measures) to SDMX codes before querying with oecd_query_dataset. Pass query to match a code or label by substring — codelists run to a thousand-plus entries, and the response is a page of at most limit codes either way.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "oecd_get_dimension_values",
    "arguments": {
      "flow_ref": "<flow_ref>",
      "dimension_id": "<dimension_id>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "flow_ref": {
      "type": "string",
      "description": "Full flow reference — e.g. \"OECD.SDD.NAD,DSD_NAAG@DF_NAAG_I\", or the bare \"OECD.TAD.ARP,DF_AEI2024_DASHBOARD\" form for a dataflow published without a datastructure prefix. Obtain from oecd_search_datasets."
    },
    "dimension_id": {
      "type": "string",
      "description": "Dimension identifier to fetch codes for — e.g. \"REF_AREA\" or \"MEASURE\". Obtain valid dimension IDs from oecd_get_dataset_info."
    },
    "query": {
      "description": "Case-insensitive substring matched against both the code and its label, so \"PA\" and \"percent\" each reach the code \"PA\" / \"Percent per annum\". Omit to page the whole codelist.",
      "type": "string"
    },
    "limit": {
      "default": 50,
      "description": "Maximum codes to return (1–500, default 50).",
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "offset": {
      "default": 0,
      "description": "Zero-based index of the first code to return within the matching list, applied before limit. Advance it to page; an offset past the last match returns an empty page.",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "flow_ref",
    "dimension_id",
    "limit",
    "offset"
  ],
  "additionalProperties": false
}
view source ↗

oecd_query_dataset

open-world

Fetch observations from an OECD dataflow filtered by a dimension key and optional time range. Returns decoded rows (one per observation) with dimension and attribute labels, and values already scaled by the observation unit multiplier. Large multi-country time-series spill to a DataCanvas table — follow up with oecd_dataframe_query; without DataCanvas every row still comes back, but the rendered table stops at a preview slice. Call oecd_get_dataset_info first to learn the dimension order for constructing the key.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "oecd_query_dataset",
    "arguments": {
      "flow_ref": "<flow_ref>",
      "key": "<key>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "flow_ref": {
      "type": "string",
      "description": "Full flow reference — e.g. \"OECD.SDD.NAD,DSD_NAAG@DF_NAAG_I\", or the bare \"OECD.TAD.ARP,DF_AEI2024_DASHBOARD\" form for a dataflow published without a datastructure prefix. Obtain from oecd_search_datasets and pass it through unchanged."
    },
    "key": {
      "type": "string",
      "description": "Dot-delimited dimension key matching the dimension order from oecd_get_dataset_info. Empty segments are wildcards; \"+\" separates multiple values per segment. Example: \"A.USA+DEU.B1GQ..\" — Annual, USA or Germany, GDP, all remaining dimensions."
    },
    "start_period": {
      "description": "Start of the time range — ISO period code such as \"2010\", \"2010-Q1\", or \"2010-01\". Omit to include all history (may produce very large results).",
      "type": "string"
    },
    "end_period": {
      "description": "End of the time range — ISO period code such as \"2023\" or \"2023-Q4\". Omit to include up to the latest available period.",
      "type": "string"
    },
    "canvas_id": {
      "description": "Canvas ID from a prior oecd_query_dataset call, to stage this result alongside that one. Omit to let the server mint a canvas if this result needs one — a canvas_id comes back only when the result was large enough to spill, never on a result that fits inline.",
      "type": "string"
    }
  },
  "required": [
    "flow_ref",
    "key"
  ],
  "additionalProperties": false
}
view source ↗

oecd_dataframe_describe

List tables and columns staged on a DataCanvas by a prior oecd_query_dataset spill. Call this before oecd_dataframe_query to discover exact table and column names for SQL. Only available when CANVAS_PROVIDER_TYPE=duckdb is set.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "oecd_dataframe_describe",
    "arguments": {
      "canvas_id": "<canvas_id>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "canvas_id": {
      "type": "string",
      "description": "Canvas ID returned by oecd_query_dataset. Identifies the DataCanvas session holding the staged observation tables."
    }
  },
  "required": [
    "canvas_id"
  ],
  "additionalProperties": false
}
view source ↗

oecd_dataframe_query

Run a read-only SQL SELECT against OECD observation tables staged on a DataCanvas by oecd_query_dataset. Call oecd_dataframe_describe first to discover exact table and column names, then use this tool for aggregation, filtering, GROUP BY, JOIN, and window functions. Only available when CANVAS_PROVIDER_TYPE=duckdb is set.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "oecd_dataframe_query",
    "arguments": {
      "canvas_id": "<canvas_id>",
      "sql": "<sql>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "canvas_id": {
      "type": "string",
      "description": "Canvas ID returned by oecd_query_dataset. Identifies the DataCanvas session holding the observation tables."
    },
    "sql": {
      "type": "string",
      "description": "Read-only SELECT statement. Reference tables by the names returned by oecd_dataframe_describe. Only SELECT statements are allowed — DDL, DML, and file-reading functions are rejected."
    }
  },
  "required": [
    "canvas_id",
    "sql"
  ],
  "additionalProperties": false
}
view source ↗

Resources

1

Dimension metadata for a single OECD dataflow — same content as oecd_get_dataset_info. {flow_id} is the combined {dsd_id}@{df_id} string with @ percent-encoded as %40 in the URI, or the bare {df_id} for the few dataflows OECD publishes without a datastructure prefix. Example: oecd://dataflow/OECD.SDD.NAD/DSD_NAAG%40DF_NAAG_I

uri oecd://dataflow/{agency_id}/{flow_id} mime application/json