Sponsored by Deepsite.site

ebb-ai — carbon-aware MCP scheduler

Created By
Vitalinia month ago
Open-source MCP server that defers non-urgent LLM tasks to the cleanest electricity-grid hour inside a deadline. When the user says "do this later", "by tomorrow", "overnight", "by EOD", "no rush" — the agent auto-routes the task through schedule_task and the MCP picks the cleanest UTC hour inside the window. Real grid-intensity feeds: UK National Grid ESO (key-less), US EIA, ENTSO-E, Electricity Maps. Per-task carbon receipts persisted to local SQLite (~/.ebb-ai/queue.db). Anthropic + OpenAI Batch API routing for 50% cost reduction when the deadline allows. 9 MCP tools: get_grid_forecast, recommend_window, schedule_task, check_queue_status, cancel_task, cancel_all, expedite_task, update_deadline, retry_task. 204 passing tests across TypeScript + Python ports. Apache-2.0. Live demo + 7-region carbon-intensity map: https://www.ebb-ai.com Docs (commands, tools, install matrix): https://www.ebb-ai.com/docs
Overview

ebb-ai

Workload scheduling for the agentic-AI economy. Defer non-urgent LLM tasks to cheap, low-load grid windows. ~50% cheaper inference via Batch APIs, smoother data-center load curves, auditable carbon receipts. MCP-native, ships as an npm package and a one-command Claude Code plugin.

License: Apache-2.0 npm (core) npm (mcp) npm (cli) Tests MCP tools Hosts Website

AI inference is on track to consume 6.7–12% of US grid load by 2028 (DOE projections). A lot of agentic-AI workload is deferrable (overnight summaries, batch analysis, scheduled compliance scans, document processing) but agent code dispatches it synchronously by default. ebb-ai makes the choice automatic: the same code that would have fired a sync LLM call now defers to a cheap, off-peak grid window — and writes an auditable receipt (cost + carbon + provider + duration) for every dispatch.

import { recommendWindow } from "@ebb-ai/core";

const plan = await recommendWindow({
  deadline: "2026-05-14T08:00:00-04:00",
  region: "US-CAL-CISO",
});

// {
//   scheduledFor:                "2026-05-14T05:00:00.000Z",
//   intensityGCo2PerKwh:         60,
//   band:                        "very_clean",
//   estimatedCarbonGCo2:         0.1,
//   estimatedSavingsVsNowPct:    73,
//   batchEligible:               true,
//   reasoning:
//     "cleanest in-deadline window is 05:00 UTC (very clean mix); " +
//     "~73% cleaner than dispatching now; Batch API saves an " +
//     "additional 50% on cost (24h SLA)"
// }

Same call surfaces as an MCP tool to any compatible agent host (Claude Desktop, Claude Code, Cursor, Cline, Continue, Zed, Windsurf, OpenClaw, OpenAI Codex CLI, Pi). The agent asks recommend_window, sees the plan, then commits via schedule_task — or doesn't.

Status: v0.7 · 2026-05-14 · @ebb-ai/{core,mcp,cli} published to npm under the @ebb-ai org. One-command Claude Code plugin via claude plugin install ebb-ai. Four real-data grid feeds: UK National Grid ESO Carbon Intensity API (GB, free no key), US EIA Open Data (CAISO / ERCOT / ISO-NE / PJM, free with key), ENTSO-E Transparency Platform (FR / DE, free with token), and Electricity Maps as universal fallback. Anthropic + OpenAI Batch adapters, durable SQLite queue, Python port at parity, live dashboard, recommend_window planning endpoint, always-on ebb tick CLI with macOS launchd + Linux systemd + pmset/rtcwake wake events, full control surface (cancel_task / expedite_task / update_deadline / retry_task), receipt redaction, file output, retry-with-backoff. 88 + Python tests passing across 4 packages and 2 languages. See QUICKSTART.md.

Live demo

Deploy with Vercel

Or visit the maintainer-hosted dashboard at ebb-ai.com to see live grid-load and carbon-intensity forecasts across the seven regions where the major LLM providers run inference (CAISO, ERCOT, ISO-NE, PJM, Great Britain, France, Germany) and to try the best-window planner without installing anything. Great Britain is powered by the free National Grid ESO Carbon Intensity API (real data, no key required); the other zones use Electricity Maps when a key is configured and a deterministic mock otherwise.


Why

