Economics
Data source: IMF Data API
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"}}}'
REST API
API Root
https://context.gnist.ai/rest/imf/
6 endpoints available:
GET /rest/imf/list_weo_indicatorsGET /rest/imf/get_weo_forecastGET /rest/imf/get_commodity_pricesGET /rest/imf/get_trade_balanceGET /rest/imf/get_country_overviewGET /rest/imf/report_feedback
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())
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_indicatorsList all available World Economic Outlook indicators from the IMF.
get_weo_forecastGet World Economic Outlook forecasts and historical data for a country.
| 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). |
get_commodity_pricesGet primary commodity price data from the IMF PCPS dataset.
| 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") |
get_trade_balanceGet bilateral or aggregate trade statistics from the IMF DOTS dataset.
| 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). |
get_country_overviewGet a macro snapshot for a country combining WEO headline indicators.
| Parameter | Type | Required | Description |
|---|---|---|---|
country | string | required | ISO alpha-3 country code (e.g. 'USA', 'NOR', 'DEU'). |
report_feedbackReport a bug, feature request, or general feedback for this data source.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |