oecd-sdmx-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
oecd-sdmx-mcp
A multi-user Model Context Protocol server for the OECD SDMX Data API (the
public data dissemination space at https://sdmx.oecd.org/public/rest/). It
supports stdio and authenticated Streamable HTTP, with the skeleton's optional
LangGraph agent, A2A endpoint, durable worker, Vault/Postgres persistence, and
pg-boss scheduling.
This is a new, standalone adaptation of the MIT-licensed
skeleton-mcp, based on commit
bfbf26a6939a3c3c387a34bd2461f1bb5d0b8eec. The pre-existing local OECD API
documentation snapshots in API-DOCS.md and docs/
were preserved and are the grounding sources for the implemented API surface.
Agent configuration, task, and schedule state live in scoped Postgres tables;
secrets (including the optional upstream token) live only in Vault.
API versions and coverage
The OECD Data API documentation (last updated 17 September 2026) states that only the syntax it lists is guaranteed to be supported. This server implements every guaranteed callable operation with a dedicated MCP tool:
Version | Operation | MCP tool | Endpoint |
v1 | Data query |
|
|
v2 | Data query |
|
|
v1 | Dataflow listing |
|
|
v1 | Dataflow structure |
|
|
v2 | Dataflow structure |
|
|
v1 | Content constraint (update detection) |
|
|
All six operations are read-only GET requests. The machine-readable
endpoint inventory and the generated
endpoint-to-tool coverage report map every required
operation to its tool and record 39 generic SDMX-REST operations (served by
the OpenAPI specifications in docs/sdmx-rest-v1.yaml / docs/sdmx-rest-v2.yaml)
as explicitly not-required because the OECD documentation does not guarantee
them. Structural artefacts (DSDs, codelists, concept schemes) are retrieved
through the guaranteed dataflow structure queries with
references=all&detail=referencepartial. Reference metadata is available only
through the v2 data query (attributes=msd).
Documented optional parameters are validated per version: startPeriod,
endPeriod, lastNObservations, dimensionAtObservation, detail, and
updatedAfter for v1 data; c[TIME_PERIOD], lastNObservations,
dimensionAtObservation, attributes, measures, and updatedAfter for v2
data. Response formats use the documented non-standard format URL parameter
(genericdata, structurespecificdata, jsondata, csv, csvfile,
csvfilewithlabels; structure plus formatVersion for structure queries)
or an explicit documented SDMX accept media type, plus acceptLanguage for
the Accept-Language header. JSON responses are parsed; other formats are
returned as text. Use oecd_discover_operations for the complete operation
schemas and oecd_suggest_query to produce a schema-valid placeholder call
without making a request.
Related MCP server: OECD MCP Server
Rate limits, restricted parameters, and reliability
The OECD API is limited to 60 data downloads per hour; data tools are marked accordingly and HTTP 429 responses return an actionable error. Cache results locally and prefer
oecd_v1_get_content_constraint(itsValidFromtimestamp and observation-count annotation) to detect dataset updates before downloading.lastNObservationsis blocked for the 12 documented very large dataflows (and the TiVA/CRS dedicated spaces); such requests return HTTP 413, which is surfaced with guidance to remove the parameter or slice the query.Requests time out after
OECD_TIMEOUT_MS(default 30000 ms); responses are capped atOECD_MAX_RESPONSE_BYTES(default 10 MiB) with slicing guidance. Slice large extractions by dimension filter, time period (startPeriod/endPeriodorc[TIME_PERIOD]), or incrementalupdatedAftersyncs; the API has no offset pagination.All operations are read-only, so transient upstream failures (429/502/503/504) get a single bounded retry honoring
Retry-Afterup to two seconds. There are no mutating upstream operations.
Credentials and identity
The OECD public dissemination space requires no API key or upstream
authentication. All OECD data tools work immediately without provisioning
any credential. For parity with sibling skeleton builds — and for deployments
that place an authenticated gateway in front of the OECD API — an optional
upstream bearer token can be provisioned per principal:
oecd_credential_set stores or rotates it in Vault (it is then sent as an
Authorization: Bearer header), oecd_credential_status reveals only whether
it exists, and oecd_credential_delete removes the local Vault value.
Credential tools require mcp:admin for OAuth callers, or a configured
MCP_ADMIN_AUTH_KEY in key-authorized mode, and never return the stored
value; responses and errors are scrubbed of the token.
Credentials use an exact SHA-256 digest of (tenant_id, principal_type, principal_id) under MCP_SERVER_NAME/oecd/credentials/. There is no
cross-user credential fallback. Identity is taken from authenticated context,
not caller-supplied tenant/principal fields. Stdio and static-token HTTP use
the configured default identity; use Vault-index tokens or verified OAuth
identities to isolate individual HTTP callers.
All OECD tools are excluded from autonomous agent capabilities so potentially large API responses and credential operations cannot enter tasks, durable checkpoints, or agent memory.
OAuth scope contract
HTTP OAuth uses introspection; this server does not issue tokens. Provider scope mappings are allowlists configured by the skeleton's OAuth environment variables. The OECD API itself has no upstream OAuth scopes (it is unauthenticated for the public space).
MCP scope | Purpose and authorization |
| Required by default for Vault-index HTTP bearer tokens; permits authenticated invocation and is required for agent/A2A execution. |
| Accepted descriptive read capability; current direct read tools (all |
| Authorizes ordinary mutating operations (for example |
| Admin-only Vault credential/token lifecycle (including |
| Alternative scope for agent invocation where configured. |
| Tenant-bounded user/account and token administration. |
| Tenant-bounded cross-user agent configuration administration. |
| Trusted hosted-proxy caller initialization; only accepted with a configured trusted proxy identity. |
OAuth providers may require an admission scope such as mcp:invoke; configure
MCP_HTTP_OAUTH2_REQUIRED_SCOPES or the provider-specific equivalent, e.g.
MCP_HTTP_OAUTH2_OKTA_SCOPE_MAP=api.invoke:mcp:invoke,api.admin:mcp:admin.
Configure the OAuth client's requested scopes to match the server's admission
and authorization policy. In auto mode verified OAuth callers use scopes;
stdio/static-token callers use MCP_ADMIN_AUTH_KEY for protected operations.
The default Vault-index token verifier requires mcp:invoke. All oecd_v*
data tools are read-only and require only authenticated admission, never
mcp:write or mcp:admin.
Run locally
Requirements: Node.js 22+, Postgres, and Vault. Copy .env.example to .env,
provision infrastructure credentials locally, and never commit .env.
MCP_SERVER_NAME=oecd-sdmx-mcp is the sole namespace source for Vault paths,
Postgres tables/schemas, checkpoint schema, and queue names. Changing it
changes the persistence namespace and requires an explicit migration plan
(npm run vault:migrate-namespace assists Vault moves). APP_NAME is only a
legacy migration input.
npm ci
npm run start:stdio
# or:
npm run start:http
npm run start:bothPersistence and External Services Mode
For local containers, docker compose up starts Postgres, Raft-backed Vault
(with the vault-unseal-key-init managed-unseal startup ordering), the MCP
HTTP server, and the dedicated agent worker. Run server and worker with the
same MCP_SERVER_NAME, database, and Vault settings. Agent scheduling
requires MCP_AGENT_WORKER_ENABLED=true and PGBOSS_ENABLED=true; the worker
is a separate npm run start:agent-worker process. The supported external
services path is docker-compose.external.yml; configure POSTGRES_HOST,
POSTGRES_PORT, POSTGRES_DB, POSTGRES_USER, POSTGRES_PASSWORD,
VAULT_ADDR, and VAULT_TOKEN through deployment secrets. Keep queue and
application tables in the same Postgres database for transactional dispatch.
Agent inference is not configured automatically. A fresh deployment with
healthy Vault/Postgres starts all transports and workers, reports
infrastructure readiness separately from inference readiness, and rejects
inference-dependent requests with actionable errors. Use the existing
agent_config_* tools (agent_config_get, agent_config_set,
agent_config_update, agent_config_delete, agent_config_validate,
agent_config_test_connection) and the Vault credential tools to set up
inference after deployment, without code changes or a rebuild:
Discover fields with
agent_config_validateandservice_query_suggestion-style discovery (oecd_discover_operationscovers the OECD surface).Provision the inference credential into scoped Vault storage via the skeleton's credential tooling.
Create scoped configuration with
agent_config_set(protocol, endpoint, model, Vault credential reference, instructions, permitted capabilities, limits, memory settings).Validate with
agent_config_validate, then test explicitly withagent_config_test_connection(makes a network call to the configured provider and may incur provider costs).Submit a non-destructive verification task with
agent_goaland inspect it withagent_task_status.
See the inherited skeleton operations reference,
the onboarding playbook, and
vault-production/README.md for agent, A2A,
schedule, Vault Raft, managed unseal, backup, and recovery details.
HTTP TLS
MCP_HTTP_TLS_ENABLED=false is the default, matching .env.example. HTTP is
for loopback development or a trusted internal connection behind a
TLS-terminating reverse proxy (MCP_HTTP_TRUST_PROXY=true). Native TLS
remains configurable:
Set
MCP_HTTP_TLS_ENABLED=true.Provision
MCP_HTTP_TLS_CERT_PATHandMCP_HTTP_TLS_KEY_PATHexternally.Optionally configure
MCP_HTTP_TLS_KEY_PASSPHRASEandMCP_HTTP_TLS_MIN_VERSION(defaultTLSv1.2).Mount certificate and key files read-only in containers.
Startup fails if TLS files are missing or unreadable; it never falls back to
plaintext HTTP. Renew/rotate certificates externally and restart the process.
Use HTTPS client URLs and set MCP_A2A_PUBLIC_URL to the HTTPS address when
TLS is enabled. Never commit certificates or private keys.
HTTP retains bearer/OAuth authentication, request body limits, rate limits, and optional IP/origin controls. The default listener is loopback.
Configuration and checks
Common service variables:
Variable | Purpose | Default |
| Server identity and persistence namespace |
|
| OECD request timeout |
|
| OECD response size cap |
|
| Native HTTP TLS listener |
|
|
|
|
|
|
|
| Agent worker activation | Set |
| Durable queues/scheduler |
|
See .env.example and the skeleton environment reference
for Postgres, Vault, OAuth, token, agent, worker, A2A, and HTTP hardening
settings. docker-compose.yml preserves the vault-unseal-key-init startup
ordering. Do not commit credentials, Vault data, or unseal-key material.
Reproducible inventory and local test commands:
npm run inventory:generate
npm run inventory:check
npm testinventory:check verifies deterministic output, unique documented endpoints,
tool mappings, read-only classification, not-required recording, and test
mapping. GitHub Actions runs inventory and tests on pull requests and pushes.
Install the versioned pre-push check after Git initialization with
git config core.hooksPath .githooks; it runs inventory validation and tests
and blocks a normal push when they fail.
Unit and mocked transport tests do not imply live API or infrastructure verification. Disposable Postgres/Vault integration tests are opt-in and may skip when services are unavailable. Controlled inference, live OECD API, and GitHub Actions checks require their respective external setup. No inference provider, paid model, or production credential is required for this build; live OECD smoke tests are optional post-deployment checks and are non-destructive (the entire guaranteed surface is read-only).
License
MIT, inherited from skeleton-mcp; see LICENSE. OECD data retrieved through this server is subject to the OECD Terms and Conditions.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search and query 1,500+ OECD statistical datasets via SDMX. Keyless.
SDMX Structure MCP — dataflow dimensions and code lists for any SDMX 2.1 registry: Eurostat, OECD…
Query IMF SDMX 3.0 macroeconomic dataflows — WEO, BOP, CPI, exchange rates, 190 countries.
OECD MCP — Organisation for Economic Co-operation and Development data (free, no auth) via the…
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides AI assistants access to over 5,000 OECD economic and statistical datasets via the SDMX API for search, analysis, and comparison across 38 countries.97MIT
- 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
- AlicenseAqualityDmaintenanceEnables querying, exploring, and downloading ISTAT statistical datasets via SDMX REST API, with unified metadata, territorial code resolution, and data extraction.7MIT