Skip to main content
Glama
centralbank-data MCP Server

centralbank-data MCP Server

by benjamin-di

centralbank-data

Unified Python SDK, CLI, local metadata catalog & cache, and MCP server for European and UK central bank data warehouses — starting with the European Central Bank (ECB).

centralbank-data is built library-first with a 2-dependency pure-Python core (httpx + defusedxml): downstream Python applications, risk/analytics pipelines, and notebooks can import the core package directly with zero MCP, pandas, pyarrow, or lxml overhead, while AI agents query the exact same normalized service through a compact, read-only MCP surface.

Status: Architecture, warehouse reference, and phased roadmap verified against live endpoints (pre-0.1.0). Implementation begins with Phase 1 (core engine, SDMX 2.1 dialect engine, ECB Data Portal, cbdata CLI, and 5-tool FastMCP 4 server).

Why this exists

European and UK central banks publish rich, free, authoritative macroeconomic and financial datasets — policy rates, yield curves, exchange rates, HICP inflation, money supply, bank lending surveys, credit aggregates, and balance sheets — but their data warehouses are fragmented across:

  • SDMX 2.1 / 3.0 REST APIs (ECB, Deutsche Bundesbank, Norges Bank, National Bank of Belgium, BIS, Eurostat)

  • Custom REST / Cube & StatBank APIs (Swiss National Bank, Sveriges Riksbank, Danmarks Nationalbank)

  • Legacy CSV endpoints (Bank of England IADB)

Working directly against these warehouses has two recurring friction points:

  1. Cryptic series keys & heavy metadata: querying ECB requires knowing keys like FM.D.U2.EUR.4F.KR.DFR.LEV across 215 SDMX dataflows; Bank of England IADB has no search API at all; Eurostat's dataflow catalog alone is 7.08 MB (8,167 datasets).

  2. Inconsistent wire formats & dialects: CSV delimiters (, vs ;, locale-dependent on Bundesbank), UTF-8 BOMs, missing-value tokens ("." on Bundesbank, blank cells on BoE), non-ISO dates (02 Jan 2026, 2026M11D26), and historical revisions vary by bank.

centralbank-data solves both once:

  • Normalized data model: exact-key SeriesID (<provider>:<dataset>:<key>), one Observation schema with full-series atomic replace caching, and canonical cross-bank indicator mappings.

  • Local SQLite FTS5 catalog & observation cache: plain-English search (sanitized against FTS5 syntax errors) across dataflows, codelists, and curated series without dumping megabytes of SDMX XML into LLM context.

  • Multiple thin interfaces over one synchronous core:

    • Python SDK (pip install centralbank-data) — 2 pure-Python deps (httpx, defusedxml), zero MCP/pandas/pyarrow/lxml bloat.

    • CLI (cbdata) — ad-hoc inspection, catalog sync, CSV/JSON output.

    • MCP server (pip install "centralbank-data[mcp]") — compact, read-only 5-tool FastMCP 4 server over stdio or Streamable HTTP.

Related MCP server: Global Economic Statistical MCP

Roadmap (10 High-Signal Providers)

Phase

Central Banks / Hubs

Protocol Family

Phase 1 (v0.1.0)

ECB (215 dataflows on data-api.ecb.europa.eu)

SDMX 2.1 dialect engine (defusedxml + csv)

Phase 2 (v0.2.0)

Bank of England (BoE IADB) + BIS, Bundesbank, Norges Bank, Eurostat, NBB

BoE IADB CSV adapter + 5 SDMX profiles + cb_compare_indicators

Phase 3 (v0.3.0)

SNB, Sveriges Riksbank (SWEA + SWESTR), Danmarks Nationalbank

Non-Eurozone sovereign REST / Cube / StatBank adapters

(Narrow FX-only/SOAP adapters and redundant/WAF-blocked Eurozone NCBs are documented in docs/CENTRAL_BANKS.md and intentionally parked — their headline FX and policy rates are already covered via ECB and BIS.)

Documentation

License

Apache-2.0 — see LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      F
      maintenance
      Enables AI agents to discover, retrieve, compare, and analyze trusted macroeconomic statistics from central banks and international organizations, resolving concepts to official series with provenance and validation.
      6
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to query the Swiss National Bank's statistical data portal, fetching data cube time series as JSON and inspecting cube dimensions and series keys. Runs keyless over a hosted gateway or locally via stdio.
      70 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Provides universal access to over 800,000 economic time series through three tools that browse the full catalog by category, release, or source, search by keywords, tags, and filters, and retrieve observations with date ranges, frequency aggregation, and transformations such as percent change or natural log. It also supports stdio, Docker, and Streamable HTTP transports with caching, rate limiting, and retry handling for deployment in AI assistant clients.
      312 npm
      AGPL 3.0