CC

c-cf/imf-data-mcp

API 开发

本页由 AI 翻译,技术细节请以原文为准。 查看原文

14 stars 6 forks 质量 67 趋势 9Apache-2.0

这个MCP服务器与IMF免费数据API集成,为检索和处理经济数据提供一套工具和资源.

概览

IMF经济数据示范背景协议服务器,基于imfp和IMF SDMX API at data.imf.org. 旧服务器名为data services.imf.org,IMF于2025年退役. 所有请求都因此超时. 这个版本迁移到imfp,它针对的是当前数据.imf.org SDMX 3.0 API,并积极维护. 货币基金组织的API允许大约10项请求/5秒. imfp 手柄会自动限制和重试速度 .

概述(AI 翻译)

基金组织经济数据示范背景协议服务器,基于 图片和 IMF SDMX API at data.imf.org.

v.0.2.0 — 突破性变化: 旧服务器名为 dataservices.imf.org,

  • 货币基金组织于2025年退役。 所有请求都因此超时.

此版本迁移到 [T2] , 目标为当前 [T3] SDMX 3.0 API 并积极维护。

– – . . .

□ 安装

使用 [[T4] (建议)

使用页码

– – . . .

□克洛德桌面配置

或者,如果通过管道安装:

– – . . .

□ 可用的工具

  • 工具 * * 描述 * * |-|-|-. · [[T5] · · · · · · 列出所有~ 155 IMF数据库及其编号

imf_get_parameter_defs 数据库的列表查询维度 *
QQ imf_fetch_data] 获取带有年份范围和尺寸过滤器的时间序列数据 QQ

– – . . .

□ 典型的工作流程

– – . . .

□ 常见数据库ID

主题 身份 |-|-|-. [T12] 消费者价格 [T13] 生产者价格 国民帐户(年度) .ANEA 国民帐户(季度)

本页由 AI 翻译,技术细节请以原文为准。

README

IMF Data MCP

A Model Context Protocol server for IMF economic data, built on imfp and the IMF SDMX API at data.imf.org.

v0.2.0 — Breaking change: The old server called dataservices.imf.org, which the IMF decommissioned in 2025. All requests timed out as a result. This version migrates to imfp, which targets the current data.imf.org SDMX 3.0 API and is actively maintained.


Installation

Using uv (recommended)

uvx --from git+https://github.com/c-cf/imf-data-mcp imf-data-mcp

Using pip

pip install git+https://github.com/c-cf/imf-data-mcp.git

Claude Desktop configuration

{
  "mcpServers": {
    "imf": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/c-cf/imf-data-mcp", "imf-data-mcp"]
    }
  }
}

Or, if installed via pip:

{
  "mcpServers": {
    "imf": {
      "command": "imf-data-mcp"
    }
  }
}

Available tools

Tool Description
imf_list_databases List all ~155 IMF databases with their IDs
imf_search_databases Filter databases by keyword (e.g. "inflation", "trade")
imf_get_parameter_defs List query dimensions for a database
imf_get_parameter_codes List valid codes for a dimension, with optional search
imf_fetch_data Fetch time series data with year range and dimension filters

Typical workflow

1. imf_search_databases(keyword="consumer price")
   → CPI, CPI_WCA, ...

2. imf_get_parameter_defs(database_id="CPI")
   → country, index_type, coicop_1999, frequency, ...

3. imf_get_parameter_codes(database_id="CPI", parameter="country", search="austria")
   → AUT

4. imf_fetch_data(
       database_id="CPI",
       start_year=2015, end_year=2023,
       filters={"country": ["AUT"], "frequency": ["M"]}
   )

Common database IDs

Topic ID
Consumer Prices CPI
Producer Prices PPI
National Accounts (Annual) ANEA
National Accounts (Quarterly) QNEA
Balance of Payments BOP_AGG
Exchange Rates ER_2026_JAN_VINTAGE
Commodity Prices PCPS
Fiscal Monitor FM
Gov. Finance Statistics GFS_COFOG
Monetary Statistics MFS_CBS, MFS_MA, MFS_IR
Financial Soundness FSIC
Trade in Services ITS
SDG Data SDG

Rate limits

The IMF API allows roughly 10 requests / 5 seconds. imfp handles rate limiting and retries automatically.


Debugging

npx @modelcontextprotocol/inspector imf-data-mcp

License

Apache 2.0

在 GitHub 查看完整 README

安装

uvx --from git+https://github.com/c-cf/imf-data-mcp imf-data-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "imf": { "command": "uvx", "args": ["--from", "git+https://github.com/c-cf/imf-data-mcp", "imf-data-mcp"] } } }