Token Meter

Your meter for
Claude Code & Codex.

Local-first dashboard that shows how many tokens and dollars you spent, where they went, and how fast each model and MCP tool actually runs. Your JSONL never leaves your machine.

Free + MIT core, available now. Pro ($5/mo) is live — drop your email for Pro+ & new releases.

npm install -g @whdrnr2583/token-meter
token-meter ingest && token-meter serve

See it in one command

Ask your AI assistant "this week's spend" over MCP, or run the CLI. Same data, zero cloud.

$ token-meter stats 7

 Day   Model              Calls      USD   %day
 ───────────────────────────────────────────────
 Mon   claude-opus-4-7      372   $41.20    99%
       claude-haiku-4-5      45    $0.34     1%
 Tue   claude-opus-4-7      394   $44.10   100%
 Wed   claude-opus-4-7      521   $39.80    99%
       claude-sonnet-4-6    114    $0.41     1%
 ───────────────────────────────────────────────
 Total 7 days             4,257  $312.40   100%

 Heaviest : Read 1.1M · Bash 731k · WebSearch 451k  (resp tokens)
 Slowest  : Agent 123s avg (237x) — your latency sink
 Cache    : 94% reuse — on a flat-fee plan, not billed per token

Why Token Meter

📊 Multi-vendor in one view

Claude Code ~/.claude/projects/ and Codex ~/.codex/sessions/ merged. No SDK, no proxy.

🔍 MCP & tool breakdown

See exactly which MCP server eats your tokens and which tool is slow. Latency, response size, call count.

💵 USD-equivalent cost

Your Max plan is a flat fee — but what would the API have cost? Token Meter shows the saving (or burn). Estimates only — not your actual invoice.

🏠 Local-first, private

SQLite on your own machine. No upload, no cloud account required for the free tier.

⚡ MIT licensed core

The CLI and dashboard are open source. Fork it, audit it, ship it.

🕒 Time-of-day insight

Find your most expensive hours, your slowest periods, and the days that blew up the budget.

🔔 Smart alerts

Threshold rules with desktop and webhook actions. Pipe into Slack, Discord, n8n — your call.

Connect to your AI tool

Token Meter ships an MCP server — once registered, your AI tool can ask "this week's spend", "recent sessions to resume", "why was session X expensive" without you opening the dashboard.

🚀 Easiest: one command

npx -y @whdrnr2583/token-meter install-mcp all

Registers Claude Code + Cursor + Claude Desktop in one go. Idempotent, backs up existing config, preserves your other MCP servers. Add --dry-run to preview.

🤖 Or let your LLM handle it

Open Claude Code / Cursor / Claude Desktop and paste:

Read https://raw.githubusercontent.com/whdrnr2583-cmd/token-meter/main/docs/mcp-server.md and set up Token Meter as my MCP server.

Or set it up by hand

Claude Code

claude mcp add token-meter -- \
  npx -y @whdrnr2583/token-meter mcp

Verify with claude mcp list.

Cursor

Edit ~/.cursor/mcp.json (Windows: %USERPROFILE%\.cursor\mcp.json):

{
  "mcpServers": {
    "token-meter": {
      "command": "npx",
      "args": ["-y", "@whdrnr2583/token-meter", "mcp"]
    }
  }
}

Restart Cursor → Settings → MCP shows green.

Claude Desktop

Edit claude_desktop_config.json with the same JSON as Cursor.

Path: ~/Library/Application Support/Claude/ (mac), %APPDATA%\Claude\ (Windows). Fully quit and reopen.

ChatGPT / Other

ChatGPT requires HTTP — wrap with mcpo (community recipe). Direct stdio works with Continue, Zed, any MCP client:

npx -y @whdrnr2583/token-meter mcp

Full guide with verification + troubleshooting: docs/mcp-server.md

Pricing

Free

$0

  • Claude Code + Codex parsing
  • MCP & tool breakdown
  • Project / model / hour breakdown
  • 7-day history
  • USD-equivalent cost
  • 1 desktop alert rule

Pro+ later

~$24/mo

  • Unlimited history
  • Local LLM proxy (Ollama, LM Studio, llama.cpp, vLLM)
  • GPU / VRAM tracking — millisecond TTFT/ITL
  • Behavior-changing automation (MCP auto-trim, model switching, cloud↔local routing)
  • Model benchmark lab
  • Multi-machine sync (encrypted)
  • PDF reports (auto-emailed)

Substantial engineering — ships when the proxy + per-OS GPU work is scheduled in. Full Pro+ spec →