Cachebro
File cache with diff tracking for AI coding agents. Drop-in MCP server that cuts token usage by 26%.
What is Cachebro?
Cachebro is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to file cache with diff tracking for ai coding agents. drop-in mcp server that cuts token usage by 26%.
File cache with diff tracking for AI coding agents. Drop-in MCP server that cuts token usage by 26%.
This server falls under the Coding Agents and Developer Tools categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- File cache with diff tracking for AI coding agents. Drop-in
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx cachebroConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Cachebro
Cachebro is a drop-in MCP server for AI coding agents that caches file reads and returns diffs on subsequent reads, reducing token usage by roughly 26% for typical coding sessions. Instead of sending the full content of a file every time the agent reads it, Cachebro returns 'unchanged' or a compact unified diff when only part of the file changed — dramatically cutting the tokens consumed in long editing sessions. It requires zero changes to your existing workflow: just add it to your MCP client config and it transparently intercepts file read calls.
Prerequisites
- Node.js 18 or newer with npx available
- Claude Code, Cursor, or another MCP-capable AI coding client
- A project directory where the agent will be reading and editing files
Initialize Cachebro in your project
Run the init command in your project root. It auto-detects Claude Code, Cursor, and OpenCode and writes the MCP configuration for you.
npx cachebro initOr add Cachebro manually to your MCP config
If you prefer manual setup or use a different client, add Cachebro to your claude_desktop_config.json or .claude.json directly.
{
"mcpServers": {
"cachebro": {
"command": "npx",
"args": ["cachebro", "serve"],
"env": {
"CACHEBRO_DIR": ".cachebro"
}
}
}
}Verify the server starts correctly
Start the Cachebro server manually to confirm it runs without errors before connecting through the MCP client.
npx cachebro serveRestart your AI coding client
Restart Claude Code or Cursor so it picks up the Cachebro MCP server. Subsequent file reads made by the agent will go through Cachebro's cache layer automatically.
Check token savings
After a coding session, check the cache statistics to see how many tokens were saved.
npx cachebro statusCachebro Examples
Client configuration
Manual claude_desktop_config.json entry for Cachebro, using the default .cachebro directory for the cache database.
{
"mcpServers": {
"cachebro": {
"command": "npx",
"args": ["cachebro", "serve"],
"env": {
"CACHEBRO_DIR": ".cachebro"
}
}
}
}Prompts to try
Cachebro works transparently — instruct the agent to use its read_file tool instead of the built-in file reading. These prompts help demonstrate the token savings.
- "Read src/auth.ts using cachebro and tell me what the login function does"
- "Read these five files and summarize the architecture: src/index.ts, src/routes.ts, src/models/user.ts, src/middleware/auth.ts, src/utils/db.ts"
- "Show me the current cachebro cache status and how many tokens we've saved"
- "Clear the cachebro cache so all files are re-read fresh"
- "Read src/auth.ts again — has it changed since you last read it?"Troubleshooting Cachebro
npx cachebro init does not write the config for my client
The init command auto-detects Claude Code (.claude.json), Cursor (.cursor/mcp.json), and OpenCode. For other clients, add Cachebro manually to your client's MCP configuration file using the JSON shown in the setup step above.
Cache shows 'unchanged' for a file that was actually modified
Cachebro detects changes by comparing file content at read time. If the file was modified outside the current session (e.g., by a build tool), run 'npx cachebro status' and then 'npx cachebro clear' to reset the cache and force a fresh full read on the next access.
CACHEBRO_DIR causes a permission error
The .cachebro directory is created in the current working directory when Cachebro starts. Ensure the MCP server's working directory is set to your project root and that the process has write access to that directory.
Frequently Asked Questions about Cachebro
What is Cachebro?
Cachebro is a Model Context Protocol (MCP) server that file cache with diff tracking for ai coding agents. drop-in mcp server that cuts token usage by 26%. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Cachebro?
Follow the installation instructions on the Cachebro GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Cachebro?
Cachebro works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Cachebro free to use?
Yes, Cachebro is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Cachebro Alternatives — Similar Coding Agents Servers
Looking for alternatives to Cachebro? Here are other popular coding agents servers you can use with Claude, Cursor, and VS Code.
Dify
★ 142.2kProduction-ready platform for agentic workflow development.
Ruflo
★ 54.0k🌊 The leading agent orchestration platform for Claude. Deploy intelligent multi-agent swarms, coordinate autonomous workflows, and build conversational AI systems. Features enterprise-grade architecture, self-learning swarm intelligence, RAG integrat
Goose
★ 45.7kan open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Antigravity Awesome Skills
★ 38.3kInstallable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.
AgentScope
★ 25.5kBuild and run agents you can see, understand and trust.
Serena
★ 24.5kA coding agent toolkit that provides IDE-like semantic code retrieval and editing tools, enabling LLMs to efficiently navigate and modify codebases using symbol-level operations instead of basic file reading and string replacements.
Browse More Coding Agents MCP Servers
Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Cachebro in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Cachebro?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.