CodeBurn
A CLI and MCP server that tally token spend across 41 tools and agents, break it down by project and model, and help cut wasted tokens
Medium risk
We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.
Why this level
- Reads on-disk agent session files, which can contain conversation content
- optimize --apply modifies configuration files, though with a backup
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/codeburnDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
Install the tool
npm install -g codeburnRun npx codeburn for a one-off look, or npm install -g codeburn to keep it installed. For access from inside the agent conversation add the MCP server: claude mcp add codeburn -- npx -y codeburn mcp.
Other ways from the author
npx codeburnOne-off run with no install.
This is third-party code. Review the repository files before installing.
What it does
CodeBurn reads the session files that Claude Code, Codex, Cursor and other agents already write to disk and prices them by token and model. The codeburn terminal command shows today's spend plus tables by tool, model, project and task. codeburn optimize looks for sources of wasted tokens, such as a file the agent re-reads on every turn or an MCP server installed months ago and never called, and can apply a fix with an undo path. codeburn guard install adds Claude Code hooks that warn and then stop a session once it passes a spending threshold. A desktop app, a menu bar icon and an MCP server for asking from inside the agent conversation are also included.
Who it is for. For developers and teams paying for several coding agent subscriptions who want to see where the tokens actually go.
Good fit when
- You want to know how much an agent's work cost for a day, project or task
- You want to find a file, MCP server or setting that wastes tokens on every run
- You want a spend cap on a Claude Code session right from the terminal
Not a fit when
- You use only one tool that already gives you a detailed cost breakdown
- There is no access to on-disk session files, for example everything runs in an isolated container that keeps no history
Example request
Run codeburn optimize and show me where this project is wasting tokensLimitations
All figures come from local session files the agents already write, so tools outside that list produce no data. Guard currently covers only Claude Code. The CLI and MCP server make no network calls, but the desktop app and web mode need a separate install.
How to disable. Remove the package: npm uninstall -g codeburn or brew uninstall codeburn. Guard hooks come out with codeburn guard uninstall, and the MCP server is removed with claude mcp remove codeburn.
Security check
- Reads on-disk agent session files, which can contain conversation content
- optimize --apply modifies configuration files, though with a backup
README in short
The README frames CodeBurn as a way to see where the AI coding bill actually goes: it reads the session files of 41 supported tools and prints a breakdown by tool, model, project and task in the terminal, the desktop app, the menu bar or the browser. It separately covers optimize for finding wasted-token sources, guard for spend caps in Claude Code, and an MCP server for asking from inside the agent conversation. Install options are npx, npm, brew or separate macOS, Windows and Linux builds. MIT licensed.
FAQ
Do I need an account or a key?
No, there is no sign-up, CodeBurn reads session files that already exist on disk and sends nothing anywhere.
What does codeburn optimize --apply do?
It applies the found configuration fixes after backing up the affected files, and codeburn act undo --last reverts the change.
Related
A self-hosted knowledge base with block-level references and a built-in MCP server for connecting AI agents to your notes
A CLI for every Google Workspace API with JSON output and agent skills: Drive, Gmail, Calendar, Sheets and more
Local search over Markdown notes, docs and meeting transcripts: keywords, semantic search and reranking, with an MCP server
A task manager for AI-driven development: breaks a PRD into dependent tasks and guides the agent through them via MCP or CLI