Local MCP server that compresses agent context payloads before they enter the model — with honest BPE counts and safety rollback.
TokenDiet is a local MCP server that compresses file reads, command output, search hits, and fetched web pages before they enter the agent context. It uses deterministic transforms (outline, log dedup, snippet caps) and a safety verifier that rolls back when compression would drop protected content or fail to shrink the payload. Token counts use a real BPE encoder (o200kbase by default), not character guesses. Dogfood benchmarks include real M7 agent sessions; internal sprint docs are not published.
This only helps when the agent gets data through TokenDiet tools. If built-in Read or Bash already loaded the full text into context, calling compress afterward cannot undo that cost.
Outline mode returns signatures plus critical comments (SECURITY, TODO, …) when detected. verified: true means structure verified — check warnings and omitted.bodies before editing code. Use expand(ref) or mode=full for audits.
Requires Node.js 20+ and build tools for better-sqlite3 (native addon).
Wire Cursor (example — adjust paths after clone):
Reload MCP servers in Cursor. Point agents at read, run, search, fetch, expand, and stats instead of raw Read/Grep/Bash for large payloads.
Tool Role ------------ read Compressed file read; outline / signatures / symbol for code run Shell command with compressed stdout/stderr search Ripgrep with JS fallback; compressed snippets fetch HTTP fetch with HTML/JSON/text compression expand Full content from a prior ref stats Session and all-time token accounting
From the project README.
Add the radar badge to your README — it shows your project was picked up by MCP Radar and links to this page:
[](https://mcp.liqiwa.com/s/DukeDeSouth--tokendiet-mcp.html)
ChatGPT thinks. Codex works. Use ChatGPT as the planning brain while keeping the Codex harness.
shinthink/blitzstrike⚡ Blitz Strike — a universal MCP penetration-testing toolbelt. Structured methodology: reconnaissance & attack-surface mapping, source-to-sink analysis, and live validation. 57 escalation chains, 130-
0xwilliamortiz/openclaude-improvedruns anywhere. uses anything
halofyai/halofyHalofy is the open access and governance layer for AI agents across your organization. Identity, policy, provenance, audit, and signed erasure.
CaptureGrubEnchant/SolidWorksSolidWorks MCP Server connects an AI assistant to a running SolidWorks instance. Sketch, extrude, fillet, export STEP/STL, generate macros.
arielshad/3d-asset-server3d assets api and mcp
The top new MCP servers of the week, every Monday. No spam, unsubscribe anytime.