Emission Factors

io.github.rozetypv1.1.0更新于 Oct 7, 2026

Keyless US grid carbon + power cost by ZIP: eGRID Scope 2, Scope 1 fuels, site ranking, clean hours

已验证Streamable HTTP可网页运行Location & LifestyleFinanceData & Analytics

概览

AI 生成的概览

让助手按美国邮政编码查询电网碳排放因子、电价、逐小时碳强度、电厂排放和公用事业费率。

功能
提供十一个以邮政编码为键的美国电力数据工具:EPA eGRID 排放因子与发电结构、按给定用电量计算范围二排放、范围一燃料燃烧因子、逐小时电网碳强度、电厂级排放、公用事业费率以及州平均零售电价。还可对候选站点按碳强度和成本排序,并找出运行柔性负荷最清洁的时段。所有工具返回 JSON,数据来自封装 EPA、EIA、OpenEI 和人口普查数据的托管 API。
适用场景
适合碳排放核算与报告工作,例如范围一和范围二估算;也适合比较不同地点的电网碳强度与电价,以及回答负荷转移或需求响应中何时运行最清洁的问题。适合需要权威政府来源因子而非猜测值的助手。
运行要求
使用 emission-factors.com 上的远程 Streamable HTTP 端点;无需 API 密钥、注册或环境变量。也提供本地 stdio 版本,可通过 npx 从 GitHub 运行,需要 Node 18+,自建 API 时可选用 EMISSION_FACTORS_API_BASE 变量。需要网络访问。
安装前请注意
请求为匿名,按 IP 限制每小时 2,000 次,超限返回 HTTP 429 及 retryAfter 提示。查询会把邮政编码、坐标、设施编号和能耗数据发送给第三方服务 emission-factors.com。这些工具只做查询和计算,不写入或删除数据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Emission Factors,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

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

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "emission-factors": {
      "type": "http",
      "url": "https://emission-factors.com/mcp"
    }
  }
}

README

emission-factors MCP server

[License: MIT] [MCP] [No key required]

Give Claude, Cursor, Cline, or any MCP client live access to US electricity data by ZIP code - grid-carbon emission factors, retail rates, hourly grid carbon intensity, power-plant emissions, and utility tariffs.

Backed by emission-factors.com, which wraps EPA eGRID, EIA-861, EIA-930, EPA CAMD, and OpenEI URDB into one ZIP-keyed API.

Free. No API key, no signup. The API is rate-limited per IP (2,000 requests/hour).


What you can ask

Once connected, your agent can answer things like:

  • "My HQ in ZIP 94105 uses 1.2M kWh/year. What's our Scope 2 carbon footprint and annual electricity cost?"
  • "Compare Denver, Austin, and Columbus for a new data center on grid carbon intensity and electricity price."
  • "What hour of the day is cleanest to run a 500 kW batch job in California this week?"
  • "Enrich this list of 40 store ZIP codes with each site's emission factor and carbon-free percentage."
  • "Which are the dirtiest power plants in Texas by CO2 over the last week?"
  • "Rank Ashburn VA, Abilene TX and The Dalles OR for a 10 MW data center on carbon and power cost."
  • "Our plant burns 40,000 therms of gas and 3,000 gallons of diesel a year - what's our Scope 1?"
  • "What's the actual PG&E residential tariff for 94105, not the state average?"

Why use it

  • Scope 2 carbon accounting - GHG Protocol location-based emission factors for all 33,616 US ZIP codes (CDP, CSRD, California SB 253 inputs).
  • Site selection - compare candidate locations on both carbon intensity and electricity cost in one conversation.
  • Time-weighted / demand-response analysis - hourly grid carbon from EIA-930 for load-shifting and post-hoc Scope 2.
  • Plant-level emissions - EPA CAMD hourly data for ~1,300 fossil units, a paywall-free alternative to commercial datasets.
  • Agents and automation - a clean tool surface so an LLM can fetch authoritative government data instead of hallucinating factors.

Quick start

There are two ways to run this. Most people want Option A.

Option A - Remote server (recommended, zero install)

Point your client at the hosted MCP endpoint. Nothing to install, always up to date.

Claude Desktop - edit claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows), then restart Claude:

json
{  "mcpServers": {    "emission-factors": {      "url": "https://emission-factors.com/mcp"    }  }}

