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.

  • symbols

    Catalog of price symbols (gas, electricity, carbon, coal, oil), with code, currency, and frequency. Call this before the price tools.

  • latest

    Most recent price for one or more symbols, with the observation date and currency.

  • historical

    Price of one or more symbols on a past date.

  • timeseries

    Price history of one or more symbols between two dates.

  • fluctuation

    Start, end, change, and min/max of one or more symbols over a date range.

  • ohlc

    Open, high, low, and close aggregates over weekly, monthly, or quarterly periods.

  • electricity_latest

    Latest electricity spot price for a country.

  • electricity_hourly

    Hourly electricity prices for a country and date.

  • electricity_pvpc

    Spain PVPC (regulated tariff) prices.

  • gas_latest

    Latest natural gas benchmark (TTF, Henry Hub, and the other gas symbols).

  • emissions_latest

    Latest EU ETS allowance price (EUA).

  • coal_latest

    Latest coal benchmark (Rotterdam, Newcastle).

  • carbon_intensity

    Grid carbon intensity for a country.

  • forecast

    Forward-looking price or intensity series where the upstream source publishes one.

  • cost_estimate

    Estimate a cost from a symbol, a quantity, and a period.

  • status

    Which 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_KEY
  • X-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

  1. Settings → Connectors → Add custom connector. Do not look for Energy API in the official directory.
  2. Name: Energy API. Remote server URL: https://mcp.energy-api.com/mcp. No key in the URL.
  3. Leave authentication off. Claude cannot complete an OAuth login against this server.
  4. 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.