Give GitHub Actions a token-cost auditor
The TokenZero MCP server lets GitHub Actions audit the project it is working in for LLM token waste, price model alternatives at list prices, make a request body cache-friendly, and provision a workspace key, all in one tool call each.
Setup
- uses: tokenzero-ai/tokenzero/action@v0 # with: # fail-over: 30
Audits each pull request on your runner and keeps one comment current; no account, nothing uploaded.
Tools
audit_repo_token_waste: static audit of a local directory, a public GitHub repo or a diff; runs locally, nothing uploaded.calculate_model_arbitrage: price a workload for the requested model and its cheaper sibling, with and without caching (table 2026-10-26).optimize_prompt_payload: rewrite an OpenAI or Anthropic request so its static prefix is provider-cacheable.provision_workspace: create a workspace and key with no form.
Protocol
Streamable HTTP at https://tokenzero.sh/mcp and stdio via npx -y @tokenzero/mcp. MCP 2026-07-28 (per-request _meta versioning, server/discover, typed results) with the initialize-era handshake still accepted for older clients.
Questions
Does GitHub Actions need a TokenZero account?
No. Audits and arbitrage run locally. optimize_prompt_payload and provision_workspace call the hosted service; the latter creates a free workspace.
Is my code uploaded?
No. The audit reads files locally and reports findings with file and line. Only a hosted audit of a public GitHub repository fetches code, from GitHub.