@tokenzero/mcp
A stdio MCP server from TokenZero that lets coding agents find and fix LLM cost waste.
claude mcp add tokenzero -- npx -y @tokenzero/mcp # Claude Code
{ "mcpServers": { "tokenzero": { "command": "npx", "args": ["-y", "@tokenzero/mcp"] } } }
| Tool | Runs | What it does |
|---|---|---|
audit_repo_token_waste | locally | Static audit of a local directory (default: the working directory), a public GitHub repo, or a diff. Nothing from a local directory is uploaded. |
calculate_model_arbitrage | locally | Prices a workload across models at list prices, with and without prompt caching. |
optimize_prompt_payload | TokenZero service | Rewrites a request body so its static prefix is cacheable. Sends the body you pass to the TokenZero service (https://tokenzero.sh unless TOKENZERO_URL is set); do not include secrets. |
workspace_metrics | TokenZero service | Reads a workspace's savings scorecard: hard savings and net ROI per window, each engine's contribution and one-click recommendations. Uses TOKENZERO_KEY unless a key is passed; demo: true returns a labelled sample. |
provision_workspace | TokenZero service | Creates a free workspace and key with no form. The key is returned once. |
Optional environment: TOKENZERO_URL (another gateway for optimize_prompt_payload; default https://tokenzero.sh), GITHUB_TOKEN (raises GitHub rate limits for repo audits).
Audits are static heuristics: estimates at list prices, not measurements. Node >= 18. Single file, no dependencies. Apache-2.0.