Real-time oil, gas, and commodity prices for Claude Desktop and Claude Code via the Model Context Protocol.
- Real-time prices for 40+ commodities (oil, gas, coal, refined products)
- Natural language queries - ask for "brent oil" or "natural gas", not codes
- Market overviews - get all prices at once
- Price comparisons - compare Brent vs WTI, US vs European gas
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"oilpriceapi": {
"command": "npx",
"args": ["oilpriceapi-mcp"],
"env": {
"OILPRICEAPI_KEY": "your-api-key-here"
}
}
}
}Add to your project's .mcp.json:
{
"mcpServers": {
"oilpriceapi": {
"command": "npx",
"args": ["oilpriceapi-mcp"],
"env": {
"OILPRICEAPI_KEY": "your-api-key-here"
}
}
}
}Or install globally:
npm install -g oilpriceapi-mcp- Sign up at oilpriceapi.com
- Get your API key from the dashboard
- Add it to your MCP config as shown above
Get the current price of a specific commodity.
Examples:
- "What's the current Brent oil price?"
- "Get the price of natural gas"
- "How much is WTI crude?"
Get prices for all commodities, optionally filtered by category.
Categories: oil, gas, coal, refined, all
Examples:
- "Give me a market overview"
- "Show all oil prices"
- "What are the current gas prices?"
Compare prices between 2-5 commodities.
Examples:
- "Compare Brent and WTI prices"
- "What's the spread between US and European gas?"
List all available commodities and their codes.
- Brent Crude (global benchmark)
- WTI (US benchmark)
- Urals (Russian)
- Dubai (Middle East)
- US Henry Hub ($/MMBtu)
- UK NBP (pence/therm)
- European TTF (€/MWh)
- Thermal Coal
- Newcastle Coal (Asia-Pacific)
- Diesel
- Gasoline
- RBOB Gasoline
- Jet Fuel
- Heating Oil
- Gold
- EU Carbon Allowances
- EUR/USD, GBP/USD exchange rates
You don't need to know the exact commodity codes. Just ask naturally:
| You say | We understand |
|---|---|
| "brent oil", "brent crude" | BRENT_CRUDE_USD |
| "wti", "us oil", "american oil" | WTI_USD |
| "natural gas", "gas", "henry hub" | NATURAL_GAS_USD |
| "european gas", "ttf" | DUTCH_TTF_EUR |
| "diesel", "diesel fuel" | DIESEL_USD |
| "gold" | GOLD_USD |
# Install dependencies
npm install
# Build
npm run build
# Run locally
OILPRICEAPI_KEY=your-key node build/index.jsMIT