usage_summaryLABSCO 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
USE CASES
Finding out what the week cost
Get the daily table with tokens, cost and call counts split by model.
Working out which tool is expensive
Pull the per-tool breakdown for the session in question and compare call counts against tokens and response size.
Getting back into a session you left
List recent sessions and copy the resume command it hands back.
Making sure the numbers are current
Rescan the local logs for activity since the last ingest and read the refreshed summary.
4 tools
Listed in project docs. Your client may show a different list.
recent_sessionssession_toolsrefresh_dataBEFORE YOU INSTALL
What to know first
Tools you get
4 tools named in the project's documentation.
Requires
npx on PATH
INSTALLATION
Connect your client
Server setup
npx -y @whdrnr2583/token-meter install-mcp allMCP Clients
Claude Code
claude mcp add token-meter -- npx -y @whdrnr2583/token-meter mcpCursor, Claude Desktop
{
"mcpServers": {
"token-meter": {
"command": "npx",
"args": [
"-y",
"@whdrnr2583/token-meter",
"mcp"
]
}
}
}Any MCP client
npx -y @whdrnr2583/token-meter mcp