cyanheads avatar

Imf Mcp Server

cyanheads/imf-mcp-server

Connects Claude to the IMF's SDMX 3.0 portal with access to 193 dataflows covering World Economic Outlook projections, balance of payments, CPI, exchange rates, and national accounts across 190 countries. You list available dataflows, fetch dimension metadata to resolve human terms like "United States" to SDMX codes like "USA", then query by dimension key and time range. Large multi-country result sets automatically spill to a DuckDB-backed canvas where you can run SQL for cross-country comparisons and aggregations. No API key required. The workflow is discovery, metadata resolution, query, then optional SQL analytics. Reach for this when you need macroeconomic data for research, forecasting, or cross-country analysis and want the full IMF catalog without manually navigating the web interface.

GitHub stars
2
tools
5
transport
STDIO, HTTP
env vars
7
last updated
Nov 12, 2026

Install

From registry metadata
$ npx add-mcp https://imf.caseyjhand.com/mcp --name imf

Run in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add --transport http imf https://imf.caseyjhand.com/mcp

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 5 tools

Verified live against the running server on Nov 6, 2026.

imf_list_databasesList IMF SDMX dataflows available on the portal. Entry point for every query: imf_get_database and imf_query_dataset both require a dataflow id obtained here. Vintage (historical snapshot) dataflows such as WEO_2025_OCT_VINTAGE are excluded by default; set include_vintages=tru...4 params

List IMF SDMX dataflows available on the portal. Entry point for every query: imf_get_database and imf_query_dataset both require a dataflow id obtained here. Vintage (historical snapshot) dataflows such as WEO_2025_OCT_VINTAGE are excluded by default; set include_vintages=tru...

Parameters* required
filterstring
Optional words to filter results by, split on spaces and commas. A dataflow matches when every word appears, case-insensitively, somewhere in its ID, name, or full description. Example: "exchange r...
include_vintagesboolean
Include vintage (historical snapshot) dataflows such as WEO_2025_OCT_VINTAGE. Default false — vintages are excluded to keep the discovery surface clean.default: false
limitinteger
Maximum dataflows to return in this call. Default 50; one call returns at most 200, so a larger limit (up to 1,000) returns 200 and echoes requested_limit and applied_limit. total_count reports how...default: 50
offsetinteger
Number of matching dataflows to skip before this page. Combine with limit to page through a broad or unfiltered catalog.default: 0
imf_get_databaseFetch a dataflow's dimension list with a codelist preview for each dimension. Resolves human-readable terms to SDMX codes (e.g. "United States" → USA, "Constant prices" → NGDP_RPCH). Required before imf_query_dataset — SDMX keys are opaque without codelist lookups. Each codeli...8 params

Fetch a dataflow's dimension list with a codelist preview for each dimension. Resolves human-readable terms to SDMX codes (e.g. "United States" → USA, "Constant prices" → NGDP_RPCH). Required before imf_query_dataset — SDMX keys are opaque without codelist lookups. Each codeli...

Parameters* required
agency_idstring
Agency ID that publishes this dataflow, e.g. IMF.RES or IMF.STA, matched case-insensitively. Auto-detected from the dataflow list when omitted.
available_onlyboolean
Return only codes reported by the dataflow-wide availability constraint. Default false keeps ordinary codelist discovery unchanged.default: false
codelist_filterstring
Optional words to search for in each dimension's codelist, split on spaces and commas. A code matches when every word appears, case-insensitively, in its code ID or name; different words may match...
dataflow_id*string
Dataflow identifier from imf_list_databases, e.g. WEO, BOP, CPI.
dimension_idstring
Exact dimension ID from this tool, e.g. INDICATOR. Select one dimension to page beyond its preview.
limitinteger
Entries to return from the selected dimension. Valid only with dimension_id; default 50. One call returns at most 200, so a larger limit (up to 50,000) returns 200, echoes requested_limit and appli...
offsetinteger
Matching entries to skip in the selected dimension before this page. Valid only with dimension_id; default 0.
versionstring
Dataflow version, e.g. 9.0.0. Auto-detected from the dataflow list when omitted.
imf_query_datasetQuery an IMF SDMX dataflow by dimension key over a time range. Returns observations with time_period, value, and status, plus the unit, scale, and decimals of each series — a key resolving to several series carries one entry per series in series_metadata, since unit and scale...9 params

Query an IMF SDMX dataflow by dimension key over a time range. Returns observations with time_period, value, and status, plus the unit, scale, and decimals of each series — a key resolving to several series carries one entry per series in series_metadata, since unit and scale...

