Token Meter MCP
A local Splunk dashboard shows tokens and cost for Claude Code, Codex and Cursor sessions, and an MCP server answers questions.
- 147 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Reads local agent session logs and runs a background server with autostart.
- A connected agent may pass the numbers to its model provider.
Install
- Works in
Manual install
git clone https://github.com/splunk/token-meter.git
./token-meter/scripts/installmacOS and Linux install from the Quick Start section. The README has a PowerShell script for Windows.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Reads local agent session logs and runs a background server with autostart.
- A connected agent may pass the numbers to its model provider.
This is third-party code. Review the repository files before installing.
What it does
Token Meter, an open-source Splunk project, reads local agent logs and shows token use, estimated cost, context fill, speed and tool calls at `http://127.0.0.1:8722`. It supports Claude Code and Desktop, Codex, Cursor, OpenCode, Kiro, Pi and Antigravity. A menu-bar icon on macOS and a tray icon on Linux are included. A separate MCP server gives an agent ten read-only tools (`check`, `usage`, `budget`, `sessions`, `trace`, `stats` and others) and two budget setters that require `confirm: true`. Three skills install into `~/.claude/skills` or `~/.codex/skills`: a 30-day usage review, budget pacing and a cleanup of unused skills and MCP servers.
Who it is for. Developers and team leads who work heavily with agents and want to see where tokens and money go without sending data out.
Good fit when
- The agent bill grew and the cause is unclear.
- You want to ask an agent whether spend fits the monthly budget.
- A session context nears its limit and you want advance warning.
- A project has many MCP servers and skills and it is unclear which are ever called.
Not a fit when
- You need an exact subscription invoice rather than an estimate at public prices.
- Sessions are stored on another machine.
- A shared dashboard for the whole team is required.
Example request
Use Token Meter to check whether I am on track for this month's budget and show the five most expensive sessions.MCP
- Transport
- stdio
- Authentication
- not required
Limitations
Cost is estimated at public prices and can differ from a subscription, for Codex in particular. Only locally stored sessions are visible. Windows support is in beta. The dashboard listens on `127.0.0.1`; do not expose it to the network. An agent connected to the MCP may pass the numbers to its model provider. The numbers cache sits in `~/.token-meter/mcp-evidence-cache.json`. Autostart and the background server are set up by the installer, so removal takes separate steps from the User guide. Codex stats use API rates, not subscription pricing. Provider limits and discounts are set manually in settings.
How to disable. Remove autostart as described in the User guide, then drop the MCP entry and the `token-meter-*` skills from `~/.claude/skills`. The `~/.token-meter/` cache can be deleted.
FAQ
Does data leave the machine?
No, traces, prompts and responses stay local. The dashboard runs on the Python standard library with no telemetry or keys.
Which tools does the MCP expose?
Ten read tools: `check`, `usage`, `budget`, `capabilities`, `sessions`, `trace`, `stats`, `git_stats`, `work_stats`, `schema`. Two budget setters work only with `confirm: true`.
Does it work on Windows?
Yes, but the Windows extension is still in beta. Installation uses the PowerShell script from the README.
Which skills are included?
`token-meter-usage-review`, `token-meter-budget-pacing` and `token-meter-skill-hygiene`. They install with the Token Meter skills button in the dashboard.
How does the dashboard update?
Updates install automatically by default. Update and uninstall steps are described in the User guide.
Discussion
No questions or reviews yet.
Related
MCP serversLocal dashboard for tokens, cost and tool calls across Claude Code, Codex, Gemini CLI and many other coding agents.
Local code search for agents: finds the files and fragments that matter and keeps context within a set token budget
agentburn reads local logs of Claude Code, Codex and other agents and shows which windows and tasks consume tokens and money.
An MCP server that builds a code graph once and serves the answer to the agent instead of re-reading files
Claude Token Optimizer: fewer tokens at startup
Claude Token Optimizer
The cto utility counts the tokens Claude Code loads at session start and shrinks CLAUDE.md into a short cheat sheet.
TokenSave is a local code MCP server that runs parsers in worker processes, isolating a grammar failure from the overall update.
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Token Meter (this card) | no | not required | 147 | |
| ccusage | no | 19,425 | a CLI that prints a usage report; Token Meter keeps a dashboard, budgets, an MCP server and skills | |
| Claude Code Usage Monitor | no | 8,801 | watches Claude Code limits in a terminal; Token Meter covers seven agents and adds an MCP server |
README in short
The MCP returns allowlisted structure and numbers, not raw trace content. Setup and skills are described in the User guide and `agent-skills/README.md`.