Labsco
MCP SERVER

Token Meter

by whdrnr2583-cmd

See what your Claude Code and Codex sessions cost, by project, model and MCP tool — all on your own machine.

Model Routing, Multi-Model Consultation & Cost Control
Summary
The per-tool breakdown is where the surprise usually is.

session_tools answers which MCP server ate the tokens in a session, which is the number that actually changes a decision. The figures are estimates read from your local files, so treat them as a guide to where spend goes rather than as an invoice reconciliation.

What it is

A local tool that parses the JSONL session files Claude Code and Codex already write, stores them in a local SQLite database, and answers cost and usage questions from it. It runs as a CLI, a local dashboard and an MCP server.

What you get
  • usage_summary — a daily table of token counts, cost and call counts, broken down by day and model
  • recent_sessions — the latest sessions, each with a paste-ready resume command
  • session_tools — the per-tool breakdown inside one session: calls, total tokens, average latency, response size
  • refresh_data — rescan the local logs for new activity and return a fresh summary
  • An audit pass over your history for expensive sessions, oversized tool responses, slow tools, repeated calls and cache waste, ranked by cost and confidence
  • A local dashboard, and one command that registers the server with every supported client on your machine
  • All four tools read-only, with nothing leaving the machine
Requirements

Npx and the package @whdrnr2583/token-meter, run over stdio. Nothing to authenticate. It reads the session logs Claude Code and Codex already keep, so it needs those files present locally.

Setup effort

One command — npx -y @whdrnr2583/token-meter install-mcp all