Parameters* required
agency_idstring
Agency ID, e.g. IMF.RES or IMF.STA, matched case-insensitively. Auto-detected from dataflow list when omitted.
canvas_idstring
Existing canvas ID to accumulate results into across multiple queries. This selects the destination only; it does not force staging. Use output_mode="canvas" to stage an under-budget result.
dataflow_id*string
Dataflow identifier from imf_list_databases, e.g. WEO, BOP, CPI. Matched case-insensitively; the response echoes the catalog spelling.
end_periodstring
End of time range (inclusive). Same formats as start_period, and must not be earlier than it. The bound covers the whole period it names, so end_period 2023 admits 2023-M12 and 2023-Q4. Observation...
key*string
Dot-separated dimension codes in DSD keyPosition order. Call imf_get_database to get key_format and valid codes first. Use + to combine codes at one position (e.g. USA+GBR.NGDP_RPCH.A). Use * to ma...
last_n_observationsinteger
Keep only each series' last N observations, an integer from 1 to 1,000,000; 1 returns each series' latest value. Latest is per series: series end at different periods, and a WEO series ends in its...
output_modestring
Result placement. auto returns an under-budget result inline and spills only when needed. canvas explicitly stages the full result, using canvas_id when supplied or allocating a fresh canvas.one of auto · canvasdefault: auto
start_periodstring
Start of time range (inclusive). Accepts any of YYYY (annual), YYYY-SN (semi-annual, e.g. 2023-S1), YYYY-QN (quarterly, e.g. 2023-Q1), YYYY-MM (monthly), or a calendar-valid YYYY-MM-DD (daily), wha...
versionstring
Dataflow version, e.g. 9.0.0. Auto-detected from dataflow list when omitted.
imf_dataframe_describeList DataCanvas tables and columns staged by a prior imf_query_dataset call. Returns each table's name, row count, and column schema (name + DuckDB type). Required before imf_dataframe_query to discover the table and column names for SQL.1 params

List DataCanvas tables and columns staged by a prior imf_query_dataset call. Returns each table's name, row count, and column schema (name + DuckDB type). Required before imf_dataframe_query to discover the table and column names for SQL.

Parameters* required
canvas_id*string
Canvas ID returned by imf_query_dataset whenever staged=true, from automatic spillover or output_mode="canvas".
imf_dataframe_queryRun a read-only SQL SELECT against a DataCanvas table staged by imf_query_dataset. Supports multi-country comparisons, time-series aggregation, and cross-indicator joins. Requires imf_dataframe_describe first to discover table and column names. One SELECT statement per call; a...2 params

Run a read-only SQL SELECT against a DataCanvas table staged by imf_query_dataset. Supports multi-country comparisons, time-series aggregation, and cross-indicator joins. Requires imf_dataframe_describe first to discover table and column names. One SELECT statement per call; a...

Parameters* required
canvas_id*string
Canvas ID returned by imf_query_dataset whenever staged=true. Call imf_dataframe_describe with it before writing SQL.
sql*string
Read-only SQL SELECT statement — exactly one statement, starting with SELECT or with a WITH … SELECT common table expression. Reference tables by the names returned by imf_dataframe_describe. Examp...

Sponsors

Configuration

IMF_ENABLE_DATAFRAME_DROPdefault: false

Enable imf_dataframe_drop for removing staged DataCanvas tables and views.

MCP_LOG_LEVELdefault: info

Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').

MCP_TRANSPORT_TYPEdefault: http

Selects the HTTP transport.

MCP_HTTP_HOSTdefault: 127.0.0.1

The hostname for the HTTP server.

MCP_HTTP_PORTdefault: 3010

The port to run the HTTP server on.

MCP_HTTP_ENDPOINT_PATHdefault: /mcp

The endpoint path for the MCP server.

MCP_AUTH_MODEdefault: none

Authentication mode to use: 'none', 'jwt', or 'oauth'.

Readme

@cyanheads/imf-mcp-server

Query IMF SDMX 3.0 macroeconomic data — 100+ dataflows across 190 countries, WEO projections, BOP, CPI, exchange rates, and national accounts via MCP. STDIO or Streamable HTTP.

6 Tools • 1 Resource • 1 Skill

Details

Repository
github.com/cyanheads/imf-mcp-server
Package
@cyanheads/imf-mcp-server
Transport
STDIO, HTTP
Registry
MCP registry, active
Resources
1
Tools verified
Nov 6, 2026

More from cyanheads