Skip to main content
Glama
Global Economic Statistical MCP

Global Economic Statistical MCP

by kgy0617

🌏 Global Economic Statistical MCP

Global economic statistics infrastructure for AI-powered macro research.

An MCP server that lets an LLM find, retrieve, compare and analyse official macroeconomic statistics from central banks and international organisations. You ask for a concept (policy rate, CPI inflation, real GDP, current account, …) for an economy. The server fetches it from the right institution, converts it to one common time-series format, checks it against other institutions, and cites its source.

                          LLM
                           β”‚
                           β–Ό
                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β”‚ Statistical MCP β”‚
                  β”‚    6 Tools      β”‚
                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                           β–Ό
                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β”‚ Concept Resolverβ”‚
                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
             β–Ό                           β–Ό
      Concept Catalog             Provider Catalog
             β”‚                           β”‚
             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β–Ό
                  Provider Resolver
                           β”‚
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β–Ό                   β–Ό                   β–Ό
     ECOS              SDMX Layer           Data360
  (REST, Korea)            β”‚               (World Bank)
       β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”       β”‚
       β”‚   β–Ό      β–Ό      β–Ό      β–Ό      β–Ό       β”‚
       β”‚  OECD   IMF    BIS    ECB  Eurostat   β”‚
       β”‚   β”‚      β”‚      β”‚      β”‚      β”‚       β”‚
       β””β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                           β–Ό
                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β”‚ Canonical Model β”‚
                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”
                    β–Ό             β–Ό
               Validation     Provenance
                    β”‚             β”‚
                    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                           β–Ό
                       Analysis

πŸš€ Installation

Requires uv. Check connectivity first:

ECOS_API_KEY=your_key uvx --from git+https://github.com/kgy0617/global-economic-statistical-mcp global-economic-statistical-mcp --check

Claude Desktop (claude_desktop_config.json) / Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "global-econ-stats": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/kgy0617/global-economic-statistical-mcp", "global-economic-statistical-mcp"],
      "env": { "ECOS_API_KEY": "your_api_key_here" }
    }
  }
}

Claude Code

claude mcp add global-econ-stats -e ECOS_API_KEY=your_key -- uvx --from git+https://github.com/kgy0617/global-economic-statistical-mcp global-economic-statistical-mcp

Environment variable

Description

ECOS_API_KEY

Bank of Korea key (free registration). Without it a sample key is used (10 rows per call). No other institution needs a key.

GESM_DATA_DIR

Where validation results are stored (default ~/.cache/global-economic-statistical-mcp).

GESM_PERSIST

0 writes nothing to disk.


Related MCP server: IMF MCP

🌐 Coverage

