Lazy MCP Proxy
Cut MCP schema costs up to 90 %. The client sees 2 tools instead of 50+; upstream starts on the first call_tool and sleeps when idle.
Save up to 60 % of your token bill
Teams waste roughly 40 % of their token budget on noise: unused MCP schemas, off-topic chat history, abandoned projects. tokenguard finds those leaks and removes them in one command.
scan → mcp lazy → chats compact → budget. No account, no network calls, MIT.
Cut MCP schema costs up to 90 %
Find where to split and save
500 msgs → 1 digest + last 8
Daily limits, CI gate on overrun
Why teams install it
Dry-run by default. Nothing changes until you pass --apply, and a backup is written first.
Cut MCP schema costs up to 90 %. The client sees 2 tools instead of 50+; upstream starts on the first call_tool and sleeps when idle.
Pinpoints the message where the conversation drifted and estimates the tokens you get back by starting a fresh chat. Fully offline, no LLM.
Compress 500+ messages into one structured digest — requests, files, commands, key topics — and keep the last 8 verbatim. Clean context in a new chat.
See spend by day, session, tool and model. Set a daily cap and let CI fail the build on overrun. USD estimates via pricing.json.
Find dead and unfinished repositories by git metrics, then archive them with git bundle + tar + manifest. Restore with a single clone.
Catch broken links, conflicting versions and ports, duplicated paragraphs, stale "as of" dates. Stale docs stop burning context.
Compatibility
Chats, rename, MCP configs and lazy proxies for every major harness.
| Harness | Chats | Rename | MCP config | Lazy |
|---|---|---|---|---|
| DeepSeek Harness | Full | Native | YAML profiles | Proxy + --apply |
| Claude Code | Read | — | ~/.claude.json | Proxy |
| OpenAI Codex CLI | Best effort | — | config.toml | Proxy |
| Gemini CLI | — | — | settings.json | Proxy |
| Cursor | — | — | ~/.cursor/mcp.json | Proxy |
| VS Code / Copilot | — | — | .vscode/mcp.json | Proxy |
| Claude Desktop | — | — | claude_desktop_config.json | Proxy |
Get started
Node.js ≥ 20 or a prebuilt binary. No account, no network calls, MIT licensed.
# global install npm install -g tokenguard tokenguard version tokenguard 0.3.4 # first look at the environment tokenguard scan
# isolated run docker run --rm \ -v ~/.tokenguard:/data \ -v ~/.dsh:/dsh \ tokenguard/tokenguard:latest scan DeepSeek Harness yes 12 15.9 MB
# prebuilt binary (Linux x64) curl -fsSL https://github.com/tokenguard/tokenguard/releases/latest/download/tokenguard-linux-x64.tar.gz | tar xz sudo mv tokenguard /usr/local/bin/ tokenguard version tokenguard 0.3.4
# from source git clone https://github.com/tokenguard/tokenguard.git cd tokenguard && npm install npm link tokenguard scan
FAQ
Start saving tokens today
Run tokenguard scan — it reports where your tokens go before changing anything.
Free and MIT. Pro (team dashboards, SSO, MCP gateway) is on the roadmap — the CLI stays open source.