Cost trackers normally work by proxying your traffic, which means your prompts transit someone else's server and your tooling breaks when theirs does. This counts tokens locally instead, and tells you which tool call is the expensive one while you can still do something about it.
A local-first MCP server for cost awareness in agent workflows. Token counts are computed offline with js-tiktoken and stored in local SQLite; no traffic is proxied through a vendor.
- The running cost of the current session
- A per-tool breakdown, so you can see which calls are consuming the budget
- Routing suggestions towards cheaper models for the current task type — advisory, never enforced without opting in
- Pricing across Claude, OpenAI and Gemini models from one configurable table
- Budget alerts at 80% and 100% of a session threshold you set
- Spend history by day, week and month, broken out by model or by tool
- Sessions tagged to named projects, with chargeback reports
- A self-contained single-file HTML spend report with charts and budget status
- An append-only audit log of every budget enforcement decision
Node — the package is `mcp-cost-tracker-router` on npm. Everything is local: js-tiktoken does the counting, SQLite does the storage, and there is no proxy in the path, so no uptime but your own to depend on.
One command — npx -y mcp-cost-tracker-router@latest
