Clarigrid

energy.clarigrid由 clarigrid.energy 发布官方发布者v0.2.0更新于 Oct 24, 2026

Read-only electricity, gas, and weather data with structured provenance and units.

已验证Streamable HTTP可网页运行位置与生活金融数据与分析

概览

AI 生成的概览

远程 MCP 端点,让助手以只读方式获取欧洲与美国电力、天然气和天气数据,并附带来源与单位信息。

可以做什么
  • 按区域获取电价、负荷、发电量与预测数据
  • 读取跨境潮流、装机容量、频率、可再生占比与碳排放强度
  • 读取天然气流量、容量、需求、储气与 LNG 库存
  • 按坐标或区域获取天气观测与预报
  • 数据带有统一单位、带时区的时间戳和结构化来源信息
适用场景
适合需要回答欧洲或美国电力与天然气市场、电网运行、碳排放强度或天气相关能源分析问题的场景,无需自行搭建数据接入。
运行要求
通过 streamable HTTP 访问的远程 MCP 端点,需要 OAuth 认证。清单中未声明环境变量或请求头。README 介绍的是 Python SDK,其中受密钥保护的来源需使用上游密钥或 ClarigGrid 账户密钥,但托管端点自身的凭据要求未在此说明。
安装前请注意
访问需要 OAuth 登录,助手将以你的账户身份操作。注册表描述称数据为只读,但 README 描述的本地 SDK 会把上游 API 密钥保存在磁盘上,并可从厂商网站拉取已存密钥;连接前请确认托管端点可访问的范围。部分上游数据在再使用时要求署名。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Clarigrid,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/energy.clarigrid%2Fclarigrid/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "clarigrid": {
      "type": "http",
      "url": "https://mcp.clarigrid.energy/mcp"
    }
  }
}

README

Clarigrid

Unified Python SDK for European and U.S. energy market data.

[PyPI] [Python] [License]


What it is

Clarigrid provides a single, stable Python interface to access and normalise European and U.S. energy market data from multiple sources. All data comes back as timezone-aware pandas DataFrames with consistent column names and units.

Built-in free providers (no API key required) include Energy-Charts (Europe), Energinet (DK1/DK2), SMARD (DE), Elia (BE), NESO (GB), Elexon/BMRS (GB), ENTSOG (EU gas), and Gas Networks Ireland. Fingrid (FI), GIE AGSI/ALSI (European gas), and TenneT (NL) are also built in and use free API keys. For the United States, CAISO OASIS and NYISO provide no-auth market and system data. EIA-930 provides nationwide hourly balancing-authority load, forecasts, fuel generation, and physical interchange with a free EIA key. Global historical meteorology and solar data are available from NASA POWER without an API key; official U.S. hourly forecasts are available from NOAA/NWS. ENTSO-E and other key-protected sources can be configured as described in API key setup below.


Install

bash
pip install clarigrid

For the interactive setup wizard and CLI tools:

bash
pip install clarigrid[auth]

Quick start

