Commodities-API logo

Commodities-API

Live

Real-time and historical commodity prices for crude oil, natural gas, gold, silver, and 100+ commodities with time-series and OHLC data.

What is Commodities-API?

Access Commodities-API for real-time and historical pricing on 100+ commodities including Brent crude, WTI, natural gas, gasoline, diesel, gold, and silver. Supports latest prices, historical lookups by date, time-series between date ranges, price fluctuation analysis, currency/commodity conversion, and OHLC data. Includes convenience methods for oil and energy commodity groups.

Available Tools

  • getLatestPrices
    Get latest commodity prices. Optionally filter by base currency and symbols.
  • getHistoricalPrices
    Get historical prices for a specific date.
  • getTimeSeries
    Get time-series data between two dates.
  • getFluctuation
    Get price fluctuation (change) between two dates.
  • convert
    Convert an amount from one commodity/currency to another.
  • getOHLC
    Get open/high/low/close for a commodity on a specific date.
  • getOilPrices
    Get latest crude oil prices (Brent + WTI).
  • getEnergyPrices
    Get latest energy commodity prices (oil, gas, gasoline, diesel).

Requirements

  • API key required
    Sign up for free at https://commodities-api.com/documentation. Enter on the MCP Servers page.

Quick Setup Guide

Follow these steps to connect your AI agents to this connector

Register at https://commodities-api.com and generate your API key. Free tier allows 100 req/month.

Navigate to /mcp, find Commodities-API, and enter your API key.

Use getOilPrices for quick Brent/WTI, getTimeSeries for historical trends, or convert for currency conversion.

Connect to Your AI Assistant

Choose your AI assistant below for specific setup instructions

Follow these steps to connect Commodities-API 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 Commodities-API 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 Commodities-API 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:

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