Claude MCP Integration

Oil Price MCP Server for Claude Desktop

Get real-time Brent, WTI, and natural gas prices directly in Claude Desktop and Claude Code through documented tools, subscribable resources, and analyst prompts.

Setup in 3 Steps

1

Get API Key

Sign up for a free API key at oilpriceapi.com. Takes 30 seconds, no credit card required.

Get free key →
2

Add MCP Config

Add the config to your Claude Desktop or Claude Code configuration file (see setup guides below).

3

Ask Claude

Restart Claude and ask about commodity prices in natural language. Claude will use the MCP tools automatically.

# Run instantly with npx (no install needed)
npx oilpriceapi-mcp

Configuration Guides

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"
      }
    }
  }
}

After adding the config: Restart Claude Desktop (or reload your Claude Code project). The MCP server launches automatically via npx oilpriceapi-mcp. You'll see the OilPriceAPI tools listed in Claude's available tools.

What the MCP Server Provides

The OilPriceAPI MCP server gives Claude access to tools, subscribable resources, and pre-built analyst prompts.

Documented Tools

get_commodity_price

Get the current price of a specific commodity. Understands "brent oil", "natural gas", and 40+ other natural language aliases.

get_market_overview

Get all commodity prices filtered by category: oil, gas, coal, refined products, or all.

compare_prices

Compare 2-5 commodities side by side with spread calculations and percentage differences.

list_commodities

List all available commodities with codes and categories.

4 Subscribable Resources

Claude can subscribe to these price feeds for continuous access:

price://brent

Global benchmark crude oil

price://wti

US benchmark crude oil

price://natural-gas

US Henry Hub natural gas

price://all

All tracked commodity prices

4 Pre-Built Analyst Prompts

Ready-to-use templates for professional energy market analysis:

daily-briefing

Energy market daily briefing with key prices, movers, and market context

brent-wti-spread

Detailed Brent-WTI crude oil spread analysis

gas-market-analysis

US vs European natural gas market comparison (Henry Hub vs TTF)

commodity-report

In-depth report on a specific commodity with price, context, and analysis

Example Conversations with Claude

Once configured, ask Claude about commodity prices naturally. The MCP server handles the data fetching.

"What's the current price of Brent crude oil?"

Brent crude is currently trading at $XX.XX per barrel (USD). This is the global benchmark for crude oil pricing.

MCP tool used: get_commodity_price

"Compare US and European natural gas prices"

Henry Hub (US): $X.XX/MMBtu vs Dutch TTF (EU): EUR XX.XX/MWh. The MCP server handles unit conversions and cross-market comparisons.

MCP tool used: compare_prices

"Give me a complete energy market overview"

Returns all source-timestamped commodity prices organized by category — crude oil, natural gas, refined products, coal, metals, and carbon credits.

MCP tool used: get_market_overview

"What's the Brent-WTI spread right now?"

Fetches both prices and calculates the spread. Claude can then provide context on what the spread means for markets.

MCP tool used: compare_prices

What You Can Do with Claude + Oil Prices

Daily Market Briefings

Use the daily-briefing prompt to get a professional energy market summary with key prices, movements, and context. Perfect for morning stand-ups.

Spread & Arbitrage Analysis

Compare Brent-WTI spreads, US-EU gas differentials, or crude-refined product margins. Claude provides context on what the numbers mean for your business.

Research & Reports

Claude can create formatted market reports, client briefings, and commodity analysis documents using real-time price data from the MCP server.

Frequently Asked Questions

How do I add oil price data to Claude Desktop?

Add the MCP server configuration to your claude_desktop_config.json file. On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows: %APPDATA%\Claude\claude_desktop_config.json. Restart Claude and start asking about commodity prices.

What is the difference between Claude Desktop and Claude Code setup?

Claude Desktop uses a global config file (claude_desktop_config.json) that applies to all conversations. Claude Code uses a project-level .mcp.json file in your project root. The MCP server config is identical — only the file location differs.

Does the MCP server work with Claude's artifacts?

Yes. Claude can fetch commodity prices via the MCP server and use them in artifacts — creating charts, formatted tables, analysis reports, or interactive dashboards with real-time price data.

Do I need Node.js installed?

Yes, Node.js 18+ is required. The MCP server runs via npx which comes with Node.js. Alternatively, install globally with npm install -g oilpriceapi-mcp.

Is it free?

The oilpriceapi-mcp npm package is free and open source. OilPriceAPI offers a free tier with 50 requests per day. Paid plans start at $19/month for 10,000 requests.

Start Using Oil Prices in Claude

Get your free API key, add the MCP config, and ask Claude about commodity prices