GridIberia

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/mcp

Prefer 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/processed

The 9 MCP tools

ToolWhat it returns
get_grid_summaryCoverage per operator and direction: nodes, dates, saturation and total capacity.
search_nodesSearch nodes by name, province, voltage, minimum capacity or radius.
get_node_historyMonthly timeline of one node and its changes.
get_latest_changesMonth-over-month changes: openings, saturations, increases and decreases.
describe_schemaColumns, allowed values, caveats and date ranges.
screen_siteScreen a site: nearby nodes with capacity for your project.
compare_regionsCompare 2 to 6 provinces or districts.
get_substation_detailOne transmission substation and the distribution nodes it feeds.
get_market_contextMIBEL 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

EndpointWhat it returns
GET /v1/summaryCoverage per operator and direction (?country=ES|PT).
GET /v1/nodesSearch nodes: ?q=, province, min_mw, lat/lon/radius_km, limit.
GET /v1/nodes/{node_id}/historyMonthly timeline of one node (URL-encode the id).
GET /v1/changesMonth-over-month capacity changes.
GET /v1/screenScreen a site: ?lat=&lon=&project_type=solar|wind|bess|datacenter|h2|any.
GET /v1/regions/compareCompare provinces: ?regions=madrid,sevilla.
GET /v1/substations/{substation}Transmission substation and its downstream nodes.
GET /v1/marketMIBEL prices and renewable mix (?ccaa=&months=).
GET /v1/schemaColumns, enums and caveats.
POST /mcpRemote MCP server (Streamable HTTP, JSON-RPC).
GET /openapi.jsonOpenAPI 3.1 description of the API.
GET /docsHuman-readable API documentation.
GET /healthzService 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

No account, no email: RSS feed