Data source: Federal Reserve Economic Data (FRED)
https://context.gnist.ai/mcp/commodity-prices/
AuthenticationAll requests require a Gnist-API-Key header (or api_key query parameter).
Free tier: 100 calls/day. Get your API key.
Tools (5)
get_commodity_priceGet price data for a commodity.
Returns historical price observations from FRED for the specified commodity.
Covers energy (oil, gas), precious metals (gold, silver, platinum),
industrial metals (copper, aluminum, nickel), agricultural products
(wheat, corn, coffee, cocoa), livestock, and forestry.
Common commodities:
- crude-oil-wti — WTI Crude Oil (daily, USD/barrel)
- crude-oil-brent — Brent Crude Oil (daily, USD/barrel)
- natural-gas — Henry Hub Natural Gas (daily, USD/MMBtu)
- gold — Gold London PM Fix (daily, USD/troy oz)
- silver — Silver London Fix (daily, USD/troy oz)
- copper — Copper (monthly, USD/metric ton)
- wheat — Wheat (monthly, USD/metric ton)
- corn — Corn/Maize (monthly, USD/metric ton)
- coffee — Coffee Arabica (monthly, USD/kg)
| 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) |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "get_commodity_price",
"arguments": {
"commodity": "example"
}
}
}list_commoditiesList all available commodities.
Returns the full catalog of commodities with their names, units,
categories, and underlying FRED series IDs. Use this to discover
valid commodity slugs for get_commodity_price.
| Parameter | Type | Required | Description |
|---|---|---|---|
category | any | optional | Filter by category: "energy", "precious-metals", "industrial-metals", "agricultural", "livestock", "forestry". Omit for all. |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "list_commodities",
"arguments": {}
}
}list_commodity_categoriesList commodity categories with counts.
Returns the available categories (energy, precious-metals,
industrial-metals, agricultural, livestock, forestry) and how
many commodities each contains.
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "list_commodity_categories",
"arguments": {}
}
}compare_commodity_pricesCompare prices for multiple commodities aligned on a common time axis.
Fetches price data for all specified commodities and aligns observations
by date — only dates where all commodities have values are included.
Useful for correlation analysis and cross-commodity comparisons.
Example: compare_commodity_prices(["crude-oil-wti", "natural-gas"], frequency="m")
| 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). |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "compare_commodity_prices",
"arguments": {
"commodities": [
"example"
]
}
}
}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/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"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/commodity-prices/",
headers={"Gnist-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
json={
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "get_commodity_price",
"arguments": {
"commodity": "example"
}
}
},
)
print(resp.json())