Oecd Mcp Server

io.github.cyanheads由 GitHub 帳號 cyanheads 發布v0.6.1更新於 Nov 3, 2026

通過SDMX搜尋和查詢1500多個OECD統計資料集。無需金鑰。

AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。

原文描述

Search and query 1,500+ OECD statistical datasets via SDMX. Keyless.

已驗證Streamable HTTP可網頁執行資料庫資料與分析

概覽

Oecd 的託管 MCP 服務(oecd.caseyjhand.com);無需登入;Streamable HTTP;7 個工具。

暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。

端點
oecd.caseyjhand.com
最近檢查

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Oecd Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.cyanheads%2Foecd-mcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "oecd": {
      "type": "http",
      "url": "https://oecd.caseyjhand.com/mcp"
    }
  }
}

README

@cyanheads/oecd-mcp-server

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

8 Tools • 1 Resource • 1 Skill

Public Hosted Server: https://oecd.caseyjhand.com/mcp


Overview

OECD statistics across 1,500+ datasets on national accounts, employment, trade, education, and health. Search datasets, inspect their dimensions, query observations, and run SQL over large multi-country time series. No API key required.

Tools

Five discovery and data tools plus three DataCanvas tools for large query results:

ToolDescription
oecd_list_agenciesList OECD SDMX agencies with their directorate and the number of dataflows each publishes
oecd_search_datasetsSearch 1,500+ OECD dataflows by keyword or theme
oecd_get_dataset_infoFetch a dataflow's dimensions, key order, and codelist references
oecd_get_dimension_valuesFetch valid codes and labels for one dimension (countries, measures, frequencies)
oecd_query_datasetFetch observations filtered by dimension key and time range; spills large results to DataCanvas
oecd_dataframe_describeList DataCanvas tables and columns staged by a prior oecd_query_dataset spill
oecd_dataframe_queryRun a read-only SQL SELECT against DataCanvas tables
oecd_dataframe_dropDrop a staged DataCanvas table or view once the analysis is done — opt-in via OECD_DATAFRAME_DROP_ENABLED=true

Resources

ResourceDescription
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.

Skill

SkillDescription
oecd-guideBuilding SDMX keys, confirming which series a dataflow carries, and reading results without mixing breakdowns, units, or country aggregates. Served over MCP at skill://oecd-guide/SKILL.md

Capability reference

oecd_list_agencies tool

  • No inputs; returns every agency ID (e.g. OECD.SDD.NAD) with its directorate name and dataflow count, sorted by count
  • Publishers outside OECD that ship dataflows through the same catalog (ESTAT, IAEG-SDGs) carry no directorate

oecd_search_datasets tool

  • query token-matched across dataflow names and descriptions; optional agency_id scope; limit (1–100) and offset paging with total_matches
  • Each result carries its flow_ref — the identifier every other tool takes — and matched_in (name, description, or both)

oecd_get_dataset_info tool

  • Takes a flow_ref; returns every dimension in key order with its concept name and codelist reference, plus a key_example for oecd_query_dataset
  • Fails invalid_flow_ref for a string that is not a flow reference and dataflow_not_found for one OECD does not publish

oecd_get_dimension_values tool

  • Takes a flow_ref and dimension_id; optional query substring-matches both code and label
  • limit (1–500, default 50) and offset page the matches, with the full match count when more remain

oecd_query_dataset tool

  • flow_ref plus a dot-delimited key (+ for multiple values, empty segments as wildcards) and optional start_period / end_period
  • One row per observation with every dimension and attribute as its own column; value is pre-multiplied by value_scale
  • Large results spill to DataCanvas with truncated: true, canvas_id, and table_name; without a canvas every row stays in structuredContent and only the rendered table is capped (content_table_capped)
  • A spill includes a notice naming the canvas and table: inspect columns with oecd_dataframe_describe, then use oecd_dataframe_query for SQL over the full result. Fitting results allocate no new canvas; an explicit canvas_id is checked before the download, so a stale one fails as canvas_not_found without spending an OECD request.

oecd_dataframe_describe tool

  • Takes the canvas_id oecd_query_dataset returned; lists each staged table and view with its row count and column names and types

oecd_dataframe_query tool

  • canvas_id plus one read-only SQL SELECT; writes, DDL, and system-catalog access are rejected
  • limit (default 100) returns up to 1,000 rows per call, within 1 MiB of row data; a limit from 1,001 to 10,000 is served at 1,000 with a notice
  • truncated: true marks a result with more rows than it returned, and its notice names how to reach the rest; row_count counts the rows returned
  • A query still running after 30 seconds is stopped with query_timeout

oecd_dataframe_drop tool

  • canvas_id plus a table_name as oecd_dataframe_describe lists it; returns the dropped object's kind and the remaining_tables
  • Opt-in: listed but not callable unless OECD_DATAFRAME_DROP_ENABLED=true