Economies: Korea KR, United States US, Japan JP, China CN, euro area EA, United Kingdom GB. Every mapping for these six is re-checked against the live APIs daily. About 40 more economies work through the same mappings without daily checks (list: gesm://countries).

Institutions

source

Institution

Covers

ECOS

Bank of Korea

Korea (the only source that needs a key)

OECD

OECD

OECD members and major economies

IMF

IMF

Most countries

BIS

Bank for International Settlements

Policy rates, exchange rates, prices, property

ECB

European Central Bank

Euro area and EU member states

EUROSTAT

Eurostat

Euro area and EU member states

WB

World Bank (Data360)

Most countries; annual development indicators

Not every institution publishes every concept. See docs/sources.md for which institution serves what.


🧰 Tools

Tool

What it does

search_statistics

Find concepts, datasets and indicators across all institutions.

get_metadata

A dataset's structure and codes, or an indicator's definition.

get_data

Retrieve a series, with validation and a citation. cross_validate=True compares institutions.

compare_series

Align several economies, institutions or concepts and compute correlations.

calculate_statistics

Growth, trend, volatility, drawdown and other summary statistics.

explain_indicator

What a concept means and which sources serve each economy.

Ask by concept; country is required:

get_data(indicator="CPI_YOY", country="EA")                 # the server picks the source
get_data(indicator="POLICY_RATE", country="US", source="BIS")  # or choose one

You can also query an institution directly (source + dataflow + key) or a Bank of Korea table (stat_code). Options: transform (yoy/pop), rebase_period, unit_mult, start_date/end_date.

31 concepts: policy, short- and long-term rates; CPI and inflation; PPI; GDP growth and levels; unemployment; current account, goods balance, FX reserves; exchange rates; share prices; consumer and business confidence; house prices; and annual population, GDP per capita (PPP) and current account/GDP. Full list: gesm://concepts.


πŸ”Ž Validation

Every series comes with checks on country, frequency, unit, scale, period, missing values, duplicates and revisions.

With cross_validate=True (or compare_series), the same concept is fetched from every institution that publishes it and compared period by period. Each result is one of:

Status

Meaning

MATCH

The institutions agree (within tolerance).

DIFFER

They differ for a known reason (e.g. seasonal adjustment).

UNRESOLVED

They differ and the cause is not known. Reported, never hidden.

NOT_COMPARED

Not enough data to compare.

Official sources do not always agree. Latest report for the six economies: MATCH 43 Β· DIFFER 3 Β· UNRESOLVED 15 Β· NOT_COMPARED 1. See docs/validation.md for the details.

🧾 Provenance

Every series carries its institution, dataset, series key, retrieval time, query URL, any transformation applied, and a ready-to-use citation. output_format="sdmx" returns an SDMX-JSON data message.


πŸ“– Examples

  • "How has monetary policy diverged across the US, the euro area and Japan?" β†’ compare_series(series=[{"indicator":"POLICY_RATE","country":"US"}, {"indicator":"POLICY_RATE","country":"EA"}, {"indicator":"POLICY_RATE","country":"JP"}])

  • "Do Eurostat, the ECB and the BIS agree on euro-area inflation?" β†’ get_data(indicator="CPI_YOY", country="EA", cross_validate=True)

  • "Germany's unemployment rate" β†’ get_data(indicator="UNEMPLOYMENT_RATE_SA", country="DE", source="Eurostat")

  • "Trend and volatility of Japanese 10-year yields" β†’ calculate_statistics(indicator="LONG_TERM_RATE", country="JP")

  • "GDP per capita (PPP) over 20 years" β†’ get_data(indicator="GDP_PER_CAPITA_PPP", country="CN", recent_years=20)

Prompts: macro-economic-briefing, compare-countries, analyze-economic-trend.

⚠️ Limitations

  • Institutions differ in methods, base years and revisions. Cross-validation shows where they differ; it does not decide which one is right.

  • World Bank indicators are annual and published with a lag.

  • OECD limits requests per IP; under heavy use the server falls back to other institutions.

  • Only the six default economies are checked daily.


πŸ§ͺ Development

git clone https://github.com/kgy0617/global-economic-statistical-mcp.git
cd global-economic-statistical-mcp
uv sync
uv run pytest              # offline tests (all institutions faked)
uv run pytest -m live      # live API checks for the six economies

License: MIT.

Available Tools

6 tools
calculate_statisticsCalculate statisticsA
Read-onlyIdempotent

Summary statistics of a series (addressed the same way as get_data).

Per series: count, first/last, min/max (with periods), mean, median, std, change/change_pct, cagr_pct,
trend_per_year/trend_r2, latest_pop_pct, pop_pct_std, max_drawdown_pct, latest_yoy_pct, mean_yoy_pct.
Rates (interest rates, inflation) change in percentage points. Validation and provenance are included.

Args:
    indicator: concept id or name
    country: economy, ISO code or EA (required with indicator)
    source: ECOS | OECD | IMF | BIS
    stat_code: ECOS table code
    cycle: frequency
    item_code1..4: ECOS item codes
    dataflow: SDMX dataflow
    key: SDMX series key
    start_date: start period
    end_date: end period
    recent_years: window

Returns:
    statistics, validation status and provenance per series

Inputs: key, cycle, source, country, +10 more.

compare_seriesCompare series and cross-validateA
Read-onlyIdempotent

Align 2-6 series to one frequency and compare them: across economies, institutions or concepts.

Examples:
- economies: [{"indicator":"POLICY_RATE","country":"US"}, {"indicator":"POLICY_RATE","country":"EA"}]
- institutions: [{"indicator":"CPI","country":"CN","source":"IMF"}, {"indicator":"CPI","country":"CN","source":"BIS"}]
  β†’ the same concept and economy from different institutions adds cross_validation automatically
- concepts: [{"indicator":"POLICY_RATE","country":"GB"}, {"indicator":"CPI_YOY","country":"GB"}]

Args:
    series: list of series (indicator/country/source, or stat_code/..., or source/dataflow/key/cycle)
    start_date: start period (default: the last recent_years years)
    end_date: end period
    recent_years: window (default 3)
    frequency: comparison frequency (default: the lowest one)
    aggregation: "mean" | "last" | "first" | "sum" (default per concept: flows such as the current account
        or GDP are summed, stocks such as reserves take the period end, everything else is averaged)
    normalize_method: "none" | "index" (first period = 100) | "zscore"
    join: "inner" | "outer"
    output_format: "compact" | "csv"

Returns:
    the aligned table, correlations, provenance and validation per series, and cross-validation where it applies

Inputs: series (required), join, end_date, frequency, +5 more.

explain_indicatorExplain indicatorA
Read-onlyIdempotent

Explain what an indicator measures and which sources (institution, dataflow, key) serve each economy.

Returns the concept definition, its source mappings with rendered keys, and for Korean statistics the
Bank of Korea glossary definition, methodology notes and related ECOS tables.

Args:
    term: indicator or term (e.g. "CPI_YOY", "policy rate", "unemployment", "κ²½μ œμ‹¬λ¦¬μ§€μˆ˜")
    country: economy whose sources to show (default: every verified economy)
    stat_code: a specific ECOS table to explain
    language: "kr" | "en" (Bank of Korea glossary and methodology)

Returns:
    concept (definition, unit, sources), sources per economy, definition (glossary), methodology, tables

Inputs: term (required), country, language, stat_code.

get_dataGet data (validated, with provenance)A
Read-onlyIdempotent

Retrieve a time series in the canonical model, with validation and provenance.

Three ways to ask (use one):
1. Concept: indicator + country (+ source, cycle), e.g. indicator="CPI_YOY", country="US".
   Korea uses ECOS first; other economies OECD, IMF and BIS. If a source has no data, the next one is tried.
2. ECOS table (Korea): stat_code (+ cycle, item_code1..4)
3. SDMX dataflow: source (OECD | IMF | BIS) + dataflow + key + cycle

* validation: country, frequency, unit (and index base), scale, period, missing, duplicate and revision checks (pass/info/warn/fail)
* cross_validate=True: fetch the concept from every source and compare period by period;
  the result is MATCH, DIFFER (documented cause) or UNRESOLVED (unexplained difference)
* dates: "2024", "2024-03", "2024Q1", "2024-03-15" are converted; default window 3 months for daily data, else 2 years
* transform: "yoy" / "pop" % change β€” value becomes the change and the level is kept
* rebase_period: rebase an index to that period = 100 (e.g. "2020")

Args:
    indicator: concept id or name (see search_statistics(scope="concepts"))
    country: economy, ISO code or EA (required with indicator; with a direct SDMX query it enables the country check)
    source: ECOS | OECD | IMF | BIS
    stat_code: ECOS table code
    cycle: frequency A/S/Q/M/SM/D
    item_code1..4: ECOS item codes
    dataflow: SDMX dataflow (e.g. "OECD.SDD.STES:DSD_STES@DF_FINMARK(4.0)")
    key: SDMX series key (e.g. "USA.M.IRLT.PA._Z._Z._Z._Z.N")
    start_date: start period
    end_date: end period
    recent_years: window when dates are omitted
    transform: "yoy" | "pop" | "none"
    changes_only: only periods where the value changed (default for policy rates)
    rebase_period: index rebase period
    unit_mult: rescale values to 10^unit_mult (e.g. 12 turns a billions (9) series into trillions)
    cross_validate: include cross-validation across institutions
    output_format: "compact" | "csv" | "json" | "sdmx"
    prefer_latest: when ECOS results are truncated, keep the latest periods
    start_count: ECOS first row
    end_count: ECOS last row
    language: "kr" | "en" (ECOS names)

Returns:
    series (periods and values), provenance (source and citation), validation, and optionally cross_validation

Inputs: key, cycle, source, country, +20 more.

get_metadataGet structure (metadata)A
Read-onlyIdempotent

Return the structure (dimensions and codelists) of a dataset, to find the codes get_data needs.

- OECD, IMF, BIS: source + dataflow β†’ the dimensions and codelists of the institution's own DSD.
  A series key is the codes joined with '.' in dimension order (e.g. BIS WS_CBPOL β†’ 'M.US').
- ECOS: stat_code β†’ the table's structure mapped to SDMX (FREQ + ITEM_CODE1..4, coverage, units).
  output_format="sdmx" returns an SDMX-JSON structure message.

Args:
    stat_code: ECOS table code (e.g. "901Y009")
    source: OECD | IMF | BIS (with dataflow)
    dataflow: SDMX dataflow (e.g. "BIS:WS_CBPOL(1.0)", "IMF.STA:CPI")
    code_keyword: filter codes by name or value (e.g. "Japan", "JPN", "current account")
    codes_limit: maximum codes per dimension (default 30)
    output_format: "compact" | "sdmx" (ECOS only)
    language: "kr" | "en" (ECOS names)

Returns:
    dimensions, codes per dimension, a key template

Inputs: source, dataflow, language, stat_code, +3 more.

search_statisticsSearch statisticsA
Read-onlyIdempotent

Search concepts, OECD/IMF/BIS dataflows and Bank of Korea (ECOS) tables and items. The first step before retrieval.

scope:
- "all" (default): concepts + ECOS items + ECOS tables + international dataflows
- "concepts": country-agnostic concepts mapped across institutions (retrieve with get_data(indicator=..., country=...))
- "items": ECOS items (e.g. 'μŒ€' rice, '휘발유' gasoline) from an index generated from the ECOS API
- "tables": ECOS tables (without query: children of the parent_code category)
- "dataflows": OECD, IMF and BIS dataflows (every word must match the English name or id; source narrows the institution)
- "key_statistics": latest values of the Bank of Korea's 100 key statistics

Args:
    query: search terms (e.g. "policy rate", "unemployment", "inflation", "λ¬Όκ°€")
    scope: "all" | "concepts" | "items" | "tables" | "dataflows" | "key_statistics"
    source: institution for dataflow search (OECD | IMF | BIS)
    parent_code: ECOS table category code
    searchable_only: ECOS tables that can be queried only
    limit: maximum results per category
    language: language of key_statistics ("kr" | "en")

Returns:
    results per category (concepts, items, tables, dataflows, key_statistics)

Inputs: limit, query, scope, source, +3 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.6/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a distinct purpose: search discovery, structural metadata, data retrieval, multi-series comparison, summary statistics, and indicator explanation. There is no overlap or ambiguity in their roles.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (search_statistics, get_metadata, get_data, compare_series, calculate_statistics, explain_indicator), making the API predictable and easy to navigate.

    Tool Count5/5

    Six tools form a well-scoped set for a statistical data server, covering the essential operations without redundancy or bloat. Each tool is justified by the domain's needs.

    Completeness5/5

    The tools cover the full workflow: search to discover, metadata to understand structure, retrieval, comparison, analysis, and explanation. No significant gaps appear for the stated purpose of global economic statistics.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to discover, retrieve, and compare official international development indicators from sources such as the World Bank, FAOSTAT, WHO, UNICEF, and IMF, while preserving source identifiers, units, and citations.
      10
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to query cross-country macroeconomic and financial statistics, including GDP, inflation, fiscal balance, debt, exchange rates, trade, and balance-of-payments data for comparison and time-series analysis.
      94 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to access official statistical and economic indicator datasets from Eurostat, World Bank, OECD, IMF, WHO, and national statistical offices across 150+ countries through natural-language dataset discovery, inspection, time-series retrieval, SQL queries, CSV export, and account/watchlist management.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to browse the complete economic data catalog, search for series by keywords or tags, and retrieve observations with date ranges, frequency aggregation, and transformations. It provides access to more than 800,000 time series through three tools.
      331 npm
      AGPL 3.0