aeso-mcp
This server provides agent-native, typed access to Alberta's electricity market data and analytics using official AESO data.
Market snapshot: current price, load, generation mix, interchange, and reserves.
Historical prices: hourly pool prices and minute-level system marginal prices (CAD/MWh).
Load: Alberta Internal Load (MW) with optional forecast.
Generation: real-time fuel mix and historical wind/solar output.
Interchange: current path flows and net interchange (MW).
Operating reserves: contingency reserve and related indicators.
Generator outages: hourly outage capacity by fuel/technology.
Asset registry: searchable AESO market assets.
Analytics: compare market periods, detect sustained high-price events, explain conditions with structured evidence, and evaluate load forecast accuracy with error metrics.
Resources: glossary, dataset catalog, and methodology notes for key prices.
All tools are read‑only, use Mountain time timestamps, return provenance metadata, and require an AESO APIM API key.
Fetches official individual-asset Historical CSD Generation Data from AESO's Box-hosted archive, providing hourly and five-minute generation records.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@aeso-mcpWhat is Alberta's current grid situation?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
aeso-mcp
Agent-native, strongly typed access and analytics for Alberta's electricity market using official AESO data.
Independent open-source project. Not affiliated with or endorsed by the Alberta Electric System Operator (AESO).
What it is
aeso-mcp is a Model Context Protocol (MCP) server that exposes Alberta electricity-market observations and deterministic analytics to AI clients. It is designed for energy analysts, researchers, developers, journalists, market participants, and AI agents that need reliable, structured AESO data—not a thin REST decorator layer.
Related MCP server: EnergyAtIt MCP Server
Features
Typed MCP tools with Pydantic inputs/outputs and structured results
Current market snapshot combining price, load, generation, interchange, and reserves
Paginated historical Pool Price, System Marginal Price, load, and generation retrieval
Official individual-asset Historical CSD Generation Data at hourly and five-minute resolution
Optional incremental DuckDB index and partitioned Parquet snapshots for repeatable research
Official AIL, Pool Price, wind, solar, and combined wind/solar forecast publications through one typed
get_forecastcontract, with persisted publication vintages and point-in-timeas_ofselection that excludes unknown publication chronologyOfficial supply-adequacy, supply-surplus, FFR Net Schedule, Dispatch Down Service, TMR reference-price, and AIES system-event reports
Official historical adequacy/cushion web codes, transmission outages, planning-area hourly load/generation, constrained volume, EEA events, operating-reserve directives, and the current Pool Participant registry through one typed research-archive contract
Authenticated APIM reports for merit order, commitments, capability/outages, interties, metered volumes, and operating-reserve offer control
Deterministic analytics: compact history summaries, period comparison, event detection, condition evidence, price distributions, capture price, net load, supply stack, generation, outage association, generalized forecast accuracy, asset gross energy revenue, CSD-versus- metered comparisons, ramps, supply-surplus associations, and transparent supply-tightness indicators, plus participant concentration, regional, constrained-volume, scarcity, and compact system-frequency analysis
Deterministic research manifests identify exact input publications, parameters, methodology, completeness, and degradation warnings for multi-source market-event analysis
Public operating-reserve active/standby prices, seven-day forecasts, activations, and summaries
One complete server package and startup path:
AESO_API_KEYis always required; there is no reduced credential-free server modeQuery bounds, cache provenance, completeness metadata, upstream
Retry-Afterhandling, and secret-safe machine-readable errorsHardened HTTP transport with Host/Origin validation, bearer authentication required for non-loopback binds by default, rate/concurrency limits, request-size bounds, probes, and correlation IDs
Reusable MCP prompts plus glossary, capability, dataset, and methodology resources
Implemented datasets
Dataset | Tool | Notes |
Market snapshot |
| Current cohesive view |
Pool Price |
| Hourly CAD/MWh |
System Marginal Price |
| Minute-level CAD/MWh |
Alberta Internal Load |
| MW; optional forecast |
Generation / fuel mix |
| Current all fuels; historical wind/solar |
Interchange |
| Current path flows MW |
Operating reserves |
| Current MW indicators |
Generator outages |
| Hourly outage capacity by fuel/technology |
AIES capacity/outages |
| Hourly MC, AC, operating, and mothball outage MW |
Load outage forecast |
| Hourly forecast MW |
Energy Merit Order |
| Historical blocks; 60-day publication delay |
Unit commitments |
| Generating-unit commitment directives |
Intertie capability |
| Import/export ATC, TTC, margins, gross offers |
Intertie capability outages |
| Outages affecting interties/flowgates |
Metered volumes |
| Hourly MWh by asset; optional ID filters |
OR offer control |
| Historical reserve offer blocks; 60-day delay |
Approved Tx outages |
| AESO-approved planned transmission outages |
Long-range Tx outages |
| Tentative ~24-month significant outages |
MCSINR |
| Cumulative net revenue vs offer-cap trigger |
Secondary offer limit |
| Whether secondary offer cap is in effect |
Assets |
| Registry with filters |
Historical CSD generation |
| Individual assets; hourly / five-minute operational MW |
Official forecasts |
| AIL / Pool Price / wind / solar; source-specific horizons and cadence |
Official research archive |
| Historical adequacy/cushion, transmission, planning-area, constraint, EEA, OR-directive, and current participant records |
Supply adequacy / cushion |
| Official hourly categorical status bands |
Supply surplus |
| Official hourly zero-price forecast status |
FFR Net Schedule |
| Hourly scheduled imports (negative) / exports (positive) MW |
Dispatch Down Service |
| Published DDS availability MW |
TMR reference price |
| Published CAD/MWh value by effective date |
AIES system events |
| Bounded event-log comments; no inferred event end |
UC settlement summary |
| Hourly CAD amount and charged MW |
OR prices |
| Active and standby price components and volumes |
OR forecast |
| Current seven-day hourly MW forecast |
OR activations |
| Hourly standby volume and activation price |
Analytics: summarize_market_history, assess_supply_tightness, compare_market_periods,
find_price_events, explain_market_conditions, compare_forecast_to_actual,
get_price_statistics, get_price_duration_curve, analyze_market_event,
calculate_capture_prices, analyze_net_load, analyze_supply_stack,
analyze_intertie_utilization, analyze_generation_mix, analyze_asset_dispatch,
analyze_outage_impact, analyze_forecast_error, calculate_asset_energy_revenue,
compare_csd_to_metered, analyze_ramps, analyze_supply_surplus_events,
summarize_operating_reserve_market, analyze_participant_concentration,
analyze_regional_load_generation, analyze_constrained_volume, analyze_scarcity, and
analyze_system_frequency.
Architecture
The documentation site includes a full architecture and MCP Inspector walkthrough.
MCP clients
|
v
FastMCP adapter (aeso_mcp/mcp)
|
v
Domain services (market, grid, history, forecasts, reports, research, reserves, operations)
|
+---------------+----------------+----------------+----------------+
| | | |
v v v v
GridStatus Direct APIM Public reports CSD archive
| | (ets.aeso.ca) (Box)
+-------+-------+
|
v
AESO APIM gatewayDomain code does not depend on FastMCP. Framework changes should stay in aeso_mcp/mcp/.
All upstream clients are implementation details of this single server: the APIM key is sent only
to apimgw.aeso.ca and is never sent to the allow-listed ETS or Box hosts.
Requirements
Python 3.13+
AESO APIM API key from developer-apim.aeso.ca
uvrecommended
Installation
See LIMITATIONS.md for an honest gap inventory.
From PyPI (recommended)
export AESO_API_KEY=your-key
uvx aeso-mcpFor incremental DuckDB/Parquet historical storage:
uvx --from 'aeso-mcp[analytics]' aeso-mcpFrom GitHub
To run the current repository version directly:
export AESO_API_KEY=your-key
uvx --from git+https://github.com/bchoi-qwe/aeso-mcp.git aeso-mcpDevelopment
git clone https://github.com/bchoi-qwe/aeso-mcp.git
cd aeso-mcp
uv sync --group dev
cp .env.example .env # set AESO_API_KEY
uv run aeso-mcpDocker
docker build -t aeso-mcp .
docker run --rm \
-e AESO_API_KEY=your-key \
-e AESO_MCP_HTTP_BEARER_TOKEN=replace-with-a-long-random-token \
-p 8000:8000 \
aeso-mcpSend the same token in the MCP client's Authorization: Bearer ... header. The image binds to
0.0.0.0, so it intentionally requires bearer authentication by default.
Obtaining an AESO API key
Register at the AESO developer portal
Subscribe to the AESO public API product
Copy the primary/secondary subscription key
Set
AESO_API_KEYin your environment (never commit it)
Missing credentials produce an actionable startup error. The key is never returned through MCP tools or logged.
Example MCP client configuration
See the documentation site's MCP client configurations for maintained Codex, ChatGPT desktop app, Claude Desktop, Claude Code, and Cursor setup instructions.
Cursor / Claude Desktop style (stdio)
{
"mcpServers": {
"aeso": {
"command": "uvx",
"args": ["aeso-mcp"],
"env": {
"AESO_API_KEY": "your-key"
}
}
}
}HTTP transport
uv run aeso-mcp --transport http --host 127.0.0.1 --port 8000HTTP always validates Host and Origin. A non-loopback bind now refuses to start unless
AESO_MCP_HTTP_BEARER_TOKEN is configured. An explicit
AESO_MCP_HTTP_ALLOW_INSECURE_REMOTE=true override exists for isolated environments that accept
the risk; it is never the default. Also set AESO_MCP_HTTP_ALLOWED_HOSTS and
AESO_MCP_HTTP_ALLOWED_ORIGINS for the deployment. /healthz and /readyz contain no market data
or secrets. See .env.example for all bounded runtime settings.
Example prompts
What is Alberta's current grid situation?
What is the current pool price?
Show Alberta pool prices over the last 24 hours.
Compare today's pool prices with yesterday's.
Which hours had the highest prices this week?
How much wind and solar are producing right now?
What happened during the largest price spike this week?
How inaccurate was the seven-day wind forecast during that event?
Was AESO publishing a supply-surplus or tight supply-cushion status at the time?
What gross Pool Price energy revenue did this asset's metered MWh earn?
Explain the evidence associated with today's price increase.
Tools
Tool | Purpose |
| Current market overview |
| Hourly Pool Price history |
| Minute-level SMP history |
| Alberta Internal Load |
| Fuel mix / renewable history |
| Intertie flows |
| Operating reserve indicators |
| Hourly generator outage capacity by fuel |
| AIES capability and outage grouping by fuel |
| Hourly load-outage forecast |
| Historical energy merit-order blocks |
| Generating-unit commitment directives |
| Intertie/flowgate ATC, TTC, and margins |
| Outages affecting intertie capability |
| Metered energy by asset |
| Historical reserve offer-control blocks |
| Approved planned transmission outages |
| Tentative long-range transmission outages |
| Asset registry |
| Current MCSINR publication |
| Current secondary offer-cap status |
| Aggregate period comparison |
| High-price event detection |
| Structured evidence (not causal prose) |
| AIL forecast vs actual accuracy |
| Compact hourly/daily/weekly/monthly price and load summaries |
| Transparent reserve-adjusted supply-margin screening |
| Official individual-asset CSD archive history |
| Incremental local DuckDB/Parquet ingestion |
| Local coverage, manifests, and partition status |
| Official AIL, Pool Price, wind, solar, and combined wind/solar forecasts |
| Bounded page from one verified official historical/spatial/reliability archive |
| Official supply-adequacy and market-supply-cushion status bands |
| Official hourly supply-surplus forecast status |
| Historical scheduled FFR intertie transfer |
| Dispatch Down Service availability report |
| Published TMR reference price |
| Bounded AIES Event Log messages |
| Public hourly UC amount and charged volume |
| Price distribution and volatility statistics |
| Pool Price exceedance curve |
| Focus versus baseline multi-series associations |
| Generation-weighted price and capture rate |
| AIL minus selected renewable generation |
| Historical offer-stack analysis |
| Gross-offer to capability proxy |
| CSD energy and share by fuel |
| Asset output, capacity factor, and ramps |
| Hourly outage-price association |
| General forecast error, percentiles, market-hour and lead-time profiles |
| Metered MWh × Pool Price gross energy revenue |
| Operational CSD output versus metered MWh |
| Cadence-aware AIL, net-load, renewable, or asset ramps |
| Price/load/renewable associations during explicit surplus states |
| Active/standby price components and volumes |
| Seven-day reserve-volume forecast |
| Hourly standby activations |
| Product price/volume/activation summary |
| Offered-volume shares and HHI using current participant mapping |
| Planning-area and regional load/generation aggregates |
| Planning-area/fuel constrained MWh and optional price association |
| Historical adequacy/cushion web codes, EEA, and price context |
| Compact six-hour 10-second frequency statistics; no raw row output |
Market and research tools are read-only. sync_historical_store writes only to the configured
local historical-store root; it does not mutate AESO or another external system.
Resources
URI | Content |
| Market terminology |
| Dataset catalog |
| Pool Price interpretation |
| SMP interpretation |
| Complete tool, prompt, and resource surface |
| Dataset-specific interpretation and caveats |
Prompts: daily_market_brief, investigate_price_event, and compare_market_days.
Data semantics
Timezone:
America/Edmonton(AESO market time). DST days may have 23 or 25 local hours.Intervals: Explicit
interval_start/interval_end(half-open ranges in requests).Units: Pool Price / SMP → CAD/MWh; load / generation / interchange / reserves → MW.
Status: Metadata includes
actual/forecast/ etc. Forecasts are never implied to be settled actuals.Finality: Operational feeds may be preliminary; do not assume final settlement.
Point-in-time forecasts:
as_ofselects only vintages with known issue/publication times at or before the boundary. Unknown chronology is excluded; target intervals absent from persisted history remain unobserved rather than being backfilled from a later publication.Completeness: Metadata reports available/missing series and expected/missing observations where the source cadence is known. Optional enrichment failures are surfaced as partial or degraded results with warnings.
Pagination: Raw price, SMP, load, generation, and operational reports return
pagemetadata withnext_offset. Usesummarize_market_historybefore retrieving long raw series.Cache timing:
retrieved_atidentifies the upstream fetch;served_at,cache_hit, andcache_ageidentify when and how the response was served.Research identity:
analyze_market_event.analysis_manifestrecords exact sources, parameters, methodology version, warnings, and a deterministic SHA-256analysis_id.
Development
uv sync --group dev
uv run ruff check src tests scripts
uv run pyright src
uv run pytest tests/unit tests/contract tests/mcp tests/evals --cov=aeso_mcp
uv run python scripts/generate_catalog.py --check
uv run mkdocs build --strict
uv buildOptional live tests:
AESO_API_KEY=... uv run pytest tests/integration -m integrationMCP Inspector:
# Prefer the console entrypoint; or point Inspector at:
# uv run aeso-mcp
npx @modelcontextprotocol/inspector uv run aeso-mcpTests
tests/unit— time, bounds, analytics, configtests/contract— AESO APIM fixtures viarespxtests/mcp— tool/resource discovery and structured outputstests/integration— opt-in live AESO calls
Security
See SECURITY.md. Highlights: no arbitrary URL/shell/SQL tools, host allow-list, secret hygiene, bounded queries, stderr logging for stdio.
Development status
Version 0.3.0 includes the historical store, full CSD generation adapter, official forecast/report providers, general research analytics, operating-reserve market surface, eval suite, and documentation site. Unreleased work adds point-in-time forecast vintages, reproducibility manifests, release-policy hardening, and the verified official research-data archive.
Contributing
See CONTRIBUTING.md.
License
MIT — see LICENSE.
Disclaimer
This project is an independent open-source interface to publicly documented AESO APIs. It is not an official AESO product and is not affiliated with or endorsed by AESO. Market data may be preliminary or incomplete; verify critical decisions against official AESO publications.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server for the Australian Energy Market Operator (AEMO) National Electricity Market. Plain-English access to 5-min dispatch prices, regional demand, interconnector flows, generation by fuel, rooftop PV.5MIT
- AlicenseBqualityDmaintenanceConnects AI agents to energy infrastructure with 30+ tools for managing sites, assets, dispatch, settlements, compliance, and carbon tracking.34391MIT
- AlicenseBqualityAmaintenanceProvides real-time European and GB electricity grid data via MCP, including generation, prices, carbon intensity, and grid infrastructure.44486MIT
- FlicenseNot gradedqualityBmaintenanceA read-only MCP server that exposes European day-ahead electricity prices for ~41 bidding zones via tools like hourly prices, cheapest hours, current price, and cross-zone summary, enabling AI agents to query energy market data.
Related MCP Connectors
Real-time electricity prices for AI agents. 40+ countries, 100+ zones. No auth required.
European day-ahead electricity prices (43 zones), accuracy-published forecasts, carbon, optimize.
Agent-native crypto market-data over MCP+REST: order flow, whales, liquidations, calibrated scores
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bchoi-qwe/aeso-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server