MCP
Connect an agent to Energy API
Sixteen tools for gas, electricity, oil, coal, and carbon prices. The server is
https://mcp.energy-api.com/mcp.
Listing the tools works without a key. Calling one needs the API key you already use on the REST API.
Tools
These are the tools the server actually exposes. Each one calls the matching REST endpoint.
-
symbolsCatalog of price symbols (gas, electricity, carbon, coal, oil), with code, currency, and frequency. Call this before the price tools.
-
latestMost recent price for one or more symbols, with the observation date and currency.
-
historicalPrice of one or more symbols on a past date.
-
timeseriesPrice history of one or more symbols between two dates.
-
fluctuationStart, end, change, and min/max of one or more symbols over a date range.
-
ohlcOpen, high, low, and close aggregates over weekly, monthly, or quarterly periods.
-
electricity_latestLatest electricity spot price for a country.
-
electricity_hourlyHourly electricity prices for a country and date.
-
electricity_pvpcSpain PVPC (regulated tariff) prices.
-
gas_latestLatest natural gas benchmark (TTF, Henry Hub, and the other gas symbols).
-
emissions_latestLatest EU ETS allowance price (EUA).
-
coal_latestLatest coal benchmark (Rotterdam, Newcastle).
-
carbon_intensityGrid carbon intensity for a country.
-
forecastForward-looking price or intensity series where the upstream source publishes one.
-
cost_estimateEstimate a cost from a symbol, a quantity, and a period.
-
statusWhich upstream providers last updated, and whether a symbol is stale.
Authentication
This MCP server does not run a browser login and does not issue a public OAuth client ID. Claude will not show a “Detected” OAuth badge, and there is nothing to click through. Send the key from API keys in a header:
Authorization: Bearer YOUR_API_KEYX-API-Key: YOUR_API_KEY
Both are translated to ?api_key= on energy-api.com. A missing key does not fail the connection:
initialize and tools/list succeed, and the tool call returns an error that points at
register and the API keys page.
?apikey= on the MCP URL also works, but Claude Desktop and claude.ai strip query credentials from the saved connector URL, so do not use that as the way to connect Claude.
Do not wrap the server with npx or mcp-remote.
Claude
- Settings → Connectors → Add custom connector. Do not look for Energy API in the official directory.
- Name:
Energy API. Remote server URL:https://mcp.energy-api.com/mcp. No key in the URL. - Leave authentication off. Claude cannot complete an OAuth login against this server.
- After it connects, the tool list is visible. Price calls need a client that can send the header below. Claude Code can.
claude mcp add --transport http energy-api https://mcp.energy-api.com/mcp --header "Authorization: Bearer YOUR_API_KEY"
Cursor
Cursor Settings → MCP, or paste this into ~/.cursor/mcp.json. The key goes in headers, not in the URL.
{
"mcpServers": {
"energy-api": {
"url": "https://mcp.energy-api.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
ChatGPT
Settings → Connectors → add a custom MCP connector with the remote URL
https://mcp.energy-api.com/mcp. Do not point the OpenAI API at this endpoint as a proxy.
ChatGPT connectors that can only do a browser OAuth login cannot send the API key; use Cursor or Claude Code for keyed calls.
Without a key the connector can still list the tools.
FAQ
Does a tool call count against my quota? Yes. One successful tool call is one REST request.
Where is the machine-readable card? /.well-known/mcp.json points docs_url at this page and server_url at the worker.