@pipeworx/elexon
Connect: https://gateway.pipeworx.io/elexon/mcp · Install: one-click buttons
Tools: 5
Elexon BMRS Insights MCP — Great Britain electricity grid and wholesale market data. Keyless.
Tools
generation_by_fuel(from, to)— half-hourly GB generation in MW per fuel type (FUELHH), plus abyFueltotal per fuel over the window.system_demand(from, to)— half-hourly GB transmission system demand outturn in MW (ITSDO).elexon_list_datasets(search?)— the directory of all 84 BMRS datasets: code, title, and which window parameters its route takes. Search by keyword (“wind”, “price”, “forecast”) to find a code before callingquery_dataset.query_dataset(dataset, from, to, settlement_period?, date_param?)— records from any of the 84 datasets by code. The correct window parameters are chosen per dataset automatically.elexon_system_prices(settlement_date, settlement_period?)— GB imbalance prices (system buy / system sell, GBP/MWh) per settlement period, with net imbalance volume and price derivation code (DISEBSP). Elexon serves this outside/datasets, soquery_datasetcannot reach it.
A GB settlement day has 48 half-hour settlement periods.
Auth
None. No key, no signup, no quota we have hit.
The 404 that means two different things
Elexon answers 404 {"statusCode":404,"message":"Resource not found"} for both
an unknown dataset code and a known code queried with the wrong window
parameters, because the window parameters are part of route resolution.
/datasets/MID?publishDateTimeFrom=... is a 404 even though MID exists and is
one of the most-wanted datasets in the pack — MID’s route takes from/to.
That is why this pack carries a DATASETS table instead of passing the code
straight through. It maps each of the 84 codes to one of five window styles:
| Style | Query parameters | Datasets |
|---|---|---|
publishDateTime | publishDateTimeFrom / publishDateTimeTo | 53, incl. FUELHH, ITSDO, WINDFOR, REMIT, TEMP |
from | from / to | 22, incl. MID, BOD, BOALF, QAS, MELS |
settlementDate | settlementDate + settlementPeriod | 6: B1610, MDB, MDO, PN, QPN, TUDM |
measurementDateTime | measurementDateTimeFrom / To | 1: FREQ |
submissionDateTime | submissionDateTimeFrom / To | 2: RZDF, RZDR |
Consequences worth knowing:
- The six
settlementDatedatasets are served one settlement period at a time, soquery_datasetneedssettlement_period(1–48) for those. It says so by name rather than 404ing. - An unrecognised code is rejected by the pack, before the upstream call, with the near-matches and the full code list in the message. It never books as a Pipeworx defect (fleet #584: 49 identical 404s in three hours, every one a caller guessing a code, all filed as our bug).
- A real code with an empty window returns zero records, not a 404. If you get a 404 from a code that exists, the window parameters were what was rejected.
date_paramoverrides the lookup and is rarely needed. The legacy value"settlement"meanssettlementDateFrom/To, which only FUELHH and FUELINST accept;"settlementDate"is the per-period style above.
What callers actually guess
Measured from a day of live traffic, two classes of guess account for most of the wasted calls, and the pack now answers both:
- ENTSO-E B-flow codes. B1620, B1430 and B1440 were all tried. Elexon’s spec
records the mapping in its own summaries (“Actual Aggregated Generation Per
Type (AGPT / B1620)”), so the pack resolves 16 B-codes onto the dataset that
superseded them and reports
resolved_fromin the response. - The imbalance price. SYSTEMPRICE, SYSTEMPRICES, CASH, IMBALPR, B1770 and
B1780 were tried 14 times between them. None is a dataset code — GB system
buy/sell prices live at
/balancing/settlement/system-prices, which is whatelexon_system_priceswraps. Those guesses now get pointed at it by name instead of a list of 84 codes, none of which is the one they want.
Regenerating the dataset table
Elexon adds datasets. The table in src/index.ts comes from the upstream
OpenAPI spec — note it is served from the site root, not under the API base:
curl -s https://data.elexon.co.uk/swagger/v1/swagger.json
Read the /datasets/{CODE} paths; a dataset’s window style is whichever of
publishDateTimeFrom / from / settlementDate / measurementDateTimeFrom /
submissionDateTimeFrom its parameters declare.
Data sources
- API base:
https://data.elexon.co.uk/bmrs/api/v1 - OpenAPI spec:
https://data.elexon.co.uk/swagger/v1/swagger.json - Docs:
https://bmrs.elexon.co.uk/api-documentation
Tools
- generation_by_fuel — Great Britain half-hourly electricity generation by fuel type (Elexon BMRS FUELHH dataset). Returns MW generated per fuel (CCGT/gas, COAL, NUCLEAR, WIND, BIOMASS, NPSHYD hydro, PS pumped-storage, OCGT
- system_demand — Great Britain half-hourly electricity system demand outturn in MW (Elexon BMRS ITSDO dataset) over a required ISO-datetime window; returns one row per settlement period with settlementDate, settlement
- elexon_list_datasets — Directory of all 84 Elexon BMRS Insights datasets available to query_dataset: the dataset code, what it holds, and which window parameters its route takes (publish time, from/to, settlement date + per
- elexon_system_prices — Great Britain electricity imbalance prices for a settlement day: system buy price and system sell price per settlement period, in GBP/MWh, plus the price derivation code, reserve scarcity price and ne
- query_dataset — Fetch records from any of the 84 Elexon BMRS Insights datasets by its dataset code (MID market index/day-ahead prices, FUELHH generation by fuel, WINDFOR wind forecast, FREQ system frequency, TEMP tem
Tools
-
elexon_list_datasets— Directory of all 84 Elexon BMRS Insights datasets available to query_dataset: the dataset code, what it holds, and which window parameters its route takes (publish time, from/to, settlement date + per -
elexon_system_prices— Great Britain electricity imbalance prices for a settlement day: system buy price and system sell price per settlement period, in GBP/MWh, plus the price derivation code, reserve scarcity price and ne -
generation_by_fuel— Great Britain half-hourly electricity generation by fuel type (Elexon BMRS FUELHH dataset). Returns MW generated per fuel (CCGT/gas, COAL, NUCLEAR, WIND, BIOMASS, NPSHYD hydro, PS pumped-storage, OCGT -
query_dataset— Fetch records from any of the 84 Elexon BMRS Insights datasets by its dataset code (MID market index/day-ahead prices, FUELHH generation by fuel, WINDFOR wind forecast, FREQ system frequency, TEMP tem -
system_demand— Great Britain half-hourly electricity system demand outturn in MW (Elexon BMRS ITSDO dataset) over a required ISO-datetime window; returns one row per settlement period with settlementDate, settlement