Agent♥︎Age
Catalog

io.github.rlawogh1005/green-mcp

Official

by rlawogh1005 · Python

Measure a program's CPU energy and LLM tokens, then refactor it cheaper. Measure, never estimate.

green-mcp (io.github.rlawogh1005/green-mcp)

This MCP server measures two efficiency axes of a program—CPU energy and LLM token usage—using real telemetry and provider-neutral measurement. It then refactors the program to be cheaper while preserving behavior, based on the measured results rather than estimates.

🛠️ Key Features

  • Measures CPU energy in joules using real hardware telemetry
  • Uses AMD uProf, Linux RAPL, or macOS powermetrics, selected automatically for the host
  • Measures LLM tokens for input/output/cache/reasoning
  • Measures token usage provider-neutrally and non-blockingly
  • Refactors code to reduce cost while preserving behavior
  • Principle stated as “measure, never estimate”

🚀 Use Cases

  • Identify CPU energy consumed by executing code on actual hardware
  • Capture LLM token usage for programs that call LLMs
  • Refactor applications to lower operational cost with behavior preserved

⚡ Developer Benefits

  • Telemetry-backed CPU energy measurements (not estimates)
  • Provider-neutral, non-blocking token measurement (input/output/cache/reasoning)
  • Measurement-driven refactoring to reduce cost
io.github.rlawogh1005/green-mcp - agentage MCP Catalog