Local-first dashboard + MCP for Claude Code and Codex token usage. Per-MCP/tool breakdown.
MCPpedia last refreshed this data
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"io-github-whdrnr2583-cmd-token-meter-3": {
"args": [
"-y",
"@whdrnr2583/token-meter"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
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
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@whdrnr2583/token-meter' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked @whdrnr2583/token-meter against OSV.dev.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in ai-ml
Workspace template + MCP server for Claude Code, Codex CLI, Cursor & Windsurf. Multi-agent knowledge engine (ag-refresh / ag-ask) that turns any codebase into a queryable AI assistant.
Dynamic problem-solving through sequential thought chains
Persistent memory using a knowledge graph
Compact, efficient, and extensible long-term memory for LLM agents.
MCP Security Weekly
Get CVE alerts and security updates for io.github.whdrnr2583-cmd/token-meter and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
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.
npx -y @whdrnr2583/token-meter audit
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:
Show me my token usage and cost for the last 7 days.
List my recent sessions so I can pick one to resume.
Show the tool breakdown for my most recent session — which tool used the most tokens?
Refresh token-meter data, then tell me which model cost the most this week.
Which hour of the day am I spending the most tokens on?
npx @whdrnr2583/token-meter ingest # scan ~/.claude/projects + ~/.codex/sessions
npx @whdrnr2583/token-meter stats 30 # CLI summary for last 30 days
npx @whdrnr2583/token-meter serve # http://localhost:8765 dashboard
npx @whdrnr2583/token-meter mcp # run as an MCP server for Claude Code / Cursor
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:
npx -y @whdrnr2583/token-meter install-mcp all
Handles Claude Code, Cursor, and Claude Desktop — idempotent, backs up existing config