Token Meter

by whdrnr2583-cmd

Not rated
GitHub

About

Local-first dashboard and MCP server for Claude Code and Codex token usage tracking.

Details

Author
whdrnr2583-cmd
Categories
Developer Tools, Other, Infrastructure

Setup

Install Token Meter in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/whdrnr2583-cmd/token-meter

Follow the installation instructions in the repository README, then restart your MCP client.

Connect Token Meter to your AI tool (MCP)

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, preserves other MCP servers. Single-client variants:install-mcp claude-code | cursor | claude-desktop. Add--dry-runto preview.

Or have your LLM do it.Open Claude Code / Cursor / Claude Desktop and ask:"Read](https://github.com/whdrnr2583-cmd/token-meter/blob/HEAD/docs/audit.md)https://raw.githubusercontent.com/whdrnr2583-cmd/token-meter/main/docs/mcp-server.mdand set up token-meter as my MCP server."

Manual one-liners (if you'd rather not run our installer):

Then ask:"Use token-meter to show my recent sessions"or"Use token-meter usage_summary for this week".

Claude Code shortcut:runnpx -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.

- USD-equivalent costper day, model, project. Useful if you're on a Max plan and want to know what the API would have cost.
- MCP and tool breakdown: which MCP server is eating tokens, how slow each tool is on average, response sizes per call.
- Hourly distributionof output tokens.
- Claude Code + Codex side-by-side, in one view.

Costs areestimatescomputed 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 arenotvalidated against your actual Anthropic / OpenAI invoice and may diverge for several reasons:

- Vendors change pricing; the table insrc/pricing.tsis a snapshot
- Subscription plans (Pro / Max) bill a flat fee — the on-screen $ is what the API would have cost, not what you pay
- Some token categories (server-side tool use, cache write variants) are approximated

Treat the numbers asrelative signalfor 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.

- Your JSONL contains source code, prompts, and tool results. Token Meter never uploads any of it. Heuristics, regex, and SQL aggregation only.
- No SDK to integrate, no proxy to configure for the free tier.
- The CLI and dashboard core areMIT licensed.

Pro+ ships once Pro sign-ups + community demand confirm the segment.

- M1✅ Claude Code parsing, MCP/tool breakdown, hourly stats
- M2✅ Codex integration
- M3Pro tier ($5), Polar.sh billing, license activation
- M4+Pro+ (local LLM proxy, GPU tracking), conditional on demand

- Tokens are counted from the JSONL files Claude Code and Codex already write. Token Meter does not touch network APIs of either vendor.
- No prompt or response bodies are stored by default — only metadata (timestamps, token counts, tool names, response lengths).
- The database lives under~/.tokenpulse/; delete it to wipe. (Renamed to~/.tokenmeter/in a future release with an automatic migration.)

SeeCHANGELOG.mdfor 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.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Integrates with PostHog for feature flag management and error tracking.

Analyze your MCP setup: measure token cost per tool, find bloated schemas, detect duplicates, and get optimization tips to reclaim your context window.

Load and cost budgeting for MCP tool calls.

MCP server that predicts your monthly LLM spend from local Claude Code / Cursor / Codex logs. Forecasts end-of-month $, ranks spike drivers, warns before budget breach. Free tier + paid tier ($19/mo), MIT licensed.

Prompt analytics MCP server: score prompts, search history, detect leaked credentials, and scan AI coding sessions.

MCP server that lets AI agents analyze Claude Code session cost & context attribution — token usage, cached re-reads, and cache writes. Local, read-only.

Enable AI Agents to fix build failures from CircleCI.

Provides access to OpenTelemetry traces and metrics through Logfire.

Interact with your crash reporting and real using monitoring data on your Raygun account

Skene is a codebase analysis toolkit for product-led growth. It scan your codebase, detect growth opportunities, and generate actionable implementation plans.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.