oecd://dataflow/{agency_id}/{flow_id} resource

  • Same content as oecd_get_dataset_info, as application/json
  • {flow_id} is {dsd_id}@{df_id} with @ encoded as %40 (e.g. oecd://dataflow/OECD.SDD.NAD/DSD_NAAG%40DF_NAAG_I), or the bare {df_id}

Features

Built 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:

  • 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 and codelist revisions resolved end to end — a dataflow OECD catalogues on one service root but defines on another follows the catalog's own link for structure, codes, and observations, and codes come from the revision the datastructure names rather than the endpoint's current latest
  • AllDimensions observation mode — one-pass SDMX-JSON decoding into flat row objects, no nested series key reconstruction
  • oecd_query_dataset materializes large observation sets (multi-country time-series) on a DuckDB DataCanvas for in-conversation SQL analytics; the oecd_dataframe_* tools work on it; DataCanvas is on by default and CANVAS_PROVIDER_TYPE=none disables it

Agent-friendly output:

  • Workflow-aware tool surface — flow_ref from search flows directly into info, values, and query tools without reconstruction
  • Spill signaling — truncated: true + canvas_id tells the agent to switch to SQL instead of parsing a truncated inline list
  • Full 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

Connect to the hosted instance, no install:

sh
claude mcp add --transport http oecd-mcp-server https://oecd.caseyjhand.com/mcp

Or run it locally:

sh
claude mcp add oecd-mcp-server -- npx -y @cyanheads/oecd-mcp-server

For other clients, add this to the MCP config file:

json
{  "mcpServers": {    "oecd-mcp-server": {      "command": "npx",      "args": ["-y", "@cyanheads/oecd-mcp-server"]    }  }}

No API key is needed — OECD SDMX is a free, public API. DataCanvas SQL analytics over large query results is on by default; set CANVAS_PROVIDER_TYPE=none to get capped inline previews instead. For Docker or a source build, see Running the server.

Configuration

All configuration is validated at startup via Zod schemas in src/config/server-config.ts. Key environment variables:

VariableDescriptionDefault
OECD_BASE_URLOECD 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_MSPer-request timeout in milliseconds.30000
CANVAS_PROVIDER_TYPECanvas engine. With duckdb, a large oecd_query_dataset result spills to a queryable table instead of just capping the rendered preview; with none, every row still comes back in structuredContent and only the rendered table is capped.duckdb
OECD_DATAFRAME_DROP_ENABLEDSet to true to register oecd_dataframe_drop. Off, the tool is listed as disabled and clients cannot call it.false
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTPort for HTTP server.3010
MCP_SESSION_MODEHTTP 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_MODEAuth mode: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (RFC 5424).info
LOGS_DIRDirectory for log files (Node.js only).<project-root>/logs
LOG_TOOL_FAILURE_PAYLOADSLog each failed tool call's arguments and result, redacted by key name and capped at LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES (default 16384). A secret inside a free-form value is not redacted.false
OTEL_ENABLEDEnable OpenTelemetry instrumentation.false

See .env.example for the full list of optional overrides.

Running the server

Local development

Requires Bun v1.4.0 or higher (or Node.js v24+).

  • Clone and install:

    sh
    git clone https://github.com/cyanheads/oecd-mcp-server.gitcd oecd-mcp-server && bun installcp .env.example .env   # optional — every variable has a default
  • Build and run:

    sh
    # One-time buildbun run rebuild
    # Run the built serverbun run start:stdio# orbun run start:http
  • Run checks and tests:

    sh
    bun run devcheck   # Lint, format, typecheck, securitybun run test       # Vitest test suitebun run lint:mcp   # Validate MCP definitions against spec

Docker

sh
docker run --rm -p 3010:3010 ghcr.io/cyanheads/oecd-mcp-server:latest

The image defaults to HTTP transport, stateless session mode, and logs to /var/log/oecd-mcp-server. To run it over stdio from an MCP client, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/oecd-mcp-server:latest"]. To build locally, docker build -t oecd-mcp-server .; OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.

Project structure

DirectoryPurpose
src/index.tscreateApp() 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) — eight tools for OECD data discovery, retrieval, and DataCanvas analysis.
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 response-body reader both share, 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.
skills/Published agent skill (oecd-guide), served over MCP and shipped in the npm package and Docker image.
tests/Unit and integration tests mirroring src/.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for request-scoped logging, ctx.state for tenant-scoped storage
  • Register new tools and resources via the barrels in src/mcp-server/*/index.ts
  • Wrap external API calls: validate raw SDMX-JSON → normalize to domain type → return output schema; never fabricate missing fields

Contributing

Issues 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:

sh
bun run devcheckbun run test

License

Apache-2.0 — see LICENSE for details.

來源:README.md,提交 ea92c52

工具

7

oecd_list_agencies

Oecd List Agencies

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.

無需輸入參數。

oecd_search_datasets

Oecd Search Datasets

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.

輸入參數limitquery必填offsetagency_id

oecd_get_dataset_info

Oecd Get Dataset Info

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.

輸入參數flow_ref必填

oecd_get_dimension_values

Oecd Get Dimension Values

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.

輸入參數limitqueryoffsetflow_ref必填dimension_id必填

oecd_query_dataset

Oecd Query Dataset

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 — inspect columns with oecd_dataframe_describe, then query the full table with SQL using 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.

輸入參數key必填flow_ref必填canvas_idend_periodstart_period

oecd_dataframe_describe

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. Unavailable when the server runs with DataCanvas disabled.

輸入參數canvas_id必填

oecd_dataframe_query

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. Returns up to `limit` rows (default 100, at most 1,000 per call) and at most 1 MiB of row data; truncated: true marks a result with more rows than came back, and its notice says how to reach the rest. A query still running after 30 seconds is stopped. Unavailable when the server runs with DataCanvas disabled.

輸入參數sql必填limitcanvas_id必填

版本歷史

6
  1. v0.6.1最新Nov 3, 2026
  2. v0.6.0Oct 29, 2026
  3. v0.5.0Oct 25, 2026
  4. v0.4.0Oct 4, 2026
  5. v0.3.2Sep 20, 2026
  6. v0.3.1Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分