python
import clarigrid as cg
# Free providers — no key required.cg.connect("smard")   # DE prices, load, generationcg.connect("elia")    # BE load, generationcg.connect("neso")    # GB load, embedded generationcg.connect("elexon")  # GB prices, generation mixcg.connect("entsog")  # EU gas flows (any TSO zone)cg.connect("energycharts")  # European prices, power, forecasts and flowscg.connect("energinet")  # DK1/DK2 prices, power, forecasts, flows and CO2cg.connect("redata")  # ES load, generation, capacity and cross-border flowscg.connect("rte")  # FR load, generation, forecasts, exchanges and CO2cg.connect("fingrid")  # FI power, forecasts, flows, balancing and CO2 (free key)cg.connect("gie")  # European gas storage and LNG inventory (free key)cg.connect("gni")  # IE daily gas demand by sector (no key)cg.connect("eia")  # US balancing-authority load, generation and flows (free key)cg.connect("caiso")  # CAISO day-ahead hub prices (no key)cg.connect("nyiso")  # NYISO prices, load, forecasts and fuel mix (no key)cg.connect("nasapower")  # Global daily/hourly weather and solar data (no key)cg.connect("nws")  # Official U.S. hourly weather forecasts (no key)
# Optional: set output timezone (default is UTC).cg.set_timezone("Europe/Brussels")
# Fetch data — provider is chosen automatically by zone.prices = cg.get_prices("DE", "2025-01-01", "2025-01-07")  # → smardload   = cg.get_load("BE",   "2025-01-01", "2025-01-07")  # → eliagen    = cg.get_generation("GB", "2025-01-01", "2025-01-07")  # → elexongas    = cg.get_gas_flows("BE-TSO-0001", "2025-01-01", "2025-01-07")  # → entsogie_gas = cg.get_gas_demand("IE", "2025-01-01", "2025-01-07")  # → gnius_load = cg.get_load("CAISO", "2025-01-01", "2025-01-07")  # → eia (CISO)np15 = cg.get_prices("CISO_NP15", "2025-01-01", "2025-01-07")  # → caisonyc = cg.get_prices("NYISO_NYC", "2025-01-01", "2025-01-07")  # → nyisoweather = cg.get_weather(    "40.7128,-74.0060",    "2025-01-01",    "2025-01-07",    source="nasapower",)nws_forecast = cg.get_weather(    "39.7456,-97.0892",    "2026-09-17",    "2026-09-18",    source="nws",)

API key setup

Some providers (ENTSO-E, TenneT) require a personal API key issued by the upstream data source. Clarigrid supports two ways to supply these keys.

Option 1 — ClarigGrid account (recommended)

Store all your provider keys in one place at clarigrid.energy/saved. The SDK then fetches them automatically using a single ClarigGrid API key.

First-time setup (interactive):

python
import clarigrid as cgcg.connect("entsoe")# Opens browser → log in at clarigrid.energy → keys fetched automatically.

Or use the CLI:

bash
clarigrid setup          # guided wizard for all providersclarigrid connect entsoe # authenticate a single provider

Headless / CI environments: set one environment variable and no browser is ever needed:

bash
export CLARIGRID_API_KEY=your-clarigrid-uuid

The SDK uses CLARIGRID_API_KEY to fetch all your stored provider keys from clarigrid.energy on the first connect() call of each session.

How to get a CLARIGRID_API_KEY:

  1. Log in at clarigrid.energy
  2. Add your provider API keys at clarigrid.energy/saved
  3. Run cg.connect("entsoe") once in an interactive terminal — the browser flow logs you in and stores your CLARIGRID_API_KEY locally.

Option 2 — Manual key entry (no account needed)

If you prefer not to use a clarigrid.energy account, set provider keys directly. Keys are stored in ~/.config/clarigrid/.env (permissions: 600).

Environment variable (recommended for CI):

bash
export ENTSOE_API_KEY=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxexport TENNET_API_KEY=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Config file — add to ~/.config/clarigrid/.env:

ENTSOE_API_KEY="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"TENNET_API_KEY="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Zone routing

Each call to cg.connect() registers a provider and its capability-specific zone coverage in an internal router. When you call get_prices("DE"), the router picks the best connected provider for that zone and dataset automatically.

Multiple connect() calls accumulate coverage. If two providers both cover the same zone/dataset pair, the later connect() call wins.

python
cg.connect("neso")    # covers GB: load, generationcg.connect("elexon")  # covers GB: prices, generation — overwrites generation slot
# Now: GB prices → elexon, GB load → neso, GB generation → elexonprices = cg.get_prices("GB", "2025-01-01", "2025-01-02")load   = cg.get_load("GB",   "2025-01-01", "2025-01-02")

If no connected provider covers the requested zone/dataset, a helpful error is raised:

