Skip to main content
Glama
evanwang810

thirsty-tokens

by evanwang810

thirsty-tokens

How much data-center water has your Claude Code habit evaporated? This reads your own local transcripts (~/.claude/projects) and estimates it, with real-world comparisons. Nothing leaves your machine.

Four ways to use it: a CLI, a live desktop widget, an MCP server, and a browser calculator (no install).

Install

git clone https://github.com/evanwang810/thirsty-tokens
cd thirsty-tokens
pip install -e .

Needs Python 3.10+. The only dependency is the MCP SDK (for the server); the CLI and widget are stdlib-only.

Related MCP server: Circulara Observe MCP Plugin

CLI

thirsty --open          # summary + HTML report, opened in the browser
thirsty --since 7       # last week only
thirsty --no-report     # just the terminal summary

Knobs for the skeptical: --throughput, --water-intensity, --gpu-watts.

Live desktop widget

A little always-on-top pill that re-reads your transcripts every few seconds and watches the water climb as you work. Drag it anywhere; right-click for the menu.

thirsty-app            # full pywebview dashboard
thirsty-app --widget   # start as the floating pywebview widget
thirsty-widget         # widget-first shortcut

MCP server

Built on the official MCP SDK. Wire it into Claude Code:

claude mcp add thirsty --scope user -- python -m thirsty.server

Restart Claude Code, then claude mcp list should show thirsty ... Connected.

Tools: water_summary, water_widget (returns a compact HTML widget as an embedded resource), water_breakdown (by model and project). Resources: thirsty://report, thirsty://widget. There's also a /water-usage slash command that runs the CLI and summarizes it.

Website

docs/index.html is a self-contained calculator hosted on GitHub Pages. Type in a token count, get the water. It links back here for the auto-tracking tools.

The model

Water = electricity x water intensity.

  • Electricity: a B200 (~1 kW) x1.8 node overhead x1.2 PUE, serving ~1,500 output-equivalent tokens per GPU-second. Lands near 0.4 Wh per 1,000 tokens.

  • Water intensity: 3.0 L/kWh (on-site cooling ~1.8 + off-site power ~1.2).

  • Token weighting: output counts full, prefill x0.2, cache reads x0.02.

Order-of-magnitude only, likely off by 3 to 5x either way. It depends on model size, batch depth, data-center location, and grid mix. Treat it as a gut-check, not a bill.

MIT licensed.

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Estimates the environmental footprint of your AI use — energy (kWh), miles driven, water used for cooling, and CO₂ — plus a prompt-efficiency score, working with any AI client by measuring token usage.
    9
    -
  • A
    license
    B
    quality
    C
    maintenance
    Lets a coding agent inspect its own run efficiency mid-session from local Claude Code transcripts, exposing the share of paid tokens that became model output versus context re-reading. Ships two stdio tools — one returning the shares as structured data and one returning the full cost-weighted report — with no network calls.
    2
    28 PyPI
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    Enables users to ask directly within a Claude Code or Codex chat how much energy and CO2eq their current session or entire project has consumed, estimated locally from session logs with no telemetry or network calls. It also reports everyday-activity equivalents such as kettle boils or washing machine cycles for the resulting figures.
    2
    MIT