prompt-caching
An open-source MCP plugin that automatically places prompt cache breakpoints for Claude API calls, reducing token costs by up to 90% on repeated turns.
At a Glance
Pricing
Fully open-source MIT-licensed plugin with all features included at no cost.
Engagement
Available On
Alternatives
Developer
Listed Mar 2026
About prompt-caching
prompt-caching is an open-source MCP plugin built for Claude Code and any MCP-compatible client that automatically detects stable content — system prompts, tool definitions, and file reads — and inserts Anthropic cache_control breakpoints so you pay 0.1× instead of 1× on repeated turns. It requires zero configuration and starts saving on the very next turn after install. The plugin ships four intelligent session modes and provides observability tools like get_cache_stats and analyze_cacheability that Claude Code's built-in caching does not expose.
- BugFix Mode — Detects stack traces in your messages, caches the buggy file and error context once, so every follow-up only pays for the new question.
- Refactor Mode — Detects refactor keywords and file lists, caches the before-pattern, style guides, and type definitions, sending only per-file instructions fresh.
- File Tracking — Tracks read counts per file; on the second read it injects a cache breakpoint so all future reads cost 0.1× instead of 1×. Always on across all modes.
- Conversation Freeze — After N turns, freezes all messages before turn (N−3) as a cached prefix so only the last 3 turns are sent fresh, compounding savings over long sessions.
- Zero-config install for Claude Code — Run two
/plugincommands inside Claude Code — no npm, no config file, no restart required. - npm install path for other clients — Install globally via
npm install -g prompt-caching-mcpand add a single JSON stanza to your MCP client config (Cursor, Windsurf, Zed, Continue.dev, etc.). - Cache observability —
get_cache_statsreports hit rate and cumulative token savings;analyze_cacheabilitydry-runs a prompt to show exactly where breakpoints land. - Broad model support — Works with Claude Opus 4/4.1/4.5/4.6, Sonnet 3.7/4/4.5/4.6, Haiku 3/3.5/4.5, with cache lifetimes of 5 minutes (ephemeral) or 1 hour.
- MIT licensed — Fully open source with zero vendor lock-in; contributions welcome via the public GitHub repository.
Community Discussions
Be the first to start a conversation about prompt-caching
Share your experience with prompt-caching, ask questions, or help others learn from your insights.
Pricing
Open Source
Fully open-source MIT-licensed plugin with all features included at no cost.
- Automatic cache breakpoint placement
- BugFix Mode
- Refactor Mode
- File Tracking
- Conversation Freeze
Capabilities
Key Features
- Automatic cache breakpoint placement
- BugFix Mode
- Refactor Mode
- File Tracking
- Conversation Freeze
- get_cache_stats tool
- analyze_cacheability dry-run tool
- Zero configuration required
- Claude Code plugin marketplace support
- npm global install for MCP clients
- 90% average token cost reduction
- MIT open source license
