Local MCP tracker for transparent token and credit usage
codex-usage-tracker, by Douglas Monsky, is a local Model Context Protocol (MCP) server and dashboard that exposes how AI-assisted coding sessions consume resources. The tool records token, time, and credit usage for prompts and completions and converts transient session metadata into stable, queryable records. It ships with a dashboard, a CLI surface, and an MCP interface. The target audience is developers and AI researchers who use MCP tools and require precise visibility into agent resource use.
What tasks can you actually use it for?
The tool maps AI interactions into analyzable records so teams can investigate how agents and assistants use context during development sessions. It captures per-turn token consumption and thread history, supports manual inspection through an Evidence Console, and exposes usage facts to other agents via a six-tool MCP surface. Users can run queries to identify repeated high-usage threads and produce evidence-based reports for code-review or audit workflows.
How accurate and actionable is its reporting?
Real-time token tracking for prompts and completions feeds a local SQLite kernel that preserves session metadata and indexes it for queries. The tracker performs automated credit accounting tied to OpenAI model credits, and it surfaces usage-waste diagnostics that flag inefficient token patterns or low-cache calls. Those stable records support programmatic analysis, making the reporting suitable for both human inspection and automated agent-driven audits.
Does it require technical knowledge to get useful results?
Installing and running the tracker requires a Python 3.10+ environment and an MCP-compatible host such as the Codex CLI, ChatGPT Desktop, or supported IDE extensions, and it is typically installed via pip or pipx. The developer-first, agent-oriented design means it integrates into developer workflows but expects familiarity with MCP plugins and Python tooling. The tool keeps all session data on the local machine, avoiding external cloud storage for tracked records.
Best for MCP-native developers who need disciplined usage visibility
codex-usage-tracker is a practical option for developers and researchers who need investigable records of agent behavior and resource consumption. It presumes an MCP-capable environment and developer-level setup skills, so teams without those workflows see limited benefit. Practical tip: schedule periodic, focused queries or agent-driven audits to surface recurring inefficiencies and guide prompt or agent adjustments.





