GnistAI GnistAI
Log in

IMF

International Monetary Fund datasets — global economic indicators and financial statistics.

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 6 tools tools 6 6 Economics

Data source: IMF Data API

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/imf/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-imf": {
      "url": "https://context.gnist.ai/mcp/imf/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
Shell
curl -X POST "https://context.gnist.ai/mcp/imf/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_weo_forecast", "arguments": {"country": "example"}}}'

API REST API

API Root https://context.gnist.ai/rest/imf/

6 endpoints available:

Shell
curl "https://context.gnist.ai/rest/imf/get_weo_forecast?country=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

resp = httpx.get(
    "https://context.gnist.ai/rest/imf/get_weo_forecast",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    params={
        "country": "example"
},
)
print(resp.json())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc imf

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (6)

list_weo_indicators
List all available World Economic Outlook indicators from the IMF.
get_weo_forecast
Get World Economic Outlook forecasts and historical data for a country.
ParameterTypeRequiredDescription
countrystringrequiredISO alpha-3 country code (e.g. 'USA', 'NOR', 'DEU', 'CHN').
indicatorsanyoptionalWEO indicator codes. If omitted, returns the 6 defaults. Use list_weo_indicators() to discover all available codes.
start_yearanyoptionalInclude observations from this year (inclusive).
end_yearanyoptionalInclude observations up to this year (inclusive).
get_commodity_prices
Get primary commodity price data from the IMF PCPS dataset.
ParameterTypeRequiredDescription
commoditiesanyoptionalList of PCPS commodity codes. Defaults to 5 key commodities.
start_periodanyoptionalStart period (YYYY-MM for monthly, YYYY for annual).
end_periodanyoptionalEnd period (YYYY-MM or YYYY).
frequencystringoptional'M' for monthly (default) or 'A' for annual. (default: "M")
get_trade_balance
Get bilateral or aggregate trade statistics from the IMF DOTS dataset.
ParameterTypeRequiredDescription
reporterstringrequiredISO alpha-2 country code of the reporting country (e.g. 'US', 'DE').
partneranyoptionalISO alpha-2 partner code, or 'W00' for world total (default).
start_yearanyoptionalStart year (inclusive).
end_yearanyoptionalEnd year (inclusive).
get_country_overview
Get a macro snapshot for a country combining WEO headline indicators.
ParameterTypeRequiredDescription
countrystringrequiredISO alpha-3 country code (e.g. 'USA', 'NOR', 'DEU').
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related