kvdiff (MIT): a 63kB local proxy that catches MCP tool-reordering cache busts and auto-heals them live
BringinItDirty · reddit · 2026-11-22
The author open-sourced kvdiff (MIT, 63 kB), a zero-config local proxy for diagnosing MCP-induced prompt cache busts — a single tools[] reorder or schema key change can drop a 94% cache hit rate to 0%, multiplying token spend and burning rate-limit windows.
- 5-second demo: npx @drod915/kvdiff --demo, a seeded 16-turn session with 15 MCP tools showing Turn 14's reorder wasting -$0.38 at $.tools[9].name byte 1,670, and Turn 15 recovering to 97% under --heal
- Wrap agents directly: -- claude or -- codex, strict zero-mutation passthrough preserving headers, unbuffered SSE
- Opt-in --heal: deterministically sorts tools[] and schema keys without touching messages/input/content/enum
- Supports llama-server/vLLM; also flags VOLATILESYSTEM, TOOLMUTATED, PREFIXTOOSHORT, TTLEXPIRED and MODELCHANGED
Node >= 24, built-in node:sqlite, binds to 127.0.0.1 only, zero telemetry. (Duplicate post about the same kvdiff release.)
Related event: kvdiff: Open-Source Tool Fixes MCP Prompt Cache Invalidation(2 posts)→
More from coding & agent
- Replit open-sources Amuse, a self-hosted personal AI agent with approval gates — amasad · 2026-11-22
- OpenComputer: open-source Devin alternative hits 1.1k GitHub stars in days — Promptmethus · 2026-11-22
- RAEA engine lets AI agents create videos, 3D scenes and games with React — Promptmethus · 2026-11-22
- Sentry CEO: keep design docs in the repo — agents need the intent — zeeg · 2026-11-22
- Antigravity team digests 500+ user feedback items; cross-workspace permission friction flagged — dotey · 2026-11-22
- kvdiff (MIT): a 63kB local proxy that byte-pinpoints MCP-induced prompt cache busts and auto-heals them — BringinItDirty · 2026-11-22