ZoneNotCoveredError: No connected provider has 'prices' data for zone 'BE'.  Consider: cg.connect('entsoe')

To bypass routing and force a specific provider:

python
df = cg.get_load("GB", "2025-01-01", "2025-01-07", source="neso")

Output format

All functions return a pandas.DataFrame with:

PropertyValue
IndexDatetimeIndex named utc_time, tz-aware
TimezoneUTC by default; change with cg.set_timezone()
Price columnprice_mwh
Load columnload_mw
Generation columnsfuel-type specific, e.g. solar_mw, wind_onshore_mw, nuclear_mw
Gas flow columnflow_kwh_d
Gas storageinventory in *_mwh; daily rates in *_mwh_d
LNG inventory*_thousand_m3; send-out in *_mwh_d
Cross-border columnssigned MW; imports positive, exports negative
Installed capacity*_capacity_mw; storage energy uses *_energy_mwh
Frequencyfrequency_hz
Renewable shares*_pct

Price currency is stored in df.attrs["currency"] (for example "EUR", "GBP", or "USD"):

python
df = cg.get_prices("DE", "2025-01-01", "2025-01-07")print(df.attrs["currency"])  # 'EUR'

European zone codes follow the ENTSO-E bidding zone convention (BE, DE_LU, FR ...). U.S. electricity uses EIA/NERC balancing-authority codes (CISO, ERCO, PJM, NYIS) and explicit market hubs (CISO_NP15). Common aliases (DE → DE_LU, CAISO → CISO, ERCOT → ERCO) resolve automatically.


Timezone

python
cg.set_timezone("Europe/Brussels")   # all subsequent calls return Brussels timecg.set_timezone("UTC")               # revert to default
df = cg.get_load("BE", "2025-01-01", "2025-01-07")# df.index is tz-aware in Europe/Brussels

Data is always fetched and cached as UTC. Timezone conversion is applied at the output boundary only.


Caching

Responses are cached locally at ~/.clarigrid/cache/ as Parquet files (requires pip install clarigrid[cache]), keyed by provider + dataset + zone + date range. Historical data is cached indefinitely; live data expires after 1 hour by default.

python
from clarigrid.core import cache
cache.info()           # DataFrame showing cached entriescache.clear()          # clear allcache.clear("smard")   # clear one providercache.set_live_ttl(1800)  # change live-data TTL to 30 min

Disable caching per call:

python
df = cg.get_prices("DE", "2025-01-01", "2025-01-07", use_cache=False)

CLI reference

Requires pip install clarigrid[auth].

bash
clarigrid setup                    # guided wizard — configure all providersclarigrid connect <source>         # authenticate a single providerclarigrid auth --show              # list configured sources (keys masked)clarigrid auth --clear <source>    # remove key for a specific sourceclarigrid auth --clear --all       # remove all stored keys

API reference

FunctionDescription
cg.connect(provider)Connect provider; handles auth for key-guarded sources
cg.set_timezone(tz)Set output timezone (IANA string, default "UTC")
cg.get_prices(zone, start, end, market="day_ahead", node=None)Electricity prices → price_mwh; optional node for nodal markets
cg.get_load(zone, start, end)Actual total load → load_mw
cg.get_generation(zone, start, end)Generation per fuel type → *_mw columns
cg.get_generation_forecast(zone, start, end)Wind/solar generation forecast → *_forecast_mw
cg.get_load_forecast(zone, start, end)Load forecast → load_forecast_mw
cg.get_physical_flows(zone, start, end)Signed cross-border physical flows in MW
cg.get_commercial_schedule(zone, start, end)Signed commercial exchanges in MW
cg.get_installed_capacity(zone, start, end)Installed power by technology in MW
cg.get_frequency(zone, start, end)System frequency → frequency_hz
cg.get_renewable_share(zone, start, end)Renewable share in percent
cg.get_co2_intensity(zone, start, end)Electricity carbon intensity in gCO2/kWh
cg.get_co2_forecast(zone, start, end)Forecast carbon intensity in gCO2/kWh
cg.get_gas_flows(zone, start, end)Gas physical flows → flow_kwh_d
cg.get_capacity(zone, start, end)Firm technical gas capacity → capacity_kwh_d
cg.get_gas_demand(zone, start, end)Daily gas demand by sector in GWh
cg.get_gas_storage(zone, start, end)Gas inventory, capacity, injection and withdrawal
cg.get_lng_inventory(zone, start, end)LNG tank inventory and terminal send-out
cg.get_weather(zone, start, end)Weather observations / forecasts
cg.status()Print connected providers, zones, capabilities
cg.set_api_key(provider, key)Store a provider key locally
cg.list_providers()List all registered provider names
cg.register_provider(name, instance)Register an external provider

