
TokenTrace
Track how much your AI CLI and agent sessions cost in tokens, locally, so solo runs do not surprise your budget.
Overview
TokenTrace is an MCP server for the Operate phase that provides local-first usage analytics for AI CLI and agent workflows.
What is this MCP server?
- Local-first analytics for AI CLI usage—data stays on your machine
- MCP server (npx tokentrace mcp) for agents to query usage context
- Built for agent and CLI workflows, not generic cloud billing dashboards
- npm stdio transport compatible with standard MCP configs
- Version 0.19.2 with optional runtimeHint npx
- Server version 0.19.2
- Transport: stdio via npm tokentrace
- Runtime hint: npx
What problem does it solve?
Solo builders cannot easily see cumulative token burn across local AI CLI sessions until the invoice or rate limits hit.
Who is it for?
Indie devs optimizing personal AI spend who want local privacy and MCP integration rather than another cloud dashboard.
Skip if: Enterprises needing centralized billing, RBAC, and multi-seat cost allocation across dozens of engineers.
What do I get? / Deliverables
After install, you get on-machine usage insight and MCP-queryable analytics your agent can reference while you iterate.
- Local usage analytics store for AI CLI activity
- MCP-accessible metrics for agent-assisted reviews of spend
- Privacy-preserving alternative to cloud-only usage dashboards
Recommended MCP Servers
Journey fit
TokenTrace belongs in Operate because it is about observing real usage and spend after you are already shipping with AI CLIs daily. Monitoring is the right subphase for usage analytics, cost visibility, and ongoing telemetry—not feature building.
How it compares
Local MCP usage monitor, not a full observability platform like Datadog or official OpenAI org billing APIs alone.
Common Questions / FAQ
Who is TokenTrace for?
Solo builders and indie operators who rely on AI CLIs and coding agents and want local visibility into token usage patterns.
When should I use TokenTrace?
Use it in Operate when you are running agents daily and need to monitor spend, compare habits, or cut waste without exporting logs to the cloud.
How do I add TokenTrace to my agent?
Configure MCP stdio with npx and package tokentrace, passing the mcp positional argument per server.json, then reload your agent.