CacheSurgeon v0.3.2: open-source proxy adds MCP rug-pull protection and prompt-cache fixes
Fickle-Connection851 · reddit · 2026-12-04
Developer released v0.3.2 of CacheSurgeon, an MIT-licensed local proxy (Python/FastAPI, 2ms overhead) that sits in front of OpenAI, Anthropic, or Ollama to fix common MCP pain points:
- Rug-pull protection: pins each MCP tool by SHA-256 and quarantines mid-session tool-description mutations while allowing benign edits
- Prompt-cache preservation: canonically sorts tool arrays/JSON keys, moves shifting timestamps out of the cached prefix, and adds Anthropic cachecontrol breakpoints so the MCP schema tax doesn't wreck caching
- Secret exfiltration defense: scrubs .env keys, PEMs, JWTs, and DB URLs before they leave the machine and restores them on return over SSE streams; now decodes Unicode-escaped tool args that could previously slip past checks
- Destructive-call blocking: intercepts rm -rf, DROP TABLE, force pushes, and runaway retry loops before execution
This release also decouples provenance guard mode from the tool firewall and fixes a Windows SQLite WAL race. Installable via pip install cachesurgeon, with a local web UI for simulating the guards without an API key.
More from coding & agent
- One prompt into Claude ships a full landing page, courtesy of MotionSites — prasenx · 2026-12-04
- AI doesn't eliminate technical debt — it amplifies it at every stage — craigmullins · 2026-12-04
- Alibaba Cloud API caught prompt-injecting AI agents via CLI error responses — evilsocket · 2026-12-04
- treehouse: 2k-star open-source tool manages git worktrees for parallel AI agents — MikkoH · 2026-12-04
- One wrong model pick burned a 5-hour OpenCode Go quota in 8 minutes — here's the Auto routing fix — SimplyAnnisa · 2026-12-04
- Biggest AI lever for engineers isn't clever prompts, it's describing end states — gabriel1 · 2026-12-04