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)
runs anywhere. uses anything
pueschel88/Tradingview-MCPTradingview MCP server for controlling Tradingview Desktop from Claude Code via Chrome DevTools Protocol
0xsline/OpenChatCutLocal-first conversational AI video editor with a professional multi-track timeline, Agent Skills, MCP integration, and Remotion-powered rendering.
EndymionLee/PilotBrowseMCPA browser runtime that lets AI agents control your real Chrome browser via MCP. Agents can explore websites, generate operation manuals, and reuse them to save tokens. AI操控你的真实浏览器。
herry2059/project-os-for-codexOpen-source control plane for Codex projects: Git-backed context, visible agent progress, scoped MCP access, resumable work, and safe handoffs.
JesusRS1/stock-trade-finance-apiStock Trade MCP server in Tiingo with stock prices, news, forex, and fundamentals programmatically via the MCP
The top new MCP servers of the week, every Monday. No spam, unsubscribe anytime.