Skip to main content
Glama

Eco Router MCP

An MCP server that helps AI agents pick the lowest-carbon cloud region for a workload.

The same GPU job can emit several times more CO₂ depending on which grid powers the datacenter. Eco Router maps AWS, Google Cloud and Azure regions to the electricity grids they draw from, so an agent can ask:

"Where should I run this training job? Data must stay in the EU and latency should be under 150 ms."

and get back a ranked shortlist with the reasoning behind it.

Carbon figures are location-based grid averages. They describe the grid that supplies each region, not the renewable energy a provider buys, so regions in the same grid get the same value. See what the numbers represent.

Status: early release (v0.1). Corrections and feedback are welcome in issues. See Roadmap.

Install

Requires Node.js 22 or later.

Claude Code

claude mcp add eco-router -- npx -y eco-router-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "eco-router": {
      "command": "npx",
      "args": ["-y", "eco-router-mcp"],
      "env": { "ELECTRICITY_MAPS_API_TOKEN": "optional" }
    }
  }
}

Live grid data (optional)

Out of the box, Eco Router uses annual averages (per grid in the US, per province in Canada, per country elsewhere), so it works with no setup. For hourly, grid-level data, set ELECTRICITY_MAPS_API_TOKEN to your own Electricity Maps API token. Zones your plan does not cover fall back to the annual average automatically.

Your use of live data is governed by your own Electricity Maps plan and its terms. At the time of writing, Electricity Maps offers free access for academic and personal non-commercial use, and a 14-day trial for commercial evaluation. Commercial use requires a paid license. Eco Router does not provide or share any token.

Related MCP server: Tidegap

Tools

Tool

What it does

rank_regions

Ranks regions by grid carbon intensity, optionally balanced against estimated latency from an origin. Supports providers, countries, maxLatencyMs, maxCarbonIntensity, carbonWeight, energyKwh and limit.

find_clean_window

For flexible batch jobs, finds the start time in the next 72 hours with the lowest forecast carbon intensity in each grid zone, and the savings compared with starting now. Requires ELECTRICITY_MAPS_API_TOKEN with forecast access.

list_regions

Lists cloud regions and the grid zone each one draws power from. Filter by provider (aws, gcp, azure) or country.

countries accepts ISO 3166-1 alpha-2 codes and the groups EU and EEA.

Example request to rank_regions:

{
  "countries": ["EU"],
  "origin": { "lat": 50.11, "lon": 8.68 },
  "maxLatencyMs": 40,
  "energyKwh": 500
}

Example request to find_clean_window for a 6-hour job that must finish within two days:

{
  "countries": ["DE", "FR", "SE"],
  "durationHours": 6,
  "withinHours": 48,
  "energyKwh": 500,
  "timezone": "Australia/Brisbane"
}

Scoring, data sources and their limits are explained in docs/methodology.md.

How regions are mapped to grids, and which mappings rest on assumptions, is documented in docs/regions.md.

Roadmap

  • MCP server skeleton over stdio

  • Full AWS, Google Cloud and Azure region dataset with sources

  • Carbon data: published annual averages by default, live data with an optional Electricity Maps API token

  • rank_regions: rank regions by carbon intensity and estimated latency, with hard limits such as allowed countries or a carbon ceiling

  • US grid-level annual data without a token (EPA eGRID)

  • Canadian provincial annual data without a token (National Inventory Report)

  • Grid-level annual data for Australia

  • Time shifting: suggest when to run, using carbon forecasts

  • Publish to npm and the MCP Registry

Development

npm install
npm test           # unit tests, no network needed
npm run typecheck
npm run build      # compiles to dist/
npm run dev        # runs the server over stdio from source
npm run update:baseline  # refreshes national averages from Ember
npm run update:egrid     # refreshes US grid averages from EPA eGRID
npm run update:canada    # refreshes Canadian provincial averages

Data sources

Contributing

Corrections to region data are especially welcome. See CONTRIBUTING.md to get started.

Credits

Eco Router started as a hackathon project. Thanks to the original team for the scoring design this project builds on: Chris (@chrislee021225), Joli (@L-Joli), Bob (@Loic0927), Irene Tsai (@YunTong09) and Steven Su (@stevensu04).

License

MIT

Available Tools

3 tools
find_clean_windowFind the cleanest time to run a jobA
Read-only

For flexible batch jobs, find when in the next hours (up to 72) each candidate region's grid is forecast to be cleanest, and how much that saves compared with starting now. Local times default to this computer's time zone. Needs ELECTRICITY_MAPS_API_TOKEN with forecast access. Limit candidates with regions, providers or countries (at most 15 grid zones per call).

Inputs: durationHours (required), limit, regions, timezone, +4 more. Returns: notes, results, timezone, generatedAt, +6 more

list_regionsList cloud regionsA
Read-onlyIdempotent

List the cloud regions Eco Router knows about, with the electricity grid zone each one draws power from.

Inputs: country, provider. Returns: count, regions

rank_regionsRank cloud regions by carbonA
Read-only

Rank AWS, Google Cloud and Azure regions for a workload by the carbon intensity of their electricity grid, optionally balanced against estimated latency from an origin. Supports hard limits for allowed countries, maximum latency and maximum carbon intensity. Read notes before relying on close scores.

Inputs: limit, origin, countries, energyKwh, +4 more. Returns: notes, results, excluded, evaluated, +2 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a distinct purpose: listing known regions, ranking regions for a workload, and finding optimal start times for batch jobs. There is no overlap in what they return or when an agent would choose one over another.

    Naming Consistency5/5

    All three tool names follow a consistent verb_noun pattern: list_regions, rank_regions, find_clean_window. The verbs clearly indicate the action and the nouns indicate the object.

    Tool Count4/5

    Three tools is on the low end, but the server has a focused purpose: carbon-aware region selection. Each tool covers a distinct stage of that workflow, so the count feels appropriate rather than thin.

    Completeness4/5

    The tool surface covers the core workflow: discover regions, rank them for a workload, and find clean windows for flexible jobs. A minor gap is the lack of a tool to fetch detailed grid data for a single region, but agents can work around it with list_regions and rank_regions.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides real-time US power grid intelligence and carbon intensity data to enable carbon-aware AI compute scheduling across major grid regions. It allows users to monitor energy generation and optimize workloads based on renewable energy availability and grid load forecasts.
      2
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Carbon-aware MCP scheduler that defers "do it later" / "by tomorrow" / "overnight" LLM tasks to the cleanest electricity-grid hour inside a deadline — 40-70% lower CO2 per task, 50% cheaper via Anthropic/OpenAI Batch APIs. 9 MCP tools, per-task carbon receipts to local SQLite, Apache-2.0.
      6
      12
      3
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      Provides real-time electricity grid data including CO2 intensity, power mix, and wholesale prices, plus optimal green time windows for energy-intensive AI tasks. Supports UK, Germany, and global regions with optional API keys.
      9
      MIT
    • A
      license
      Not graded
      quality
      F
      maintenance
      Enables querying of real-time and forecast UK carbon intensity data from National Grid ESO, allowing AI agents to retrieve carbon emissions by region and time.
      7 npm
      MIT