Data source: IMF Data API
https://context.gnist.ai/mcp/imf/
AuthenticationAll requests require a Gnist-API-Key header (or api_key query parameter).
Free tier: 100 calls/day. Get your API key.
Tools (6)
list_weo_indicatorsget_weo_forecastget_commodity_pricesget_trade_balanceget_country_overviewreport_feedback
list_weo_indicatorsList all available World Economic Outlook indicators from the IMF.
The WEO covers macroeconomic variables across 196 countries with
historical data and 5-year forecasts, updated twice per year (April
and October). Use this to discover indicator codes before calling
get_weo_forecast() with specific indicators.
Returns:
count and list of indicators with code, label, description, unit, source, dataset.
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "list_weo_indicators",
"arguments": {}
}
}get_weo_forecastGet World Economic Outlook forecasts and historical data for a country.
By default returns 6 headline macro indicators: real GDP growth, inflation,
unemployment, current account balance, government debt, and fiscal balance.
Country codes use ISO alpha-3 (e.g. USA, GBR, DEU, NOR, CHN, JPN, BRA).
Args:
country: ISO alpha-3 country code (e.g. 'USA', 'NOR', 'DEU', 'CHN').
indicators: WEO indicator codes. If omitted, returns the 6 defaults.
Use list_weo_indicators() to discover all available codes.
start_year: Include observations from this year (inclusive).
end_year: Include observations up to this year (inclusive).
Returns:
country, source note, and indicators list with observations (period, value).
| Parameter | Type | Required | Description |
|---|---|---|---|
country | string | required | ISO alpha-3 country code (e.g. 'USA', 'NOR', 'DEU', 'CHN'). |
indicators | any | optional | WEO indicator codes. If omitted, returns the 6 defaults. Use list_weo_indicators() to discover all available codes. |
start_year | any | optional | Include observations from this year (inclusive). |
end_year | any | optional | Include observations up to this year (inclusive). |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "get_weo_forecast",
"arguments": {
"country": "NO"
}
}
}get_commodity_pricesGet primary commodity price data from the IMF PCPS dataset.
Default commodities: Brent Crude Oil, Gold, Copper, Aluminum, Natural Gas (US).
Args:
commodities: List of PCPS commodity codes. Defaults to 5 key commodities.
start_period: Start period (YYYY-MM for monthly, YYYY for annual).
end_period: End period (YYYY-MM or YYYY).
frequency: 'M' for monthly (default) or 'A' for annual.
Returns:
source, available_codes list, and series with code, name, unit, and observations.
| Parameter | Type | Required | Description |
|---|---|---|---|
commodities | any | optional | List of PCPS commodity codes. Defaults to 5 key commodities. |
start_period | any | optional | Start period (YYYY-MM for monthly, YYYY for annual). |
end_period | any | optional | End period (YYYY-MM or YYYY). |
frequency | string | optional | 'M' for monthly (default) or 'A' for annual. (default: "M") |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "get_commodity_prices",
"arguments": {}
}
}get_trade_balanceGet bilateral or aggregate trade statistics from the IMF DOTS dataset.
Use partner='W00' (or omit) to get a country's total world trade.
Specify a partner code for bilateral flows.
Args:
reporter: ISO alpha-2 country code of the reporting country (e.g. 'US', 'DE').
partner: ISO alpha-2 partner code, or 'W00' for world total (default).
start_year: Start year (inclusive).
end_year: End year (inclusive).
Returns:
reporter, partner, and series with exports, imports, and trade balance.
| Parameter | Type | Required | Description |
|---|---|---|---|
reporter | string | required | ISO alpha-2 country code of the reporting country (e.g. 'US', 'DE'). |
partner | any | optional | ISO alpha-2 partner code, or 'W00' for world total (default). |
start_year | any | optional | Start year (inclusive). |
end_year | any | optional | End year (inclusive). |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "get_trade_balance",
"arguments": {
"reporter": "NO"
}
}
}get_country_overviewGet a macro snapshot for a country combining WEO headline indicators.
Returns the most recent actuals and near-term IMF forecasts covering GDP growth,
inflation, unemployment, current account, government debt, and fiscal balance.
Args:
country: ISO alpha-3 country code (e.g. 'USA', 'NOR', 'DEU').
Returns:
country, source, window (year range), and indicators dict with latest values.
| Parameter | Type | Required | Description |
|---|---|---|---|
country | string | required | ISO alpha-3 country code (e.g. 'USA', 'NOR', 'DEU'). |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "get_country_overview",
"arguments": {
"country": "NO"
}
}
}report_feedbackReport a bug, feature request, or general feedback for this data source.
Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.
Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "report_feedback",
"arguments": {
"feedback": "example"
}
}
}Quick Start
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"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/imf/",
headers={"Gnist-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
json={
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "get_weo_forecast",
"arguments": {
"country": "example"
}
}
},
)
print(resp.json())