AI inference is becoming a major load on US grid infrastructure. Data-center electricity demand has doubled since 2020 and is projected to keep rising as agentic workloads scale. But the same agent code that triggers this load dispatches it synchronously by default — even when the task is "summarize my inbox overnight" or "rewrite these 5,000 product descriptions by Friday." Three things follow:

  • Cost. Anthropic and OpenAI both offer Batch APIs at a flat 50% discount for tasks that can wait up to 24 hours. Almost no agent code uses them, because the choice has to be made at the call site. ebb-ai makes the choice automatic — and routes deadline-tolerant work through the cheaper path.
  • Grid load. Data-center AI compute is concentrated in a few US regions (PJM Mid-Atlantic / Virginia, ERCOT Texas, CAISO California). Peak-hour AI workloads compete with hospitals, industrial users, and residential customers for capacity that is already constrained — Virginia regulators have flagged data-center load growth as a top-tier reliability concern. Time-shifting deferrable workloads to off-peak windows reduces the peak the grid has to plan for.
  • Carbon, as a measurable side effect. Grid carbon intensity varies 30–60% inside a single day. The same dispatch decision that saves cost and smooths load also emits less CO₂. ebb-ai writes an auditable receipt for every dispatch — useful for ESG reporting, cost-accounting, and upcoming compute-disclosure regulations.

ebb-ai automates the choice for any task that is not "answer me right now."


Components

PackagePurpose
@ebb-ai/coreTypeScript core library (v0.2). defer() API, AnthropicAdapter, OpenAIAdapter, opt-in SQLite-backed durable queue.
@ebb-ai/mcpModel Context Protocol server (v0.2). Drop-in for Claude Desktop, Claude Code, OpenClaw, Cursor.
ebb-ai (Python)Python 3.11+ port. asyncio scheduler, aiosqlite persistence, Anthropic + OpenAI adapters.
apps/webNext.js 15 website at https://www.ebb-ai.com — install picker (13 hosts), live carbon-intensity map, best-window planner, docs.
packages/claude-code-pluginClaude Code plugin tree (8 /ebb-ai:* slash commands + auto-invocation skill + MCP wiring).
packages/openclaw-pluginOpenClaw plugin (@vitalini/ebb-ai on ClawHub). Native OpenClaw tools mirroring the MCP surface.
docs/specUpstream MCP spec proposal for priority, deadline, carbon_budget fields.

Architecture

ebb-ai architecture diagram

The MCP server is a thin stdio process the agent host (Claude Code, Claude Desktop, Cursor, Cline, Zed, OpenClaw) spawns. It enqueues work to a SQLite-backed queue at ~/.ebb-ai/queue.db; an off-process ebb tick daemon (launchd / systemd / cron) reads scheduled rows and dispatches them to the LLM provider at the chosen window. The grid feed is a side-channel — the router picks per-zone between four real-data sources before falling back to mock.

grid feed routing

Quick start

See QUICKSTART.md — four steps, five minutes.

As a Claude Code plugin (one-command install)

claude plugin marketplace add Vitalini/ebb-ai
claude plugin install ebb-ai

That ships three slash commands (/ebb-ai:defer, /ebb-ai:check, /ebb-ai:grid), a carbon-aware-coding skill, and auto-wires the @ebb-ai/mcp MCP server. Full plugin reference: PLUGIN.md.

> /ebb-ai:defer "Summarize today's GitHub notifications" --by 4h
Deferred ✓ 38% cleaner than now, scheduled for 22:15 UTC, est. 0.34 g CO2e

> /ebb-ai:check
2 tasks queued · oldest in 1h · cleanest at 03:00 UTC

Full command surface: /ebb-ai:{defer, plan, check, cancel, expedite, reschedule, retry, grid}. Tasks persist to ~/.ebb-ai/queue.db and survive Claude Code restarts.

As an MCP server (Claude Desktop / Cursor / Cline / Zed)

npm install -g @ebb-ai/mcp     # or run via npx -y @ebb-ai/mcp

Then add to Claude Desktop's MCP config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "ebb-ai": {
      "command": "npx",
      "args": ["-y", "@ebb-ai/mcp"],
      "env": {
        "EBB_ELECTRICITY_MAPS_API_KEY": "optional; falls back to mock data without it. GB is always live via the free UK Carbon Intensity API."
      }
    }
  }
}

