API, remote MCP and open data
Query Spanish and Portuguese grid hosting capacity from Claude, Cursor or your own code: a no-auth remote MCP server, a read-only REST API and downloadable GeoParquet.
Remote MCP server
Streamable HTTP, MCP protocol 2025-03-26, no authentication and read-only. Add it to Claude, Cursor or any MCP client with this configuration: POST https://api.gridiberia.com/mcp
{
"mcpServers": {
"gridiberia": {
"type": "http",
"url": "https://api.gridiberia.com/mcp"
}
}
}With Claude Code, from the terminal:
claude mcp add --transport http gridiberia https://api.gridiberia.com/mcpPrefer to run it locally? Clone the repository and start the stdio server:
git clone https://github.com/lsanza1/gridiberia
cd gridiberia
uv run iberia-grid mcp --data-dir data/processedThe 9 MCP tools
| Tool | What it returns |
|---|---|
get_grid_summary | Coverage per operator and direction: nodes, dates, saturation and total capacity. |
search_nodes | Search nodes by name, province, voltage, minimum capacity or radius. |
get_node_history | Monthly timeline of one node and its changes. |
get_latest_changes | Month-over-month changes: openings, saturations, increases and decreases. |
describe_schema | Columns, allowed values, caveats and date ranges. |
screen_site | Screen a site: nearby nodes with capacity for your project. |
compare_regions | Compare 2 to 6 provinces or districts. |
get_substation_detail | One transmission substation and the distribution nodes it feeds. |
get_market_context | MIBEL prices and renewable share by Spanish region. |
Read-only REST API (OpenAPI 3.1)
JSON responses, no API key, cached for 5 minutes, with rate limits. https://api.gridiberia.com/docs · openapi.json
| Endpoint | What it returns |
|---|---|
GET /v1/summary | Coverage per operator and direction (?country=ES|PT). |
GET /v1/nodes | Search nodes: ?q=, province, min_mw, lat/lon/radius_km, limit. |
GET /v1/nodes/{node_id}/history | Monthly timeline of one node (URL-encode the id). |
GET /v1/changes | Month-over-month capacity changes. |
GET /v1/screen | Screen a site: ?lat=&lon=&project_type=solar|wind|bess|datacenter|h2|any. |
GET /v1/regions/compare | Compare provinces: ?regions=madrid,sevilla. |
GET /v1/substations/{substation} | Transmission substation and its downstream nodes. |
GET /v1/market | MIBEL prices and renewable mix (?ccaa=&months=). |
GET /v1/schema | Columns, enums and caveats. |
POST /mcp | Remote MCP server (Streamable HTTP, JSON-RPC). |
GET /openapi.json | OpenAPI 3.1 description of the API. |
GET /docs | Human-readable API documentation. |
GET /healthz | Service and dataset health. |
Ready-to-run examples:
curl -s "https://api.gridiberia.com/v1/summary?country=ES"
curl -s "https://api.gridiberia.com/v1/nodes?q=morata&min_mw=10&limit=5"
curl -s "https://api.gridiberia.com/v1/screen?lat=40.42&lon=-3.70&project_type=bess&radius_km=30"
curl -s "https://api.gridiberia.com/v1/regions/compare?regions=madrid,sevilla"
curl -s -X POST "https://api.gridiberia.com/mcp" -H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Bulk open data (GeoParquet and STAC)
The full snapshot and diff history is published as GeoParquet (EPSG:4326) with a STAC v1.0.0 catalog. With DuckDB and httpfs you can query it without downloading anything:
INSTALL httpfs;
LOAD httpfs;
-- Spain only (MW): never add Portuguese MVA to Spanish MW.
SELECT node_name, province, operator_name, available_mw
FROM read_parquet('https://data.gridiberia.com/snapshots/snapshots.parquet')
WHERE country = 'ES' AND direction = 'demand'
QUALIFY row_number() OVER (
PARTITION BY operator_code, node_id ORDER BY snapshot_date DESC) = 1
ORDER BY available_mw DESC NULLS LAST
LIMIT 20;Units and licensing
Spain publishes active power in MW; Portugal publishes apparent power in MVA. Never add Spanish MW and Portuguese MVA together directly.
Code under the MIT licence. Data derived from official operator filings (CC BY 4.0 where applicable) and OpenStreetMap (ODbL 1.0). For information only: confirm capacity with the grid operator. Code on GitHub
Dataset changelog alerts
One email a month when a new snapshot lands, with the nodes that moved most, so your queries and agents always run on fresh data.
We only store your email, language, signup date and the page you signed up from, to send you this digest. No ads, no tracking. · Privacy policy