scanLABSCO SUMMARY
A cost regression caught in review, not on the invoice.
The static analysis states its own limits plainly: a model loaded from a database or remote config cannot be resolved, so that call site is priced against the configured per-SDK default and marked as such. Token counts use a characters-over-four heuristic unless tiktoken is installed, and monthly figures assume a uniform call volume you set.
What it is
A CI gate for LLM cost. It statically reads Python, JavaScript and TypeScript for LLM API calls, prices them, compares two refs and posts a verdict on the pull request. The MCP server puts the same two checks inside an agent conversation.
What you get
- Costs estimated across a path — scan
- Two refs compared, with the per-call-site delta — diff
- Both returning JSON
- Call sites detected in Python for OpenAI, Anthropic, Google GenAI, LiteLLM, LangChain and Zhipu, and in JS and TS for the OpenAI and Anthropic SDKs, the Vercel AI SDK and LangChain.js
- Model names resolved through variable assignments, environment-variable fallbacks, function defaults, class attributes, dict and object literals and provider wrappers
- Pricing bundled and working offline — 300+ models plus 2200+ entries from LiteLLM's combined catalog, refreshed on demand
- Policy rules that decide a verdict: total monthly delta, per-call-site monthly cost, relative per-call increase, and unpriced models
Requirements
pip install tokentoll[mcp], then claude mcp add --transport stdio tokentoll -- tokentoll-mcp. Python 3.10 or newer. Policy lives in .tokentoll.yml at the repository root and is discovered automatically. No API keys and no telemetry — everything runs inside your own environment.
Setup effort
One command — pip install tokentoll[mcp]
USE CASES
Checking a change before you open the PR
Compare your branch against main and read the per-call-site delta, so a model swap does not surprise anyone in review.
Finding what an existing codebase costs
Scan a path and get every detected LLM call site with its estimated monthly cost, across Python and JavaScript together.
Setting a line the team cannot cross
Budgets for total delta, per-call-site cost and relative increase are separate rules — leave one unset to switch it off.
Catching a model you did not mean to use
Blocking unpriced or unresolved models turns a silent fallback into a failed check rather than a mystery bill.
2 tools
Listed in project docs. Your client may show a different list.
diffBEFORE YOU INSTALL
What to know first
Tools you get
2 tools named in the project's documentation.
Requires
pip on PATH
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
pip install tokentoll[mcp]MCP Clients
Claude Code
claude mcp add --transport stdio tokentoll -- tokentoll-mcp