Ratebook MCP server
io.github.cbetz/ratebook·v0.1.0·1 starsOpen MCP server for US electricity tariffs: real rate lookup, bill estimates, and when to charge.
1 stars
Reviews
Write oneNobody has reviewed Ratebook yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Ratebook tools (4, 1 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
best_charge_windowwrite actionFind the cheapest contiguous time block to charge (e.g. an EV) on a tariff.
compare_plansPrice several tariffs over the same usage and rank them cheapest-first.
estimate_billEstimate the bill for a tariff (by `label`) over a billing window.
lookup_tariffFind electricity tariffs by utility name, EIA id, or exact URDB label.
Public scan report
scanner v0.1.9 · 2026-09-26 · same rubric, same numbers if you re-run it
- Code scan5 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 87 days ago12/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Ratebook compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 88/100
- higher than 75% of 48,255 servers
- Tools
- 4
- the typical server has 7
- Tools that change things
- 25%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 1
- more than 65% of 28,688 servers
What its tools let an agent do: 3 read · 1 change
Install Ratebook in Claude Code, Cursor or VS Code
claude mcp add ratebook -- uvx ratebook-mcp
What the publisher says
From the Ratebook repository's README, as published. We do not edit it. Read it on GitHub
Ratebook
The open rate engine for the electrified home — an openly licensed database of US electricity tariffs, an open-source rate-calculation engine, and an MCP server, so any app, device, or agent can answer "what will this kWh cost me, and when should I charge?"
↑ The real engine running in the browser. Try it yourself: demo/demo.html.
Status: pre-release. What works today: a deterministic rate engine (Python + a TypeScript
port held to it byte-for-byte), cross-validated against NREL's PySAM and shown to reproduce a
real bill's total once its components are supplied; an LLM pipeline that extracts tariff
structure from utility PDFs; an MCP server; and a Home Assistant integration. What's still in progress: broad utility coverage, freshness automation,
and a reproducible public accuracy scorecard. See docs/ROADMAP.md.
Quickstart
The engine has no I/O and no required data download — price a tariff in a few lines:
git clone https://github.com/cbetz/ratebook && cd ratebook
uv sync
uv run python quickstart.py # or paste the snippet below into `uv run python`from datetime import date
from decimal import Decimal
from ratebook import (
Tariff, TariffIdentity, Sector, EnergyRateStructure, EnergyPeriod, EnergyTier,
Schedule, FixedCharge, FixedChargeUnit, Usage, BillingWindow, estimate_bill,
)
# A flat residential tariff: $0.10276/kWh + $11.30/month (PECO Rate R distribution).
no_tou = tuple(tuple(0 for _ in range(24)) for _ in range(12)) # 12 months × 24 hours, one period
tariff = Tariff(
energy=EnergyRateStructure(periods=(EnergyPeriod(tiers=(EnergyTier(rate=Decimal("0.10276")),)),)),
schedule=Schedule(weekday=no_tou, weekend=no_tou),
identity=TariffIdentity(plan_code="R", plan_name="Example flat residential", sector=Sector.RESIDENTIAL),
fixed_charges=(FixedCharge(Decimal("11.30"), FixedChargeUnit.PER_MONTH),),
)
bill = estimate_bill(tariff, Usage.aggregate(1244), BillingWindow(date(2026, 4, 28), 30))
print(f"ok={bill.ok} total=${bill.total}") # ok=True total=$139.13344 → 1244 kWh × $0.10276 + $11.30Real tariffs round-trip through JSON via Tariff.fromjson(...). To work with corpus data, load the URDB seed set (uv run ratebook-data urdb) or run the MCP server (uv run ratebook-mcp) and ask an agent lookuptariff / estimatebill / compareplans / bestchargewindow.
Development
Python 3.12+, uv workspace with these packages: packages/ratebook (rate engine), packages/ratebook-data (data plant), packages/ratebook-mcp (MCP server), packages/ratebook-ts (the TypeScript engine port — pnpm + vitest, held to the Python engine via shared JSON test vectors), and packages/ratebook-homeassistant (a Home Assistant custom integration: electricity-price + cheapest-charge-window sensors).
uv sync # install all workspace packages + dev tools
uv run pytest # Python tests
uv run ruff check . # lint
uv run ratebook-data urdb # download URDB bulk CSV → data/raw/, load into data/ratebook.duckdb
uv run ratebook-mcp # run the MCP server (stdio)
pnpm -C packages/ratebook-ts install && pnpm -C packages/ratebook-ts test # TS engine + vectorsShortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Ratebook: common questions
- Is Ratebook MCP server safe?
- Yes, by our scan: it is graded A (88/100). Read the Ratebook safety report
- How do I install Ratebook?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Ratebook need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Ratebook maintained?
- The last commit was 125 days ago (2026-07-01). The latest release is v0.1.0.
- How does Ratebook compare with other MCP servers?
- safety score 88/100 (higher than 75% of 48,255 servers); tools 4 (the typical server has 7); tools that change things 25% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.