Oil Prices in Your AI Assistant
Real-time commodity data for Claude, Cursor, VS Code, Windsurf, and any MCP-compatible client. 40+ commodities with natural language.
Quick Start
Add Config
Add the MCP server config to your client (see setup guides below).
Ask Anything
Ask about commodity prices in natural language. No codes to memorize.
npx oilpriceapi-mcpGlobal install: npm install -g oilpriceapi-mcp
Setup by Client
Add the config below to your MCP client. Replace your-api-key-here with your actual API key.
Claude Desktop
Config file: ~/Library/Application Support/Claude/claude_desktop_config.json (Windows: %APPDATA%\Claude\claude_desktop_config.json)
{
"mcpServers": {
"oilpriceapi": {
"command": "npx",
"args": ["-y", "oilpriceapi-mcp"],
"env": {
"OILPRICEAPI_KEY": "your-api-key-here"
}
}
}
}Claude Code
Config file: .mcp.json (project root)
{
"mcpServers": {
"oilpriceapi": {
"command": "npx",
"args": ["-y", "oilpriceapi-mcp"],
"env": {
"OILPRICEAPI_KEY": "your-api-key-here"
}
}
}
}Cursor
Config file: .cursor/mcp.json (project root)
{
"mcpServers": {
"oilpriceapi": {
"command": "npx",
"args": ["-y", "oilpriceapi-mcp"],
"env": {
"OILPRICEAPI_KEY": "your-api-key-here"
}
}
}
}VS Code + Cline
Config file: .vscode/mcp.json
{
"servers": {
"oilpriceapi": {
"type": "stdio",
"command": "npx",
"args": ["-y", "oilpriceapi-mcp"],
"env": {
"OILPRICEAPI_KEY": "your-api-key-here"
}
}
}
}Windsurf
Config file: ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"oilpriceapi": {
"command": "npx",
"args": ["-y", "oilpriceapi-mcp"],
"env": {
"OILPRICEAPI_KEY": "your-api-key-here"
}
}
}
}4 Tools
The MCP server provides these tools that your AI assistant can call:
get_commodity_price
Get the current price of a specific commodity
"What's the current Brent oil price?"
"Get the price of natural gas"
get_market_overview
Get prices for all commodities, filtered by category (oil, gas, coal, refined, all)
"Give me a market overview"
"Show all oil prices"
compare_prices
Compare prices between 2-5 commodities side by side
"Compare Brent and WTI prices"
"What's the spread between US and European gas?"
list_commodities
List all available commodities and their codes
"What commodities do you track?"
"List all available codes"
4 Resources
Subscribable price data your AI can read directly:
price://brentGlobal benchmark crude oil
price://wtiUS benchmark crude oil
price://natural-gasUS Henry Hub natural gas
price://allAll tracked commodity prices
4 Pre-Built Prompts
Analyst-grade templates your AI can use:
daily-briefingEnergy market daily briefing with key prices and movers
brent-wti-spreadAnalyze the Brent-WTI crude oil spread
gas-market-analysisCompare US vs European natural gas markets
commodity-reportDetailed report on a specific commodity (parameterized)
Natural Language Support
No need to memorize commodity codes. Just ask naturally.
| You Say | We Understand |
|---|---|
| "brent oil", "brent crude" | BRENT_CRUDE_USD |
| "wti", "us oil" | WTI_USD |
| "natural gas", "henry hub" | NATURAL_GAS_USD |
| "european gas", "ttf" | DUTCH_TTF_EUR |
| "diesel" | DIESEL_USD |
| "gold" | GOLD_USD |
| "coal" | COAL_USD |
| "heating oil" | HEATING_OIL_USD |
40+ Commodities
Crude Oil
- Brent Crude (global benchmark)
- WTI (US benchmark)
- Urals (Russian)
- Dubai (Middle East)
Natural Gas
- US Henry Hub ($/MMBtu)
- UK NBP (pence/therm)
- European TTF (EUR/MWh)
Refined Products
- Diesel
- Gasoline
- RBOB Gasoline
- Jet Fuel, Heating Oil
Other
- Gold
- Thermal & Newcastle Coal
- EU & UK Carbon
- EUR/USD, GBP/USD
Frequently Asked Questions
What is the OilPriceAPI MCP Server?
It's a Model Context Protocol (MCP) server that gives your AI assistant access to real-time oil, gas, and commodity price data. Ask about Brent crude, WTI, natural gas, diesel, gold, and 35+ other commodities in natural language.
Which AI clients are supported?
Claude Desktop, Claude Code, Cursor, VS Code (with Cline), Windsurf, and any other tool that supports the MCP protocol.
Do I need to know commodity codes?
No. Just ask for "brent oil" or "natural gas" in plain English. The server maps natural language to the correct commodity codes automatically.
Is it free?
The free tier includes 200 requests/month. Paid plans start at $15/month for 10,000 requests. The MCP server itself is open source and free to install.
How do I install it?
Run npx oilpriceapi-mcp or install globally with npm install -g oilpriceapi-mcp. Then add the config to your MCP client with your API key.
Ready to Get Started?
Get your free API key and start asking your AI assistant about commodity prices