MCP Connector
Query the EnergyData Iberia catalog conversationally from Claude.ai (or any MCP-capable client). Same data as the Excel add-in and REST API, exposed through 11 tools over the open Model Context Protocol.
What is the MCP connector?
MCP (Model Context Protocol)is an open standard that lets LLMs talk to live data sources and tools through a uniform interface. Promoted by Anthropic, it's already supported by Claude.ai, Cursor, Cline, and the official MCP Inspector — and the surface keeps growing.
The EnergyData MCP server exposes 11 tools that give conversational access to the Iberian / European energy catalog — the same metrics that power our Excel add-inand REST API. Ask Claude things like "what was solar capture price last month?" or "plot Spanish demand for the last 7 days" and it will pick the right tool, call it, and return the answer with the data structured for follow-up questions.
License-key gating is identical to the Excel add-in and REST API: the free plan covers discovery tools plus public-by-default metrics; higher plans unlock the full catalog. The connector authenticates via OAuth 2.1 with Dynamic Client Registration — no API key to paste.
Register in Claude.ai
Requires a Pro, Team, or Enterprise Claude.ai account (free accounts don't support custom connectors as of 2026-05).
- Open Settings → Connectors in Claude.ai and click "Add custom connector".
- Paste this URL:https://www.energydataiberia.com/api/mcp
- Claude.ai redirects you to EnergyData. Log in with the email associated with your license key.
- On the consent screen, click "Allow access". The requested scope is
email— enough to identify your license key. - Back in Claude.ai the connector appears with 11 tools listed. They default to "Needs approval"; after your first test you can flip them to "Always allow" for fluid use.
- If you plan to use
export_bulk: complete the one-time network-allowlist setup described below before your first bulk download.
For other MCP clients (Cursor, Cline, Inspector, …) the flow is the same: register the URL above and complete the OAuth 2.1 + Dynamic Client Registration handshake — both are standard, no special config needed.
The 11 tools
The MCP server registers these tools. Discovery tools work on every plan; data tools require a license key and respect the same per-metric gating as the REST and Excel paths.
| Tool | What it does | Excel equivalent | Plan |
|---|---|---|---|
ping | Health check / sanity probe. Confirms the connector is online and your token is valid. | — | free |
list_categories | Lists the catalog organised by category (Electricity Prices, Generation, Demand, Capture Prices, Natural Gas, Balancing, …). Each row includes a metric count. | — | free |
search_metrics | Substring search across the 120+ metrics (name, label, description). Optional category filter. Top 50 matches by relevance. | =ED.METRICS() | free |
get_freshness | Reports the most recent ingested timestamp per metric, with HEALTHY / STALE / MISSING classification. Useful before pulling data. | — | free |
get_unit_price | Single-point value at a specific timestamp. Commodities/futures/capture use date-only lookups; energy prices and generation accept date + hour + minute. | =ED.GET(metric, date, [hour], [minute], [zone], [tz]) | plan-gated |
get_range | Aggregated time series (or single scalar with agg=T) between two dates. Supports D/H/W/M/Q/S/Y/T aggregation; sub-hourly (5MIN/10MIN/15MIN) is premium-only. | =ED.RANGE(metric, start, end, agg, [zone], [headers], [noDate], [method], [tz], [unit]) | plan-gated |
get_capture_price | Production-weighted capture price (EUR/MWh) or capture rate (%, gen-weighted) per technology — solar, wind, nuclear, hydro, gas, coal. | =ED.CAPTURE.RANGE(tech, start, end, agg, [unit], [zone], …) | plan-gated |
export_bulk | Bulk download of a time series via a signed temporary URL (valid 1h). Same params as get_range but returns a downloadable CSV — bypasses the LLM context window. Claude curls the URL inside its code-execution sandbox, processes with pandas/numpy, and only sends the results back to the chat. Required for serious quantitative work (BESS arbitrage, capture backtests, Monte Carlo PPA). Requires one-time network-allowlist setup — see below. | =ED.RANGE() — same parameters; export_bulk delivers the full series for downstream code, not a preview | plan-gated |
get_offer_strategy | OMIE day-ahead bidding strategy by tech (solar/wind/gas/nuclear/...). Splits offered volume into 4 price tiers: negative, zero, positive-real (0..180€), safety (≥180€). Reveals e.g. 'gas bids 30% safety while solar bids 0% safety'. | =ED.OFFER.STRATEGY(tech, start, end, agg, zone, headers) | plan-gated |
get_offer_curve | OMIE day-ahead bid curve split into 8 MWh price bins (<-10, -10..0, 0..5, 5..20, 20..50, 50..100, 100..180, ≥180 €/MWh) per tech. Use agg=1 for the 24-row hour-of-day curve (ADR-011 pre-agg); default natural-year (ADR-009 ~40× faster when start/end omitted). | =ED.OFFER.CURVE(tech, start, end, agg, zone, headers) | plan-gated |
get_offer_heatmap | 24×12 grid (hour-of-day × month) of bid behaviour for a single sub-tech: median/mean offered price, MWh offered, or % negative. Pre-agg table, ~ms latency. No 'all'/'vre'/'thermal' — would average opposing strategies. | =ED.OFFER.HEATMAP(tech, year, zone, metric, headers) | plan-gated |
For the full Excel signature reference (parameters, defaults, examples) see /docs/functions. The MCP variants take an ISO timestamp where Excel takes date + hour + minute slots — semantics match.
Plan gating
Discovery tools — ping, list_categories, search_metrics, get_freshness — work on every plan, including free. They do not return time-series values, only metadata.
Data tools — get_unit_price, get_range, get_capture_price, export_bulk, get_offer_strategy, get_offer_curve, get_offer_heatmap — require an active license key. Public-by-default metrics (PVPC, day-ahead spot, key generation aggregates) are available on the free plan; the full catalog plus sub-hourly aggregations (5MIN / 10MIN / 15MIN) and the OMIE offer-* trio require a higher tier.
When a tool call is denied for plan reasons, the response includes a clear plan_required error so Claude can tell you exactly which metric (or feature) needs an upgrade. See pricing for tiers.
One-time setup for export_bulk
The export_bulk tool returns a signed URL that Claude downloads via curl inside its code-execution sandbox. By default the sandbox has a restricted network allowlist — you need to add the EnergyData domainbefore the first bulk download works. The other 10 tools return data inline through the MCP channel and don't hit the sandbox network, so they work without this step.
- Claude.ai → Settings → Capabilities → Code execution.
- Find Network access / Allowed domains (label varies by Claude.ai version).
- Add both
www.energydataiberia.comandenergydataiberia.com. - Reload the current conversation. Subsequent
export_bulkcalls will reach the export endpoint successfully.
Why we serve from our own domain: the signed URL is generated and consumed on the same Vercel host that runs the MCP server, with no third-party storage. The same domain you trust for /api/mcp also serves /api/export — no Cloudflare R2, S3, or Vercel Blob in the loop.
Troubleshooting
401 Unauthorized / invalid_token
Your access token expired or was revoked. In Claude.ai go to Settings → Connectors → EnergyData, disconnect, and add the connector again — the OAuth handshake will issue a fresh token.
403 Forbidden / plan_required
The metric (or feature, e.g. sub-hourly aggregation) belongs to a higher plan tier. Upgrade on the pricing page. The error message names the exact metric so you know what you're paying for.
Connector greyed out / "needs reauth"
The refresh token expired. From Settings → Connectors click Reconnect to re-run the OAuth flow.
Tool doesn't respond / timeout
Backend may be under transient load. Retry the request. If it persists for more than a couple of minutes, email support@energydataiberia.com with the metric and timestamp you were asking about.
export_bulk returned a URL but curl fails / connection refused
The bash sandbox network allowlist doesn't yet include the EnergyData domain. Complete the one-time setup in the "One-time setup for export_bulk" section above (Settings → Capabilities → Code execution → Allowed domains).
export_bulk URL returns 410 Gone
The signed URL expired (default validity 1 hour from issue). Ask Claude to call export_bulk again to get a fresh URL — the same parameters will work.
Claude picks the wrong tool
Be explicit in your prompt: "use get_range with agg=H" or "call get_capture_price for solar". The 10 tools have detailed descriptions, but ambiguous prompts ("show me a series") can route to get_unit_price by mistake.
Next steps
For the Excel-side equivalents of these tools (full parameter reference, defaults, capture-method semantics, DST behaviour) see /docs/functions. For the canonical list of every metric you can pass to get_unit_price / get_range, browse the metrics catalog.
Bugs, feature requests, or unclear tool behaviour: support@energydataiberia.com. Include the prompt you sent Claude, which tool was called, and the response — it speeds the triage a lot.