# ⚡ Energy & Commodity MCP — Futures, FX, Rates, Crypto (`nexgendata/energy-commodity-mcp`) Actor

MCP server giving AI agents one endpoint for commodity & macro data: commodity futures, CFTC COT positions, FX & currency rates, US Treasury yields, top-100 crypto, and AIS vessel tracking. 7 tools for Claude, Cursor & any MCP client.

- **URL**: https://apify.com/nexgendata/energy-commodity-mcp.md
- **Developed by:** [NexGenData](https://apify.com/nexgendata) (community)
- **Categories:** MCP servers, AI
- **Stats:** 31 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## ⚡ Energy & Commodity MCP — Futures, FX, Rates, Crypto

**A live Model Context Protocol (MCP) server that gives your AI agent direct, on-demand access to energy and commodity market data — futures, COT positioning, FX, rates, crypto, and vessel flows — through a single hosted endpoint. Connect once from Claude Desktop, Cursor, Windsurf, Cline, or n8n and let the model pull the numbers itself.**

Large language models are excellent at reasoning about markets and terrible at knowing today's numbers. The Energy & Commodity MCP closes that gap. Instead of copy-pasting quotes into a prompt, this MCP server exposes a focused toolbox of energy- and commodity-market data sources the model can call autonomously, mid-conversation, whenever it needs a live figure. Ask "is crude positioning stretched and how does that line up with the dollar?" and the agent calls the futures, COT, and FX tools, then reasons over the results — no tab-switching, no glue code. It is a hosted, always-on endpoint: nothing to install beyond pointing your MCP client at the URL. It runs on Apify's infrastructure and bills per tool call.

### Tools

- **Futures** — current prices and contract data for energy and commodity futures (crude, natural gas, refined products, metals, ags), grounding any "where is X trading" question in a live quote.
- **COT (Commitments of Traders)** — positioning showing how commercial hedgers, managed money, and other trader categories lean in a given futures market — the canonical read on crowded vs stretched positioning.
- **FX** — spot rates for the currency pairs that drive commodity pricing (the dollar above all, plus commodity-linked crosses), so the model can connect a dollar move to a commodity move.
- **Rates** — benchmark interest-rate levels for the macro backdrop that shapes carry, storage economics, and risk appetite.
- **Crypto** — prices for major crypto assets, for desks that treat digital assets as part of the broader macro/commodity-adjacent risk picture.
- **Vessels** — vessel and shipping-flow data relevant to physical commodity movement, a window into the seaborne logistics connecting supply and demand.

Each tool returns structured data the model reads and reasons over directly. Because the agent decides which tools to call, a single natural-language question can fan out across futures, COT, FX, and vessels in one turn.

### Connect

The server speaks the Model Context Protocol over a hosted endpoint:

````

https://nexgendata--energy-commodity-mcp.apify.actor/mcp

````

Add it to any MCP-compatible client:

- **Claude Desktop** — add the server to your `claude_desktop_config.json` MCP block with the URL above and your Apify token, then restart. The tools appear in the tray and Claude calls them when a question needs live data.
- **Cursor** — add the MCP server under Settings → MCP / tools with the same URL and token.
- **Windsurf** — register the endpoint in Windsurf's MCP configuration; Cascade can invoke the tools inline.
- **Cline** — add the server URL to Cline's MCP settings in VS Code.
- **n8n** — use an MCP client node pointed at the endpoint to wire commodity-data tool calls into automated workflows.

Authentication is via your Apify token — the same token you use for any Apify actor. Because it's hosted, there's no local process to run or keep alive.

### Use cases

- **Conversational commodity research** — ask in plain language and let the agent call futures, COT, and FX tools and synthesize an answer.
- **Agentic morning briefs** — an n8n or Claude workflow calls the tools each morning and drafts a desk note covering price moves, positioning, FX, and rates.
- **Cross-asset reasoning** — combine futures prices, rate levels, and FX in one pass to explain a commodity move in macro context.
- **Positioning monitoring** — use the COT tool to track approach to crowded extremes and flag positioning/price divergence.
- **Physical-flow context** — layer vessel/shipping data onto a price discussion for energy and bulk-commodity analysis.
- **Crypto-as-macro tie-in** — fold digital-asset moves into the broader risk narrative for desks that watch crypto as a risk-appetite signal.
- **Ad-hoc analyst Q&A** — the model fetches the number itself, so the analyst stays in the flow of the question.

### Pricing

This MCP server bills on Apify's **pay-per-event** model, **per tool call** — you pay only when the agent actually invokes a tool, not for idle connection time:

- **$0.10 per tool call** (one charge each time the model calls a tool)
- A negligible start cost per session (sub-cent at typical memory)

No subscription, no seat licence, no minimum.

#### Cost worked example

- A cross-asset question triggering 3 tool calls (futures + COT + FX) → 3 × $0.10 = **$0.30**
- A scheduled morning brief making ~6 tool calls → **$0.60/day**, ~$13/month
- A heavy research session of 50 tool calls → **$5.00**

An idle connection costs nothing — you pay only when the agent reaches for data, so cost scales with how much the model actually queries.

### FAQ

**Q: What is an MCP server and why use one?**

A: The Model Context Protocol is an open standard that lets AI clients (Claude Desktop, Cursor, Windsurf, Cline, n8n, and others) call external tools during a conversation. The model decides when to call them. This server's tools deliver live energy/commodity data so the model grounds answers in real numbers instead of guessing.

**Q: Do I have to install anything?**

A: No. It's a hosted endpoint — add the URL and your Apify token to your MCP client's config; there's no local server to install, run, or maintain.

**Q: Which clients are supported?**

A: Any MCP-compatible client. We document Claude Desktop, Cursor, Windsurf, Cline, and n8n, but the endpoint follows the standard, so other MCP clients work the same way.

**Q: How does authentication work?**

A: Through your Apify token — the same one you use for any Apify actor. Tool calls are authenticated and billed under your account.

**Q: How is it billed?**

A: Per tool call, at $0.10 per call, on Apify's pay-per-event model. Idle connections cost nothing.

**Q: Can I use it in automated workflows?**

A: Yes — via n8n's MCP client node or any programmatic MCP client, you can wire the tools into scheduled briefs, alerts, and enrichment pipelines, not just chat.

### Schema stability & versioning

This MCP server follows NexGenData's **additive-only** contract. New tools and new response fields may be added over time; existing tools and fields are not renamed or removed without a major-version bump and an advance changelog notice. Build agent workflows on the current toolset without worrying about a silent breaking change.

### Compliance & legal

- The tools read **public market data** — prices, positioning reports, rates, and flow data any market participant can access. No authentication to third-party private systems, no anti-bot evasion of paywalled sources.
- The server performs **no trading and no movement of funds** — it returns data for the model to reason over; trading decisions and actions remain entirely with you.
- Requests route through Apify's compliant infrastructure with polite pacing; authentication is via your own Apify token.
- You are responsible for ensuring downstream use complies with source providers' terms, your jurisdiction's market-data and derivatives regulations, and any licensing rules. Consult counsel before commercial redistribution of the underlying data.

### Related NexGenData actors

Part of NexGenData's markets & MCP-bundle cluster — pair this server with:

- [Crypto / DeFi MCP](https://apify.com/nexgendata/crypto-defi-mcp?fpr=2ayu9b) — MCP bundle for on-chain and crypto-market data
- [Sales Intelligence MCP](https://apify.com/nexgendata/sales-intelligence-mcp?fpr=2ayu9b) — MCP bundle for B2B prospecting data
- [Supply Chain & Logistics MCP](https://apify.com/nexgendata/supply-chain-logistics-mcp?fpr=2ayu9b) — MCP bundle for trade and logistics data
- [Crypto Perp Funding Rates Tracker](https://apify.com/nexgendata/crypto-perp-funding-rates-tracker?fpr=2ayu9b) — Binance perpetual funding rates and mark prices
- [US Treasury Auction Results](https://apify.com/nexgendata/us-treasury-auction-results?fpr=2ayu9b) — primary-market Treasury auction data
- [Global Central Bank Policy Rates](https://apify.com/nexgendata/global-central-bank-policy-rates?fpr=2ayu9b) — policy rates across major central banks

Explore the full catalog of 200+ buyer-intent actors and MCP bundles at **https://apify.com/nexgendata?fpr=2ayu9b**.

# Actor input Schema



## Actor input object example

```json
{}
````

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgendata/energy-commodity-mcp").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("nexgendata/energy-commodity-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call nexgendata/energy-commodity-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=nexgendata/energy-commodity-mcp",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "⚡ Energy & Commodity MCP — Futures, FX, Rates, Crypto",
        "description": "MCP server giving AI agents one endpoint for commodity & macro data: commodity futures, CFTC COT positions, FX & currency rates, US Treasury yields, top-100 crypto, and AIS vessel tracking. 7 tools for Claude, Cursor & any MCP client.",
        "version": "0.0",
        "x-build-id": "ArbevtZQO04Xy2b8X"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/nexgendata~energy-commodity-mcp/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-nexgendata-energy-commodity-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/nexgendata~energy-commodity-mcp/runs": {
            "post": {
                "operationId": "runs-sync-nexgendata-energy-commodity-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/nexgendata~energy-commodity-mcp/run-sync": {
            "post": {
                "operationId": "run-sync-nexgendata-energy-commodity-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {}
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
