
AESO MCP
io.github.bchoi-qwe由 GitHub 帳號 bchoi-qwe 發布v0.3.0更新於 Oct 24, 2026
Typed Alberta electricity market data and analytics via official AESO APIs.
概覽
本機 MCP 伺服器,讓助理以強型別方式存取亞伯達(AESO)官方電力市場資料,並提供確定性市場分析。
- 可以做什麼
- 取得目前與歷史市場資料:市場快照、Pool Price、SMP、負載、發電、聯絡線潮流、備轉容量、停機、聯絡線能力、計量電量與資產名錄
- 取得官方預測、供電充裕度/盈餘、FFR 排程、調度下調服務、TMR 參考價、系統事件與研究檔案
- 查詢運轉備轉價格、預測與啟動情形
- 執行確定性分析:期間比較、價格事件與統計、擷取價格、淨負載、供給堆疊、發電結構、爬升、停機影響、預測誤差、收入與參與者集中度
- 可選同步本機 DuckDB/Parquet 歷史資料庫,並讀取術語表、資料集與方法論文檔資源
- 適用情境
- 適合能源分析師、研究人員、記者與市場參與者,讓助理從 AESO 官方來源取得並分析亞伯達電力市場資料,包括可重現的事件研究與預測與實際值比較。
- 執行需求
- 以 Python 套件在本機執行(Python 3.13+,建議使用 uv/uvx),透過 stdio 或 HTTP 監聽。需要 AESO APIM 訂閱金鑰,置於 AESO_API_KEY;非回送位址的 HTTP 綁定另需 AESO_MCP_HTTP_BEARER_TOKEN。需要連線至 AESO 端點的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 AESO MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
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.
Features
- Typed MCP tools with Pydantic inputs/outputs and structured results
- Stable FastMCP 4.0.10 runtime targeting MCP
2026-07-28, with FastMCP's per-connection negotiation for legacy session-based clients - 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 chronology - Official 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 mode - Query bounds, cache provenance, completeness metadata, upstream
Retry-Afterhandling, and secret-safe machine-readable errors - Hardened 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
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 and an MCP interoperability and security matrix.
Domain 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)
For incremental DuckDB/Parquet historical storage:
From GitHub
To run the current repository version directly:
Development
Docker
Send 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. The built-in HTTP listener
does not terminate TLS; for off-host traffic, terminate TLS at a trusted reverse proxy and never
send bearer credentials over public plaintext HTTP. See MCP interoperability and security.
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)
HTTP transport
HTTP always validates Host and Origin. A non-loopback bind now refuses to start unless
AESO_MCP_HTTP_BEARER_TOKEN is configured. The built-in listener is plain HTTP; terminate TLS at a
trusted ingress before exposing it beyond a trusted private network. 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
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
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 and retrieval 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
Optional live tests:
MCP Inspector:
Tests
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.4.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. It also includes 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.
來源:README.md,提交 b9cc6c3
工具
0版本歷史
1- v0.3.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分