tokenstat
tokenstat

Help center

CLI and MCP

The terminal half. Which command answers which question, how to put a live figure in your shell prompt or a cap on a day's spend, and how to hand the whole archive to an agent over MCP so it can look up its own numbers instead of guessing.

3 guides in CLI and MCP.

Which tokenstat command shows what
One archive, a dozen views over it. Which command answers which question, the four filters that work on all of them, and why every report can be piped as JSON.
Set a budget and put usage in your prompt
Two commands built for glancing rather than reading: a soft list-rate cap you can check at any time, and a single line you can hang off your shell prompt without slowing it down.
Let an agent look up its own spend
tokenstat ships an MCP server over stdio. Register it once and a coding agent can read its own token usage instead of guessing, file work on the todo board, and drive automations and workflows.

Human-led and verified · AI-assisted content · AI tools may help draft, edit, maintain, and improve grammar or clarity. Nothing is published automatically; every change is reviewed by the human maintainer.