CAISO SP15 OASIS MCP
Provides read-only SQL and dataset-specific query tools over a local SQLite database populated with CAISO OASIS market and grid data, including prices, load, renewables, fuel, carbon, schedules, ties, and shadow prices.
Click on "Deploy 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., "@CAISO SP15 OASIS MCP Show SP15 day-ahead prices for Jan 1-7, 2024."
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.
CAISO SP15 OASIS MCP
把 CAISO OASIS 上和 SP15 有关的日前电价、南部边界、影子价格、负荷、风光、燃料、碳价和系统计划下到本地 SQLite,再用 MCP 查询。其余实时/HASP 报表进 disclosure。气象是另一份 Open-Meteo 库。给同组的人训练模型用。数据是公开披露,这个仓库只提供下载和查询。
在线接口大约只保留 39 个月。默认从 2023-08-01 同步到太平洋时区的今天。2016 年以后、超出 39 个月的电价在 Historical OASIS Data Downloader,要自己的 AWS 账号,下载流量由下载方付。本工具不会去连那个桶。
SP15 在这里指什么
名称 | OASIS 里的名字 | 说明 |
SP15 日前电价 |
| 枢纽电价,含 LMP、MCC、MCE、MCL、MGHG |
南部负荷电价 |
| SCE、SDG&E、Valley Electric |
南部辅助服务 |
| 现货里没有叫 SP15 的辅助服务区。Path 26 以南就是这个区 |
Path 26 | Midway–Vincent 500kV | SP15 和 ZP26 之间的运行边界,影子价格标成 |
Path 15 | Gates–Midway 一带 | 枢纽名字的来源,影子价格标成 |
南部联络线包括 Palo Verde、Delaney、Hassayampa、North Gila、Blythe、Eldorado、Mead、Marketplace、Adelanto、IPP DC、Victorville、Sylmar、IID、VEA、Silver Peak 和 CFE。Malin、NOB、COI、Tracy 这些北部断面没有收进来。完整名单在 list_catalog。
region_tag 是按约束名字做的地名分类,原始名字原样保存。query_shadow_prices 的 region=all 可以看到当天披露的全部日前支路约束,不只有南部。
影子价格只在绑定的小时出现。空值不是 0 美元。
方向 I 是进口到 CAISO,E 是从 CAISO 出口。OASIS 把 OTC_MW 标成 Hourly TTC,把 TTC_MW 标成 Seasonal TTC。useage_mw 沿用他们的拼写,意思是未安排的输电权容量。
Related MCP server: whoop-postgres-mcp
安装
python3 -m venv .venv
.venv/bin/pip install -e .
.venv/bin/python -m sp15_oasis sync第一次同步大约要几十分钟。请求之间停 7 秒,这是为了待在 CAISO 的可接受使用范围里。不要把 --sleep 改小,也不要几个人同时对 OASIS 做全量同步。一个人同步完,把 data/sp15.sqlite 拷给别人即可。
每天补数再跑一次同一条命令。已经结束的历史块会跳过,只刷新还包含今天的那一块。
只补某一张表:
.venv/bin/python -m sp15_oasis sync --dataset dam_lmp
.venv/bin/python -m sp15_oasis status数据库在 data/sp15.sqlite,不进 Git。换路径用环境变量 SP15_DB。
接到 Cursor
把下面放进 Cursor 的 MCP 配置,路径改成自己的克隆目录。改完后重载 MCP。
{
"mcpServers": {
"caiso-sp15": {
"command": "/ABS/PATH/TO/repo/.venv/bin/python",
"args": ["-m", "sp15_oasis"],
"env": { "SP15_ROOT": "/ABS/PATH/TO/repo" }
}
}
}服务走 stdio,只在本机查询本地库,不会把 OASIS 再包成一个公开网站。
从零安装、同步和接到 Cursor 见 MCP使用指南。字段中文名、OASIS 原名和单位见 数据指标对照表。
每天 01:15(这台电脑的本地时间)自动补当天已经发布的数据。入库成功和缺数都会在这台 Mac 上弹通知;缺了会持续补到 02:00:
./scripts/install-daily-sync.sh工具
list_catalog:节点、联络线、单位、库里有多少天dataset_coverage:每张表的起止运行日和同步进度query_dam_prices:日前电价,美元/MWhquery_ancillary:AS_SP26 日前价格(美元/MW)、需求或采购结果(MW)query_load:小时负荷预测、实际负荷、日峰预测,MWquery_renewables:风光日前预测、实际出力,以及全网合计,MWquery_fuel:燃料区燃气价格,美元/mmBtuquery_ghg:加州碳配额价格指数query_system_schedule:日前系统发用电计划,南部区是TAC_SOUTHquery_report:disclosure里的其余报表。report用对照表里的名字,例如lmp_rtm_5min、load_rtpdlist_weather_datasets、query_weather_forecast:Open-Meteo 的 GFS 点预报。不在data/sp15.sqlitequery_tie_atc:南部联络线日前 ATC,MWquery_tie_usage:南部联络线日前 TTC、OTC、计划潮流、TRMquery_shadow_prices:日前支路/诺模图或联络线约束影子价格training_panel:事后同小时关联表,不是防泄漏预测训练集。预测训练用下面的research_*query_sql:一条只读 SELECTresearch_catalog、research_training、research_prediction_inputs、research_predictions、research_metrics:冻结研究分区。读的是SP15_RESEARCH_ROOT指向的实验,不是这份 OASIS 档案
日期都是标的运行日 YYYY-MM-DD,含首尾。每一行还有 issued_on(预测日期):标的日 10 月 10 日的日前数据是 10 月 9 日预测的,提前两天是 10 月 8 日,提前七天是 10 月 3 日。实测的预测日期等于标的日。training_panel 一次最多 5000 小时,用 offset 翻页。气象查询的 end 不含当天,和上面的电价日期不同。
01:15 这一轮采全的标准:日前电价、AS 价格与需求、南部联络线、CAISO/SCE/SDG&E 日前负荷,以及 SP15 风电和光伏日前预测都有完整小时。实际负荷和实际风光要等运行日走完才齐,不拿来判断这一轮缺不缺。
导出整段训练表:
.venv/bin/python -m sp15_oasis export \
--start 2024-01-01 --end 2024-12-31 \
--out data/sp15_2024.csvdata/*.csv 被 git 忽略。
主干联络线列是 Palo Verde、Eldorado、Mead、IPP DC–Adelanto、North Gila、Blythe、Sylmar、CFE。ties=ALL 会把目录里的南部联络线都摊开。列名 _i 是进口,_e 是出口,_atc 是可用容量,_ene 是计划净交换。
报表
结构化表来自 https://oasis.caiso.com/oasisapi/SingleZip。电价和边界是 DAM。负荷和风光同时有预测和实际值。公开报价走 GroupZip。
5 分钟和 15 分钟电价只保留 SP15 的 4 个节点。全机组的期望电量和调度指令没有整库接入。disclosure 的日常同步只刷新最近两个运行日;从 2023-08-01 补历史要加 --archive。结构化表字段、disclosure 的 report 名,以及气象变量和地点见 数据指标对照表。
本地表 | OASIS 报表 | 内容 |
|
| 四个节点的日前电价和分量 |
|
| AS_SP26 出清价 |
|
| AS_SP26 需求 |
|
| 南部联络线 ATC |
|
| 南部联络线容量和计划潮流 |
|
| 联络线约束影子价格,南部打了 |
|
| 支路和诺模图影子价格,带 |
|
| 日前、提前两天、提前七天负荷预测,以及实际小时负荷 |
|
| 各 TAC 区日峰负荷预测 |
|
| 风光日前预测和实际出力,含 SP15 |
|
| 全网风光合计 |
|
| 燃料区燃气价格 |
|
| 加州碳配额价格指数 |
|
| AS_SP26 日前采购结果 |
|
| 日前系统负荷、发电、进出口 |
| 多个报表,见对照表 | 实时、HASP、全联络线、EIM、CRR、延迟报价、名录。用 |
气象是另一份库,默认 /Users/jins/Documents/ChatGPT/比赛/mcp_service/runtime/caiso.sqlite,可用 SP15_WEATHER_DB 换路径。变量是气温、10 米风速、短波辐照、云量和降水,7 个代表点。watch 会先拉一轮实时快照,再补 OASIS。
如果以后从批量站点拿到同样表头的 CSV,可以叠进已有的库:
.venv/bin/python -m sp15_oasis import-csv dam_lmp /path/to/PRC_LMP.csv测试
.venv/bin/python -m unittest discover -s tests -v测试不访问 OASIS。
Available Tools
22 toolsdataset_coverageB
每张表的行数、最早和最晚运行日,以及同步块是否完成。
Inputs: no named parameters.
list_catalogA
列出数据范围:节点、南部联络线、报表、单位,以及库里已经有多少天。
先调用这个工具,再决定查询哪张表。
Inputs: no named parameters.
list_weather_datasetsA
气象预报目录:Open-Meteo 的变量、地点、覆盖、单位;不属于实测数据。
Inputs: no named parameters.
query_ancillaryB
查询 AS_SP26(SP15 所在的南部辅助服务区)的日前价格或需求。
kind:price(美元/MW)、requirement(MW)或 result(日前采购量,MW;uom 为 2 时 value 是美元成本)。 anc_type:可空。常见值 RU、RD、SR、NR、RMU、RMD。
Inputs: end (required), start (required), kind, limit, +2 more.
query_dam_pricesB
查询日前电价,单位美元/MWh。
start、end:运行日 YYYY-MM-DD,含首尾,时区 America/Los_Angeles。 node:TH_SP15_GEN-APND、DLAP_SCE-APND、DLAP_SDGE-APND、DLAP_VEA-APND,可逗号分隔,或 ALL。 component:ALL 时每个节点每小时一行,LMP、MCC、MCE、MCL、MGHG 分成列。也可以指定其中一个分量。
Inputs: end (required), start (required), node, limit, +2 more.
query_fuelC
查询燃料区燃气价格,单位美元/mmBtu。fuel_region_id 可空,表示全部区域。
Inputs: end (required), start (required), limit, offset, +1 more.
query_ghgC
查询加州碳配额价格指数,一天一条,单位美元/吨。
Inputs: end (required), start (required), limit, offset.
query_loadC
查询小时负荷,单位 MW。
market:DAM 是日前预测,2DA、7DA 是更早的预测,ACTUAL 是实际负荷,PEAK 是各区日峰预测。 tac_area:可空表示全部。常用 CA ISO-TAC、SCE-TAC、SDGE-TAC、VEA-TAC。
Inputs: end (required), start (required), limit, market, +2 more.
query_renewablesB
查询风电和光伏,单位 MW。
market:DAM 是日前预测,ACTUAL 是实际出力,SUMMARY 是全网风光合计。 trading_hub:SP15、NP15、ZP26 或 ALL。SUMMARY 不按枢纽拆。 renewable_type:Wind、Solar,或空表示两种都要。
Inputs: end (required), start (required), limit, market, +3 more.
query_reportC
查询 disclosure 表里的其余报表。
report 是数据集名,例如 lmp_rtm_5min、load_rtpd、renewable_hasp、public_bids_dam。 start 和 end 是标的运行日。forecast_date 是预测日期,可空。 标的日 2026-10-10 的日前数据,预测日期是 2026-10-09;提前两天是 2026-10-08。 实测的预测日期等于标的运行日。
Inputs: end (required), start (required), report (required), limit, +2 more.
query_shadow_pricesA
查询日前影子价格,单位美元/MWh。只包含被披露为绑定的小时。
kind:nomogram 是支路和诺模图,intertie 是联络线约束。 region:related(默认,sp15 加 path15)、sp15、path15、all。 Path 26(Midway–Vincent)标成 sp15。Path 15(Gates–Midway 一带)标成 path15。 region_tag 是地名启发式,原始约束名在 nomogram_id 里。
Inputs: end (required), start (required), kind, limit, +3 more.
query_sqlA
对本地库执行一条只读 SELECT。表名见 dataset_coverage 的 queryable_tables。
只能有一条语句。写入会被拒绝。默认最多返回 200 行,上限 1000。
Inputs: sql (required), limit.
query_system_scheduleB
查询日前系统发用电计划,单位 MW。
tac_zone:TAC_SOUTH 是南部,Caiso_Totals 是全网,也可以传 ALL。 schedule:Load、Generation、Import、Export,或空表示全部。
Inputs: end (required), start (required), limit, offset, +2 more.
query_tie_atcB
查询南部联络线日前可用输电容量,单位 MW。
ti_id 为空则返回目录里的全部南部联络线,也可以逗号分隔。 direction:I 进口到 CAISO,E 出口,ALL 两个方向。
Inputs: end (required), start (required), limit, ti_id, +2 more.
query_tie_usageC
查询南部联络线日前断面:TTC、OTC、ATC、约束、计划潮流、TRM,单位 MW。
OASIS 把 OTC_MW 标成 Hourly TTC,把 TTC_MW 标成 Seasonal TTC。 useage_mw 沿用 OASIS 的拼写,含义是未安排的输电权容量。 ene_import_mw 是该方向的计划净交换。
Inputs: end (required), start (required), limit, ti_id, +2 more.
query_weather_forecastB
读取气象预报。start 含、end 不含,日期按加州零点;时间戳需带时区。 location 例如 los_angeles/san_diego/riverside/palm_springs/tehachapi/fresno/redding。 variable: temperature_2m, wind_speed_10m, shortwave_radiation, cloud_cover, precipitation。 run 可选,指定 UTC 起报批次;不传时查询实时采集快照。as_of 按真实采集时刻过滤。 历史起报时间不是发布时间;不自动将历史回补纳入当时已知特征。辐照/降水已对齐小时起点。
Inputs: end (required), start (required), run, as_of, +5 more.
research_catalogC
List source classifications and physically separated frozen research partitions.
Inputs: no named parameters.
research_metricsA
Read aggregate historical backtest metrics. No live trading performance.
Inputs: no named parameters.
research_prediction_inputsB
Read a past-only 168-hour input window for a backtest day at D-1 09:55 PT. Cannot refit on these observations.
Inputs: day (required), limit, offset.
research_predictionsA
Read model forecasts from the predictions-only database, never training data or actual prices.
Inputs: model (required), end, limit, start, +1 more.
research_trainingB
Read training labels ONLY before July 2026. Inclusive California operating dates. Cannot return holdout truth.
Inputs: end, limit, start, offset.
training_panelA
事后同小时关联表,不是防泄漏预测训练集。预测训练请使用 research_training。
含 SP15 枢纽电价、南部聚合点、AS_SP26、Path 26/15 影子价格、主要联络线 ATC 和计划潮流。 同目标日的出清量、电价分量及影子价格不得用于预测该日 DAM 价格。
ties:MAJOR(默认 8 条主干联络线)、ALL,或逗号分隔的 ti_id。 影子价格列为空表示该小时没有披露绑定,训练时不要未经说明就填成 0。 一次最多 5000 小时,用 offset 翻页。要整段导出用命令行 export。
Inputs: end (required), start (required), ties, limit, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Most tools target distinct datasets, but there are real overlaps: query_tie_usage and query_tie_atc both expose tie ATC, query_report and query_sql are catch-alls that can duplicate specific query_* tools, and training_panel versus research_training plus multiple catalog tools require careful reading. The descriptions often warn about these boundaries, but the tool set still has some ambiguous edges.
Names are consistently snake_case with predictable prefixes such as query_, list_, and research_. A couple of tools are noun phrases (dataset_coverage, training_panel), and research_ is a category prefix rather than a verb, but overall the convention is readable and mostly uniform.
Twenty-two tools is on the heavy side for an MCP server, even for a broad CAISO market-data domain. Several tools are individually justified, but the set includes generic query_report/query_sql escape hatches and multiple catalog/research endpoints that could likely be consolidated.
The surface covers core day-ahead prices, ancillary services, ties, shadow prices, load, renewables, system schedules, fuel, GHG, weather, catalogs, SQL, and research workflows. Minor gaps remain: real-time prices and some report datasets are only reachable through query_report, and there is no dedicated bid-query tool.
Related MCP Connectors
Read-only energy market data: ISO prices, load, generation, regulatory dockets and weather.
Real-time and historical electricity grid data from North American ISOs: prices, load, fuel mix
Transmission market data and TSR actions (MISO/SPP OASIS) from the PowerStation trading platform.
Live US power market prices, load, generation, weather and permits for AI agents.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables MCP clients to query locally computed recovery, strain, sleep, workout, and heart-rate data from a personal SQLite database, with tools for daily and sleep summaries, workout details, heart-rate buckets, schema inspection, reports, sync, and read-only SQL.8MIT
- AlicenseAqualityCmaintenanceEnables AI agents to sync WHOOP recovery, sleep, workouts, cycles, and body-measurement data into a local Postgres database and query it through fast, offline-capable MCP tools without repeatedly hitting WHOOP API rate limits.10MIT
- AlicenseNot gradedqualityBmaintenanceEnables querying US electric grid time-series data – LMP prices, load, fuel mix – across ISOs via tools to list datasets, fetch historical windows, and get latest values.116 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables access to real-time electricity data for a 15-state US region plus Manitoba: fuel mix, five-minute wholesale prices, binding transmission constraints, load and forecasts, and wind/solar output. Can run as a remote MCP endpoint or a local stdio server with no authentication.47 npmMIT