Local-first dashboard + MCP for Claude Code and Codex token usage with per-MCP breakdown.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Track Claude Code, Codex & Cursor token usage and cost locally β no account, no cloud.
One local dashboard for your Claude Code and Codex token usage. Free, MCP-aware, MIT-licensed core.
npm:
@whdrnr2583/token-meterΒ· GitHub:whdrnr2583-cmd/token-meterΒ· Site: token-meter.dev
Token Meter parses the JSONL files that Claude Code and Codex already write to disk and turns them into a real dashboard: cost per project, per model, per MCP tool, per hour. Your data never leaves your machine.
Scans your ingested Claude Code + Codex history for expensive sessions,
oversized tool responses, slow tools, repeated calls, and cache waste, ranked
by cost and confidence. Runs entirely against your local SQLite database β
same local-first, no-cloud processing as the rest of Token Meter. Add
--json for machine-readable output; see docs/audit.md for
the full flag list and JSON schema.
Use Token Meter if you:
claude --resume / codex resume command handyNot a fit if you need billing-grade numbers validated against your Anthropic or OpenAI invoice β Token Meter computes estimates from local JSONL files only.
When Token Meter is wired as an MCP server (install-mcp all), four tools become available to your AI assistant:
| Tool | What it returns |
|---|---|
usage_summary | Daily table of token counts, USD-equivalent cost, and call counts β broken down by day and model |
recent_sessions | Latest sessions with paste-ready claude --resume / codex resume commands |
session_tools | Per-tool breakdown inside a session: call count, total tokens, average latency, response size |
refresh_data | Re-scans your local JSONL logs for new activity, then returns a fresh summary |
All four are read-only. No data leaves your machine.
Copy-paste any of these into Claude Code or Cursor after installing the MCP server:
The package is published under an npm scope (
@whdrnr2583/) because the baretoken-metername collides with an existing similar name on npm. The CLI binary is still calledtoken-meterafter install.
One command registers Token Meter with every supported client on your machine:
Handles Claude Code, Cursor, and Claude Desktop β idempotent, backs up existing
config, preserves other MCP servers. Single-client variants:
install-mcp claude-code | cursor | claude-desktop. Add --dry-run to preview.
Or have your LLM do it. Open Claude Code / Cursor / Claude Desktop and ask: "Read https://raw.githubusercontent.com/whdrnr2583-cmd/token-meter/main/docs/mcp-server.md and set up token-meter as my MCP server."
Manual one-liners (if you'd rather not run our installer):
| Client | Command / config |
|---|---|
| Claude Code | claude mcp add token-meter -- npx -y @whdrnr2583/token-meter mcp then claude mcp list to verify |
| Cursor | Edit ~/.cursor/mcp.json (Windows: %USERPROFILE%\.cursor\mcp.json) β see docs/mcp-server.md |
| Claude Desktop | Edit claude_desktop_config.json β see docs/mcp-server.md |
| ChatGPT | Stdio-only for now; HTTP wrapper recipe in docs/mcp-server.md |
| Other (Continue, Zed, custom) | npx -y @whdrnr2583/token-meter mcp over stdio |
Then ask: "Use token-meter to show my recent sessions" or "Use token-meter usage_summary for this week".
Claude Code shortcut: run
npx -y @whdrnr2583/token-meter install-command claude-codeonce to register the/token-meterslash command. After reopening your session, type/token-meterfor a one-shot summary without natural language.
Full setup + verification + troubleshooting: docs/mcp-server.md.
Storage: ~/.tokenpulse/usage.db (SQLite). Remove the folder to start over.
The folder name will become ~/.tokenmeter/ in a future release with an
automatic migration; until then the v0.1 directory keeps its original name.
Costs are estimates computed locally from the token counts that Claude Code and Codex already write to their JSONL files, multiplied by the model's published per-million-token rate. They are not validated against your actual Anthropic / OpenAI invoice and may diverge for several reasons:
src/pricing.ts is a snapshotTreat the numbers as relative signal for spotting waste, not as billing-grade accounting. Token Meter ships a regression test that the calculation is reproducible, and an audit script that checks invariants; neither verifies the rates against vendor invoices.
| Tier | Price | What you get |
|---|---|---|
| Free | $0 | Claude Code + Codex parsing, MCP/tool breakdown, hourly/model/project breakdown, 7-day history, 1 desktop alert |
| Pro | $5/mo | Everything in Free, reframed as a monthly spend review: 30-day history (this month vs last), per-session/per-message drill-down to the run that blew the budget, cache-efficiency dollars saved, waste signals (oversized tool responses + cache that didn't pay off), plus unlimited smart alerts (desktop + webhook) |
| Pro+ | later | Local LLM proxy (Ollama / LM Studio / llama.cpp / vLLM), GPU/VRAM tracking, auto actions |
Pro is the difference between glancing at last week's number and reviewing where the month's spend leaked. Pro is live β Subscribe at token-meter.dev.
Pro+ ships once Pro sign-ups + community demand confirm the segment.
~/.tokenpulse/; delete it to wipe. (Renamed to
~/.tokenmeter/ in a future release with an automatic migration.)See CHANGELOG.md for release notes and breaking changes.
MIT for the CLI, dashboard, and parsers. Pro-tier features ship in a separate package under a closed source license.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/token-meter)<a href="https://allmcps.com/mcp/token-meter"><img src="https://allmcps.com/api/badge/token-meter?style=directory" alt="Token Meter on AllMCPs" /></a>