Independent by design · no pay-to-rank placements  · How we evaluate tools →
Anclum Submit
J

Jwrede/tokentoll

Catch LLM cost changes in code review. Infracost for LLM spend.

Before you install: a copy-paste command is available · license MIT · link reachable

no SECURITY.md
View on GitHub ↗Link checked 2026-11-12 · HTTP 200 · opens the vendor's own site
Install & config
  1. Copy the command above
  2. Paste it as one entry under mcpServers in claude_desktop_config.json — local servers take command + args (example: clients)
  3. Restart your client
Install command from the repository
pip install tokentoll

Parsed from the README we fetched on 2026-10-26; we have not executed it.

This is the install method the repository states, not an MCP client config, so no JSON is generated.
Key names differ by client: Clients & CLI
Star count
4 ★ · Jwrede/tokentoll · read from the GitHub search API · (checked 2026-11-13 20:00:50)
Source
collected from the punkpeye/awesome-mcp-servers list · type: MCP server
Harvest history
first seen 2026-10-23 · last seen 2026-11-14 · seen 26× · listed by 23 sources
Score
score 2,300 · 4 ★ · 23 sources · mcp
Install
pip install tokentoll
FAQ (answers come from our records)
How do I install it?
The repository provides this install command: pip install tokentoll. It comes from the repository itself; we cannot guarantee it runs as-is in your client.
Who is it for?
We filed it under these tags: MCP 服务. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
repository Jwrede/tokentoll;first catalogued 2026-10-23;last seen 2026-11-14。There is no official certification or quality rating here — we record sources and dates only.

# tokentoll

以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →

> Prevent LLM cost regressions before production.
tokentoll is a CI gate for LLM cost. It statically analyzes Python, JavaScript, and TypeScript for LLM API calls, scores every pull request against a policy you control, and posts a PASS/WARN/FAIL verdict directly on the PR. Optionally, it fails the workflow when the policy is violated, so cost regressions cannot be merged.
## Live demo
Jwrede/tokentoll-demo is a small polyglot LLM app (Python + TypeScript) wired up to the tokentoll cost gate. Two PRs are already open against it:
PR #1: Add Anthropic Haiku translation helper. New call site, well within budget. Verdict: PASS, workflow green.
PR #2: switch supportbot to gpt-4o. A model swap that trips two policy rules. Verdict: FAIL, workflow red.
Open each PR's conversation tab to see the verdict comment tokentoll actually posts.
## The verdict comment
When a PR violates your policy, tokentoll comments with a verdict and a blocking-findings list, then exits non-zero so the check fails. Example:
md
## tokentoll verdict: FAIL
Blocking findings (2):
src/agent.py:42 - per-call cost grew 15.0x (threshold 5x)
total monthly delta +$812.00 exceeds budget $250.00
> Required action: revert the regression, raise the threshold in .tokentoll.yml, or add an exemption.
When the PR is clean, the verdict is PASS and the comment shows only the cost delta table. When no policy is configured, tokentoll posts an informational delta comment with no verdict.
## Quick start (60 seconds)
Add .github/workflows/tokentoll.yml:
yaml
name: tokentoll
on:
pullrequest:
paths:
".py"
".ts"
".tsx"
".js"
".jsx"
permissions:
contents: read
pull-requests: write
jobs:
cost-gate:
runs-on: ubuntu-latest
steps:
uses: actions/checkout@v4
with:
fetch-depth: 0
uses: Jwrede/tokentoll@v0.7.0
with:
fail-on-policy-violation: true
Then add .tokentoll.yml to your repo root:
yaml
budgets:
maxmonthlydeltausd: 250
maxcallsitemonthlyusd: 100
maxrelativeincrease: 5.0
policies:
blockunknownmodels: true
failonpolicyviolation: true
Future PRs receive a verdict comment. PRs that exceed the thresholds fail the workflow.
For SHA-pinned installs and minimal-permissions setups, see docs/github-action.md. For the full policy schema, see docs/policy.md. For the security posture, see docs/security.md.
## What it detects
Python
| SDK | Patterns |
| OpenAI | chat.completions.create, responses.create |
| Anthropic | messages.create, messages.stream |
| Google GenAI | models.generatecontent |
| LiteLLM | completion, acompletion |
| LangChain | ChatOpenAI, ChatAnthropic, initchatmodel |
| Zhipu AI | ZhipuAiClient, ZhipuAI (GLM models) |
JavaScript / TypeScript (parsed via tree-sitter, handles .js, .jsx, .ts, .tsx)
| SDK | Patterns |
| OpenAI Node SDK | client.chat.completions.create, client.responses.create, client.embeddings.create |
| Anthropic SDK | client.messages.create, client.messages.stream |
| Vercel AI SDK | generateText, streamText, generateObject, streamObject, embed, embedMany |
| LangChain.js | new ChatOpenAI, new ChatAnthropic, new ChatGoogleGenerativeAI, ... |
| OpenAI-compatible | same shape as OpenAI Node SDK, picked up automatically |
## Policy rules
The policy block in .tokentoll.yml controls when a PR fails:
Listed badge (optional)
Copy this line into the README if you want the listing mark. Optional, and it does not affect being listed.
[![Listed on Anclum](https://anclum.com/badge/listed.svg)](https://anclum.com/en/s/jwrede-tokentoll/)
Source
awesome · https://github.com/Jwrede/tokentoll
Browse by field
MCP servers
Traction
4 ★
Listed by
23 independent sources
added
today
Security policy
no SECURITY.md at the repository root (which does not mean it is unsafe)

More like this

All 6,229 →

Filed under

Every tag opens the full list for that filter. Counts are the live catalogue figures.

Browse all fields →

← Back to index