Docs
Agent integration
Discover commodities.sh without a human in the loop — then call REST or MCP with x402 when you need a paid observation.
Discovery stack
- llms.txt— Agent briefing
- Catalog— Instruments JSON
- OpenAPI— Spec
- SKILL.md— Agent skill
- Agent card— A2A
- MCP— Tools
Free paths
- /health
- /v1/catalog
- /v1/calendar
- /llms.txt
- /llms-full.txt
- /openapi.json
- /SKILL.md
- /.well-known/agent.json
- /.well-known/x402.json
- /terms.txt
- /v1/trade/codes
- /v1/search
- /v1/cash-bids/reports
- /v1/minerals
Product hub: For agents →
MCP
Point your MCP host at the streamable HTTP endpoint:
json
{
"mcpServers": {
"commodities": {
"url": "https://api.commodities.sh/api/mcp"
}
}
}catalog.listEvery instrument with its unit, freshness class and sourcecatalog.searchResolve a commodity name or synonym to an instrument codecalendar.getEIA, USDA and CFTC release cadence with the next expected datetrade.codesResolve a country to the M49 code the trade tools requireminerals.listMineral coverage, curated HS codes and the comparability caveatscash.reportsWhich AMS cash grain reports exist, and how fresh each one isaccount.quotaCredits left on this key and the scopes it may readprice.latestLatest cash or fundies print for one instrumentprice.bundleLatest prints for up to 20 instruments in one callprice.historyStored history for one instrumentprice.statsVolatility, change and range over a windowstats.bundleThe same statistics for up to 20 instruments at oncefx.latestLatest FX cross rate, for converting a quoteobservation.resolveFetch one observation by its stable id, for citationinventory.getEIA weekly stocks with week-on-week and 5-year comparisonpositioning.getCFTC managed-money net positioning by instrumentspread.getCrack, crush, WTI-Brent basis and calendar structuretrade.calculateLanded cost, trade margin, break-even or an FX shockfundamentals.getWASDE, crop progress, export sales or the USGS summariesreleases.nextWhen each report is due and what the last one printedcash.bidsCash elevator bids and basis across every AMS state reporttrade.flowBilateral trade volume and value between two countriestrade.partnersEvery trading partner of one country, ranked by valuetrade.rankingEvery country ranked for one commodity, with unit valuesproducer.pricesFAOSTAT farm-gate prices by country for one cropproducer.prices.bundleFarm-gate prices for up to 20 crops in one callsourcing.compareFarm-gate against border unit value, country by countryminerals.dossierMine production, reserves and export flows by countrysnapshot.getOne sector's prices, inventories, positioning and fundiesdecision.getRule-based signal pack with direction and rationale
Where should an agent start discovery?
Fetch /llms.txt for the briefing index, /SKILL.md for call patterns, /.well-known/agent.json for the A2A card, and /openapi.json for the machine schema. Catalog and calendar stay free.
How do agents connect MCP?
Add a server entry pointing at https://api.commodities.sh/api/mcp. Tools cover instruments, price, inventory, COT, spreads, fundies, snapshot, calendar, and decision packs.
Is discovery free?
Yes. FREE_DISCOVERY_PATHS — health, catalog, calendar, llms.txt, OpenAPI, SKILL.md, agent card, x402.json, terms — do not require payment. Paid observations still use x402.