Green MCP server
io.github.rlawogh1005/green-mcp·v0.1.2Measure a program's CPU energy and LLM tokens, then refactor it cheaper. Measure, never estimate.
0 stars21 downloads/wk
Reviews
Write oneNobody has reviewed Green yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Green tools (6, 1 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
compare_energyMeasure two commands and report which consumes less energy and by what margin.
compare_tokensMeasure two programs' token use and report which uses fewer, by how much. Only meaningful if both produce acceptable equivalent results — verify that separately (fewer tokens with worse answers is not a win).
energy_backend_infoReport whether energy measurement is available on this host and which backend would be used. Call this before measure_energy to know if the energy axis works here — on a machine with no reachable CPU power sensor it returns energy_available: false, and you should rely on the token axis (or say energy can't be measured) rather than estimate.
measure_energyMeasure the electrical energy (joules) a shell command consumes while running.
measure_tokensMeasure how many LLM tokens a program consumes when it runs (works on any machine — no special hardware). The program must read `base_url_env` for its LLM endpoint (most SDKs do); we point that at a non-blocking counting proxy forwarding to `upstream`, run the program, and report real provider `usage` (input/output/total tokens, call count). For a non-Anthropic target, pass its provider's base-url
verify_equivalencewrite actionRun two commands and compare stdout + exit code. The gate before any energy/token comparison.
Public scan report
scanner v0.1.9 · 2026-09-24 · same rubric, same numbers if you re-run it
- Code scan25 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 29 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Green compares
Against every graded AI and agents MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 92/100
- higher than 90% of 4,460 AI and agents servers
- Tools
- 6
- the typical AI and agents server has 6
- Tools that change things
- 17%
- typical: 0%. Fewer write tools means less an agent can break
- Downloads a week
- 21
- more than 7% of 1,538 AI and agents servers with a package
What its tools let an agent do: 5 read · 1 change
Install Green in Claude Code, Cursor or VS Code
claude mcp add green-mcp -- uvx green-mcp
What the publisher says
From the Green repository's README, as published. We do not edit it. Read it on GitHub
Green Agent
<!-- mcp-name: io.github.rlawogh1005/green-mcp -->
A pluggable MCP server that measures two efficiency axes of a program and refactors it to be cheaper while preserving behavior:
(AMD uProf / Linux RAPL / macOS powermetrics), chosen automatically for the host.
- CPU energy — joules the code actually consumes, from real hardware telemetry
measured provider-neutrally and non-blockingly.
- LLM tokens — the token usage of a program that calls LLMs (input/output/cache/reasoning),
Defining principle: measure, never estimate. Every claim is a measurement with the command, the number, and its run-to-run uncertainty — or it's labeled an estimate. The comparison verdict is a real statistical test (Welch's t with the idle-baseline uncertainty folded in), not a heuristic.
Quick start
pipx install green-mcp # provides the `green-mcp` command (stdlib + mcp only)Mount it in your IDE (configs in deploy/):
Then ask your agent to measure or compare energy/tokens of a command. See deploy/README.md for the full mount + harness guide.
Tools
measureenergy · compareenergy · measuretokens · comparetokens · verifyequivalence · energybackend_info
Requirements (what each part needs to actually work)
No server to host. green-mcp is not a web service — your IDE launches it as a local stdio subprocess. There's no cloud, no account, and no LLM key needed for the measurement server itself.
Energy axis — needs a power-sensor backend on the host (the largest prerequisite):
some distros.
- Windows + AMD → install AMD uProf separately (driver-based; admin to install). Not bundled.
- Linux → reads /sys/class/powercap (RAPL); no extra install, but energy_uj is root-only on
energyavailable: false and refuse to estimate. Energy generally does NOT work in Docker/CI** — containers and VMs have no power-sensor passthrough. Use the token axis there.
- macOS → uses the built-in powermetrics, which requires root / passwordless sudo.
- No reachable sensor (a VM, a container, a locked-down machine) → energy tools report
- The measured command runs locally (arbitrary commands → use in a trusted environment only).
Token axis — no special hardware, works anywhere, but:
OPENAIBASEURL, …) so we can route it through the counting proxy. A hardcoded endpoint won't be measured (reports 0 calls).
- The target program must read its LLM endpoint from an env var (ANTHROPICBASEURL,
target's API key is billed as usual, and network access to the provider is required.
- Measuring runs the target's real LLM calls — the proxy forwards to the real provider, so the
Bundled agent (optional) — pip install green-mcp[agent] adds the Claude Agent SDK and needs Anthropic credentials. The MCP server alone needs none.
Honest scope
written and unit-tested but unverified on metal, and no backend is yet cross-validated against a wall power meter. The token measurer is validated against a live provider (NVIDIA NIM, OpenAI-compatible: 5 real calls, streaming and non-streaming, matching the provider's own usage records exactly) — but the Anthropic-shaped usage path and rate-limit behavior are still only exercised against a local fake upstream. These gaps are tracked, not hidden.
- Energy is CPU package energy (+DRAM on RAPL) — not carbon, not whole-system.
- Numbers from different backends are not comparable.
- Only the AMD/uProf backend is validated for repeatability on real hardware; Linux/macOS are
Development
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Green: common questions
- Is Green MCP server safe?
- Yes, by our scan: it is graded A (92/100). Read the Green safety report
- How do I install Green?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Green need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Green maintained?
- The last commit was 70 days ago (2026-08-26). The latest release is v0.1.2.
- What can I use instead of Green?
- Servers from other publishers that do the same job: Commonly MCP server, mcptoon MCP server and llmtrim MCP server.
- How does Green compare with other AI and agents MCP servers?
- safety score 92/100 (higher than 90% of 4,460 AI and agents servers); tools 6 (the typical AI and agents server has 6); tools that change things 17% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to Green
Same job from other publishers: the closest match first, then the best rated.
- CommonlyRead Commonly pods and post as a Commonly agent you create, with a token from your Commonly account.not reviewedEstablishedA
- mcptoonMCP tools + agent skills in one zero-dependency CLI: 71,929 -> 581 tokens (-99.2%, measured).not reviewedEstablishedA
- llmtrimMCP server and proxy that compresses LLM prompts, tool output, and replies to cut token cost.not reviewedEstablishedA
- Agent LspOrchestrates language servers into 65 code-intelligence tools across 32 languages, token-optimized.not reviewedEstablishedA