All data functions accept:

  • source="name" — override the router for this call only
  • use_cache=False — bypass the local cache

Built-in providers

NameDataZonesAuth
energychartsprices, load, generation, forecasts, capacity, cross-border flows, frequency, renewable shareEuropean countries and openly licensed price zonesNone
energinetprices, load, generation, forecasts, physical flows, actual/forecast CO2DK1, DK2None
elhubhourly metered consumption and generation by production groupNO1–NO5None
pse15-minute actual and forecast power-system loadPLNone
eirgrid15-minute actual system demandIE, GB-NIRNone
sfoedaily national load forecast with 2.5%/97.5% confidence boundsCHNone
redatafive-minute load/forecast; daily-average generation, shares and physical flows; installed capacityESNone
rteload, generation, load forecasts, physical/commercial exchanges, generation shares and CO2FRNone
fingridload, generation, forecasts, flows, NTC, capacity, frequency, CO2, imbalance and balancingFIFree API key
giedaily underground gas storage and LNG terminal inventoryEurope, countries, facilitiesFree API key
gnidaily gas demand by sectorIENone
eiahourly load, forecast, fuel generation, physical interchange and generation sharesU.S. balancing authorities and regionsFree API key
caisoday-ahead LMP at NP15, SP15, ZP26 or an explicit nodeCalifornia ISONone
nyisoday-ahead zonal LBMP, actual/forecast load, fuel mix and sharesNew York ISO and NYISO load zonesNone
nasapowerdaily/hourly meteorology, precipitation, wind and solar radiationGlobal point locations (lat,lon)None
nwshourly temperature, humidity, wind, cloud and precipitation-probability forecastsU.S., territories and adjacent waters (lat,lon)None
metnotemperature, pressure, humidity, cloud, wind and precipitation forecastsGlobal point locations (lat,lon)None
smardprices, load, generationDE, AT, LU + TSO sub-zonesNone
eliaload, generationBENone
nesoload, embedded generation, actual/forecast CO2, generation sharesGBNone
elexonprices, generation mixGBNone
entsoggas flows, capacityAll ENTSOG operatorsNone
entsoeprices, load, generationAll ENTSO-E bidding zonesENTSOE_API_KEY
tennet(data fetching coming soon)NLTENNET_API_KEY

MET Norway uses the official Locationforecast 2.0 compact forecast. Pass a global point as lat,lon and optionally an integer altitude in metres. Coordinates are rounded to the upstream four-decimal limit, results are normalized to UTC, and the SDK supplies the identifying User-Agent required by MET Norway. The endpoint serves current forecasts only; historical model data is not fetched by this provider. Reuse requires MET Norway attribution.

EirGrid uses the official Smart Grid Dashboard JSON feed for 15-minute Republic of Ireland and Northern Ireland system demand. The feed is keyless, timestamps are normalized from the dashboard's UTC values, and reuse requires the attribution Supported by EirGrid Group Data under the EirGrid Group Open Data Licence. SFOE uses the Swiss Federal Office of Energy's versioned Energy Dashboard public API for the SDSC national electricity-consumption forecast. Source values are daily GWh and are exposed as DST-aware daily-average MW in load_forecast_min_mw, load_forecast_mw, and load_forecast_max_mw. Reuse is commercial and non-commercial with mandatory source attribution under the opendata.swiss terms.

