Eco Router

Registre officiel Cloud et DevOps

Rank AWS, Google Cloud and Azure regions by grid carbon intensity and latency.

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

NPM package eco-router-mcp
Claude Code
claude mcp add eco-router -e 'ELECTRICITY_MAPS_API_TOKEN=<your electricity_maps_api_token>' -- npx -y eco-router-mcp@0.1.1
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "eco-router": {
            "command": "npx",
            "args": [
                "-y",
                "eco-router-mcp@0.1.1"
            ],
            "env": {
                "ELECTRICITY_MAPS_API_TOKEN": "<your electricity_maps_api_token>"
            }
        }
    }
}

Variables d'environnement

  • ELECTRICITY_MAPS_API_TOKEN secret Optional Electricity Maps API token for live grid data. Without it, annual averages are used.

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. Eco Router MCP
  2. Install
  3. Tools
  4. Roadmap
  5. Development
  6. Data sources
  7. Contributing
  8. Credits
  9. License

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.

Tools

ToolWhat it does
rank_regionsRanks regions by grid carbon intensity, optionally balanced against estimated latency from an origin. Supports providers, countries, maxLatencyMs, maxCarbonIntensity, carbonWeight, energyKwh and limit.
find_clean_windowFor 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_regionsLists 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

  • [x] MCP server skeleton over stdio
  • [x] Full AWS, Google Cloud and Azure region dataset with sources
  • [x] Carbon data: published annual averages by default, live data with an optional Electricity Maps API token
  • [x] rank_regions: rank regions by carbon intensity and estimated latency, with hard limits such as allowed countries or a carbon ceiling
  • [x] US grid-level annual data without a token (EPA eGRID)
  • [x] Canadian provincial annual data without a token (National Inventory Report)
  • [ ] Grid-level annual data for Australia
  • [x] Time shifting: suggest when to run, using carbon forecasts
  • [x] 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

Questions fréquentes

Qu'est-ce que Eco Router ?

Rank AWS, Google Cloud and Azure regions by grid carbon intensity and latency.

Comment installer Eco Router ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add eco-router -e 'ELECTRICITY_MAPS_API_TOKEN=<your electricity_maps_api_token>' -- npx -y eco-router-mcp@0.1.1. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour Eco Router ?

Oui. Il attend ELECTRICITY_MAPS_API_TOKEN, à renseigner dans sa configuration.

Eco Router est-il open source ?

Oui. Son code est sur GitHub sous licence MIT.

Qui maintient Eco Router ?

Il est publié par stevensu04. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.