The MCP server exposes three tools to the agent:

  • get_grid_forecast(region, hours?) — returns the next N hours of carbon intensity for a grid region (e.g. US-CAL-CISO).
  • schedule_task(prompt, deadline, model?, carbon_budget_g?) — queues a task for execution at the cleanest window inside the deadline.
  • check_queue_status(task_id?) — lists pending tasks and any completed receipts.

As a library

import { defer } from "@ebb-ai/core";

const result = await defer(
  () => anthropic.messages.create({ /* … */ }),
  {
    deadline: "2026-05-13T08:00:00-04:00",
    carbonBudgetG: 5,
    region: "US-CAL-CISO",
  },
);

With a provider adapter and the Batch API (v0.2)

import { Scheduler, AnthropicAdapter } from "@ebb-ai/core";

const scheduler = new Scheduler({ dbPath: "/var/lib/ebb/queue.sqlite" });
const adapter = new AnthropicAdapter();

await scheduler.defer(
  () => adapter.dispatch("claude-sonnet-4-5", "Summarize today's git commits."),
  { deadline: "2026-05-13T08:00:00-04:00", region: "US-CAL-CISO" },
);

// or — submit 100 prompts via Anthropic Message Batches for a 50% discount:
const handle = await adapter.dispatchBatch("claude-sonnet-4-5", prompts);
console.log(handle.batchId);

The SQLite-backed queue is opt-in via dbPath; without it the scheduler runs in-memory as in v0.1. The Anthropic and OpenAI SDKs are peer dependencies — install them only if you use the corresponding adapter.

Python

pip install -e "packages/core-py[anthropic,openai]"
import asyncio
from ebb_ai import defer

asyncio.run(defer(
    lambda: do_work(),
    deadline="2026-05-13T08:00:00-04:00",
    carbon_budget_g=5,
    region="US-CAL-CISO",
))

Dashboard

pnpm --filter @ebb-ai/web dev
# → http://localhost:3000

Pages: live carbon-intensity map (7 regions: CAISO, ERCOT, ISO-NE, PJM, GB, FR, DE), 72-hour forecast charts, best-window planner, queue viewer.

Grid data sources (per zone, falls back to mock on failure):

ZoneSourceAuthNotes
GBUK National Grid ESO Carbon Intensity APINoneReal 48h forecast, always on
US-CAL-CISO, US-TEX-ERCO, US-NE-ISNE, US-MIDA-PJMUS EIA Open DataFree API key (EBB_EIA_API_KEY)Hourly fuel-mix → carbon intensity via IPCC AR5 factors
FR, DE (plus ES, IT, NL opt-in)ENTSO-E Transparency PlatformFree token (EBB_ENTSOE_SECURITY_TOKEN)Realised generation by type → carbon intensity
any zone (universal fallback)Electricity Maps free-tierEBB_ELECTRICITY_MAPS_API_KEYUsed when zone-specific source missing
anything elseDeterministic mock curveNoneUsed when no key set or upstream fails

WattTime marginal-emissions support is on the v0.8 roadmap. Want to add another free public source? Each adapter is a single function in packages/core-ts/src/grid.ts (~80 lines) — open a PR.


Install (development)

# from the repo root
pnpm install        # installs all workspace packages
pnpm build          # builds @ebb-ai/core and @ebb-ai/mcp
pnpm test           # runs vitest across packages

Requirements: Node 20+, pnpm 9+. Python 3.11+ if working on the Python package.


Documentation

  • ROADMAP.md — 24-week execution plan, architecture, roadmap, success metrics.
  • docs/ — design docs, MCP spec proposals (forthcoming).
  • examples/ — OpenClaw demo skill, Claude Code config.

License

Apache License 2.0 — patent grant included.


Contributing

This project is in active early development. Issues and PRs welcome; see the ROADMAP.md roadmap for current scope. Major new features should be discussed in an issue first to avoid duplicate effort.


Built by Vitalii Borovyk.

Server Config

{
  "mcpServers": {
    "ebb-ai": {
      "command": "npx",
      "args": [
        "-y",
        "@ebb-ai/mcp"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
DeepChatYour AI Partner on Desktop
Playwright McpPlaywright MCP server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Serper MCP ServerA Serper MCP Server
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
WindsurfThe new purpose-built IDE to harness magic
Amap Maps高德地图官方 MCP Server
Tavily Mcp
ChatWiseThe second fastest AI chatbot™