Economics
Data source: Federal Reserve Economic Data (FRED)
MCP Protocol
Endpoint
https://context.gnist.ai/mcp/commodity-prices/
claude_desktop_config.json
{
"mcpServers": {
"gnist-commodity-prices": {
"url": "https://context.gnist.ai/mcp/commodity-prices/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Shell
curl -X POST "https://context.gnist.ai/mcp/commodity-prices/" \
-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_commodity_price", "arguments": {"commodity": "example"}}}'
REST API
API Root
https://context.gnist.ai/rest/commodity-prices/
5 endpoints available:
GET /rest/commodity-prices/get_commodity_priceGET /rest/commodity-prices/list_commoditiesGET /rest/commodity-prices/list_commodity_categoriesGET /rest/commodity-prices/compare_commodity_pricesGET /rest/commodity-prices/report_feedback
Shell
curl "https://context.gnist.ai/rest/commodity-prices/get_commodity_price?commodity=example" \ -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx
resp = httpx.get(
"https://context.gnist.ai/rest/commodity-prices/get_commodity_price",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
params={
"commodity": "example"
},
)
print(resp.json())
Command Line
Command
gc commodity-prices
CLI documentation will be available when the GnistAI SDK is published.
Install
pip install gnistai
Available Tools (5)
get_commodity_priceGet price data for a commodity.
| Parameter | Type | Required | Description |
|---|---|---|---|
commodity | string | required | Commodity slug. Examples: "gold", "crude-oil-wti", "crude-oil-brent", "natural-gas", "silver", "copper", "wheat", "corn", "coffee". Use list_commodities to see all available options. |
observation_start | any | optional | Start date (YYYY-MM-DD). Omit to fetch from series start. |
observation_end | any | optional | End date (YYYY-MM-DD). Omit to fetch to latest available. |
frequency | any | optional | Aggregate to lower frequency: "d" (daily), "w" (weekly), "m" (monthly), "q" (quarterly), "a" (annual). |
limit | integer | optional | Maximum observations to return (default 100, max 100000). (default: 100) |
list_commoditiesList all available commodities.
| Parameter | Type | Required | Description |
|---|---|---|---|
category | any | optional | Filter by category: "energy", "precious-metals", "industrial-metals", "agricultural", "livestock", "forestry". Omit for all. |
list_commodity_categoriesList commodity categories with counts.
compare_commodity_pricesCompare prices for multiple commodities aligned on a common time axis.
| Parameter | Type | Required | Description |
|---|---|---|---|
commodities | list[string] | required | List of 2-10 commodity slugs to compare (e.g. ["gold", "silver"]). |
observation_start | any | optional | Start date (YYYY-MM-DD) applied to all commodities. |
observation_end | any | optional | End date (YYYY-MM-DD) applied to all commodities. |
frequency | any | optional | Aggregate to common frequency before aligning: "m" (monthly), "q" (quarterly), "a" (annual). |
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") |