Keys for entsoe and tennet are issued by the respective upstream provider. Store them via a clarigrid.energy account or set them manually as described in API key setup.


Architecture

clarigrid/├── __init__.py           # public surface: connect, get_prices, set_timezone, …├── _auth.py              # KeyState machine, auth flows, provider key registry├── _keystore.py          # ~/.config/clarigrid/.env  read/write (chmod 600)├── _browser_flow.py      # browser-based OAuth flow (localhost callback server)├── cli.py                # clarigrid CLI (setup, connect, auth)├── core/│   ├── api.py            # top-level functions — routing + normalisation│   ├── router.py         # ZoneRouter — (zone, capability) → provider│   ├── session.py        # runtime state: router, connected map, output TZ│   ├── normalise.py      # canonical column names + unit normalisation│   ├── registry.py       # register_provider / get_provider│   ├── interface.py      # DataProvider ABC ← providers implement this│   ├── cache.py          # filesystem Parquet cache│   ├── config.py         # legacy key store (~/.clarigrid/keys.toml)│   ├── exceptions.py     # exception hierarchy│   └── types.py          # shared constants, zone aliases├── providers/│   ├── smard.py          # Bundesnetzagentur SMARD (DE)│   ├── energycharts.py   # Fraunhofer ISE Energy-Charts (Europe)│   ├── energinet.py      # Energinet Energi Data Service (DK1/DK2)│   ├── redata.py         # Red Electrica REData (ES)│   ├── rte.py            # RTE Eco2mix (FR)│   ├── elia.py           # Elia Open Data (BE)│   ├── neso.py           # NESO Data Portal (GB)│   ├── elexon.py         # Elexon BMRS (GB)│   ├── eia.py            # EIA-930 balancing-authority operations (US)│   ├── caiso.py          # CAISO OASIS day-ahead prices (US)│   ├── nyiso.py          # NYISO prices, load, forecasts and fuel mix (US)│   ├── nasapower.py      # NASA POWER meteorology and solar data (global)│   ├── nws.py            # NOAA/NWS hourly grid forecasts (US)│   ├── metno.py          # MET Norway global point forecasts│   └── entsog.py         # ENTSOG Transparency Platform (EU gas)└── utils/    ├── time.py           # parse_dt, normalise_index    └── validation.py     # resolve_zone, validate_date_range

Plugin system

External providers subclass DataProvider, declare their zones() and capabilities(), and self-register on import. Providers whose capabilities have different geographical coverage can additionally override capability_zones():

python
from clarigrid.core.interface import DataProviderfrom clarigrid.core.registry import register_providerimport pandas as pd
class NordpoolProvider(DataProvider):    def zones(self) -> set[str]:        return {"NO1", "NO2", "SE1", "SE2", "DK1", "DK2", "FI"}
    def capabilities(self) -> set[str]:        return {"prices"}
    def get_prices(self, zone, start, end, **kwargs) -> pd.DataFrame: ...
register_provider("nordpool", NordpoolProvider())

After cg.connect("nordpool"), calls to cg.get_prices("NO1", …) route to this provider automatically.


Development

bash
git clone https://github.com/clarigrid/clarigridcd clarigridpip install -e ".[dev]"pytestruff check .mypy clarigrid

License

Apache 2.0 — see LICENSE.

Copyright (c) 2026 Alexander Hoogsteyn.

来源:README.md,提交 8b35102

工具

0
该服务器需要登录,因此 SourceWeft 无法在没有账号的情况下读取其工具,也未收录。已连接账号所能看到的内容可能因账号及其权限而异。

版本历史

1
  1. v0.2.0最新Sep 16, 2026

评分

已满足适用检查项的 75%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。