Local-first AI CLI usage analytics for agents.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Local-first AI CLI usage analytics for developers and coding agents.
TokenTrace answers one practical question before the next expensive AI CLI run: is your local usage evidence ready to trust? It scans local Claude Code, Codex, structured usage logs, and usage-shaped local databases, then labels token and cost data as exact, estimated, unknown, cached, or non-cache. The dashboard opens on Today, with direct paths into Sessions, Evidence, and Fix Data.
TokenTrace is designed for local development machines first, with macOS-oriented defaults. It does not require a cloud account and does not send telemetry or logs anywhere.

tokentrace preflight --json or MCP get_preflight.Run without installing:
Or install globally:
The command starts the local dashboard, chooses an available localhost port starting at 3030, opens your default browser, and keeps the server running until you press Ctrl+C.
CLI commands:
Agents should start with the read-only discovery manifest:
The alias below returns the same manifest:
The manifest describes TokenTrace's local-first privacy model, safe JSON commands,
common workflows, Claude Code status-line setup, Codex sidecar fallback, and
guardrails such as never running tokentrace reset without explicit human
approval. The discovery command does not scan files, initialize the database, or
start the dashboard.
Package-level agent references are included for agents that inspect repository or npm package contents before invoking commands:
MCP-capable clients can start the local stdio server after installing or using the npm package:
Registry name: io.github.abhiyoheswaran1/tokentrace.
First MCP call for agents: get_agent_guide.
Self-test the local MCP entrypoint without scanning files:
The MCP server exposes the same local-first surfaces as tools: capabilities,
preflight, status, Scan Health, evidence, repair queue, reports, and an
explicit scan tool. It does not scan files on startup, and its scan tool requires
confirmLocalScan=true before reading local usage files or writing the local
database.
Before starting another long coding-agent run, use preflight:
In MCP clients, call get_preflight for the same proceed, caution, or blocked
decision with local scan freshness, confidence, guardrail, anomaly, and repair
findings. Preflight does not scan files or inspect raw prompts.
When the local dashboard is already running, agents can fetch the same manifest over localhost:
The Local Sources & Trust release handoff is also machine-readable:
Open http://localhost:3000.
Useful source commands:
TokenTrace now organizes the product around the daily loop:
Trust surfaces include:
TokenTrace labels the trust level behind imported numbers:
The dashboard surfaces a Data Confidence score on Today, Projects, Sessions, and Session Timeline pages. Scan Health also includes a supply-chain IOC check so package trust is visible in the product, not only in release scripts.
Public releases require maintainer approval. See docs/RELEASE_CHECKLIST.md before bumping versions, tagging, creating GitHub releases, or publishing npm.
In local development, the SQLite database defaults to .tokentrace/tokentrace.db. Override it with:
When installed from npm, TokenTrace stores runtime data outside the package folder:
~/Library/Application Support/TokenTrace/~/.local/share/tokentrace/%APPDATA%/TokenTrace/The CLI sets TOKENTRACE_DB and DATABASE_URL automatically. You can override the base directory with:
Factual signals from GitHub, npm, and our automated checks β not a rating.
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/tokentrace)<a href="https://allmcps.com/mcp/tokentrace"><img src="https://allmcps.com/api/badge/tokentrace?style=directory" alt="TokenTrace on AllMCPs" /></a>