OilPriceAPI logo

OilPriceAPI

Live

Real-time and historical commodity prices for crude oil, natural gas, diesel, gasoline, and heating oil.

What is OilPriceAPI?

Access real-time and historical pricing for Brent crude, WTI, OPEC basket, natural gas, RBOB gasoline, diesel, heating oil, and NGL-related commodities. Includes latest quotes, past day/week/month/year price history, and grouped convenience methods for oil and gas pricing. PatchOps can fall back to a limited demo response when no API key is configured, but full access requires a key.

Available Tools

  • getLatestPrices
    Get all latest commodity prices. Returns Brent, WTI, OPEC, natural gas, diesel, gasoline, heating oil, etc.
  • getPrice
    Get the latest price for a single commodity by code (e.g. BRENT_CRUDE_USD, WTI_USD, NATURAL_GAS_USD).
  • getPastDay
    Get price history for the past day. Optionally filter to a single commodity by code.
  • getPastWeek
    Get price history for the past week. Optionally filter to a single commodity by code.
  • getPastMonth
    Get price history for the past month. Optionally filter to a single commodity by code.
  • getPastYear
    Get price history for the past year. Optionally filter to a single commodity by code.
  • listCommodities
    List all available commodity codes. Useful for discovering what can be queried.
  • getOilPrices
    Get latest crude oil prices: WTI, Brent, and OPEC basket.
  • getGasPrices
    Get latest gas & refined product prices: natural gas, RBOB gasoline, diesel, heating oil.
  • getNGLPrices
    Get latest NGL-related prices. Returns any NGL / propane / butane / ethane commodities available.

Requirements

  • API key recommended
    Sign up at https://oilpriceapi.com/. Full access requires a key; PatchOps may return limited demo data without one.

Quick Setup Guide

Follow these steps to connect your AI agents to this connector

Register at https://oilpriceapi.com and generate your API key for full access.

Navigate to /mcp, find OilPriceAPI, and enter your API key. Without one, some calls may return limited demo data.

Use getLatestPrices for all commodities, or getOilPrices / getGasPrices for grouped results.

Connect to Your AI Assistant

Choose your AI assistant below for specific setup instructions

Follow these steps to connect OilPriceAPI to Claude:

Step 1: Open Claude Settings

Launch Claude → Click the profile button (bottom left) → Navigate to Settings

Step 2: Access Connectors

Scroll down to the Connectors tab → Navigate to the bottom → Click “Add Custom Connector”

Step 3: Name Your Connector

Enter any name you'd like for this connector

Step 4: Get the Connector URL

Log in to PatchOps → Navigate to the /mcp page → Copy the connector URL you want to use

Step 5: Add the Connector

Paste the URL in the “Remote MCP Server URL” text box → Click Add

Step 6: Start Using

Your connector is now ready to use in Claude

Follow these steps to connect OilPriceAPI to ChatGPT:

Step 1: Enable Developer Mode

Go to Settings → Connectors → Advanced → Enable Developer mode

Step 2: Create New Connector

Go back to Connectors page → Click “Create” (top right)

Step 3: Name Your Connector

Enter any name you'd like for this connector (descriptions are optional)

Step 4: Get the Connector URL

Log in to PatchOps → Navigate to the /mcp page → Copy the connector URL you want to use

Step 5: Add the URL

Paste the URL in the “MCP Server URL” text box

Step 6: Set Authentication

Click the authentication dropdown → Select “No authentication” (PatchOps handles authentication internally)

Step 7: Create the Connector

Click “I understand and want to continue” checkbox → Press Create

Step 8: Using the Connector

Start a new chat → Click the + button (left of text box) → Open dropdown → Hover over three dots labeled “More” → Select your connector

Instructions for connecting OilPriceAPI to GitHub Copilot:

Coming Soon

Detailed setup instructions for GitHub Copilot will be added here.

For other MCP-compatible platforms:

Step 1: Get the Connector URL

Log in to PatchOps → Navigate to the /mcp page → Copy the connector URL you want to use

Step 2: Add to Configuration

Add this configuration to your MCP settings file. Replace the URL with your specific connector URL from the /mcp page:

"OilPriceAPI-MCP": {
  "url": "https://patchops.ai/api/mcp/...",
  "type": "http"
}

Example Configuration

Here’s an example using PatchOps MCP:

"PatchOps-MCP": {
  "url": "https://patchops.ai/api/mcp/...",
  "type": "http"
}