Cursor - Settings -> MCP -> Add new MCP server, using the same URL.

Cline / Continue / Zed / other clients - add a remote (Streamable HTTP) MCP server with URL https://emission-factors.com/mcp. No key needed.

Option B - Local stdio server (this package)

Runs the server as a local process that proxies the same public API. Useful for clients that only support stdio transport, or if you want to self-host.

Run straight from GitHub (builds on install, requires Node 18+):

json
{  "mcpServers": {    "emission-factors": {      "command": "npx",      "args": ["-y", "github:rozetyp/emission-factors-mcp"]    }  }}

Or clone and run from source:

bash
git clone https://github.com/rozetyp/emission-factors-mcp.gitcd emission-factors-mcpnpm install        # builds dist/ via the prepare script
json
{  "mcpServers": {    "emission-factors": {      "command": "node",      "args": ["/absolute/path/to/emission-factors-mcp/dist/index.js"]    }  }}

Optional environment variable: EMISSION_FACTORS_API_BASE (defaults to https://emission-factors.com) if you run your own instance of the API.


Tools

Eleven tools, keyed by US ZIP code (or a direct code where noted). The remote server and this stdio build expose the same set.

ToolPurposeKey inputs
lookup_emission_factorEPA eGRID CO2e + full generation mix for a ZIPzip
lookup_by_coordinatesSame, resolved from lat/lon via Census geocoderlat, lon
lookup_batchEmission factors for up to 100 ZIPs at oncezips[]
calculate_emissionsScope 2 CO2e for a ZIP + kWh, location-based and market-based (Green-e residual mix)zip, kwh, renewable_kwh
hourly_intensityHourly grid carbon intensity (EIA-930, ~24h lag)zip or ba, hours
plant_emissionsHourly unit-level plant emissions (EPA CAMD)facility_id or state, days
utility_tariffUtility-specific tariff, not state average (OpenEI URDB)zip, utility, or eiaid
electricity_rateState-average retail rate by sector (EIA-861)zip
compare_sitesRank 2-25 candidate sites on grid carbon, $/kWh and cleanest daily windowzips[], annual_kwh, sector
cleanest_hoursCleanest N-hour window of the day to run a flexible load, in local timezip or ba, duration
calculate_fuel_emissionsScope 1 CO2e for fuels burned on site (EPA GHG Emission Factors Hub)items[]: fuel, quantity, unit

All tools return JSON. See full API docs for exact response shapes.


Data sources

DataSourceNotes
Grid emission factorsEPA eGRID2023 Rev2 (+2024 preliminary)Annual, location-based, 27 subregions
Residual mix (market-based Scope 2)Green-e Residual Mix 2025 (2023 data)Per eGRID subregion
Fuel combustion factors (Scope 1)EPA GHG Emission Factors Hub 202563 fuels, AR5 GWPs
Retail electricity ratesEIA Form 861State-level monthly average by sector
Hourly grid carbon intensityEIA-930Derived from hourly fuel mix, ~24h lag
Plant-level emissionsEPA CAMD~1,300 fossil units >25 MW, ~21 day lag
Utility-specific tariffsOpenEI URDB (NREL)~85% of US utilities
ZIP / lat-lon resolutionUS Census (ZCTA + Geocoder)ZIP -> eGRID subregion mapping

Rate limits and auth

  • No API key, no signup. Every request is anonymous.
  • 2,000 requests/hour per IP. Generous for interactive use; if you hit it you get an HTTP 429 with a retryAfter hint.
  • The external-data endpoints are cached server-side (24h rates, 1h hourly intensity, 7d tariffs, 24h plant emissions), so repeated calls are fast and don't burn upstream quotas.

Also available


Development

bash
npm install        # install deps and build (prepare -> tsc)npm run build      # compile TypeScript to dist/npm run dev        # watch modenpm start          # run the built server over stdio

Quick smoke test with the MCP Inspector:

bash
npx @modelcontextprotocol/inspector node dist/index.js

The server is a thin proxy: each tool maps to one /api/* endpoint on emission-factors.com, validates inputs, and returns the JSON response. There is no local state and no key handling.

License

MIT - see LICENSE. Data belongs to its respective US government sources (EPA, EIA, Census) and NREL/OpenEI; this project and the API are an unofficial wrapper, not affiliated with those agencies.

来源:README.md,提交 649dae3

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v1.1.0最新Oct 7, 2026