# Semantic Cache MCP

> Semantic Cache MCP is an open-source MCP server for developer tools. File cache for coding agents that returns tiny re-reads and diffs. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Linux, Windows
- **Repository:** https://github.com/coderdayton/semantic-cache-mcp
- **MCP Registry name:** io.github.CoderDayton/semantic-cache-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

Coding agents re-read the same files before and after every edit, and a normal read resends the whole file each time. This server gives each file a content hash on first read; when the agent passes the hash back, an unchanged file comes back as a short notice, and an edited file comes back as a diff of just the changed lines. The README measures this on a 7,891-token file: 77 tokens for an unchanged re-read and 137 after a one-line edit.

The hash is checked against the bytes on disk on every read, so stale content is not served, and an agent that lost its context after compaction can simply read again without the hash. Files larger than the size limit return an outline of their definitions instead of a blind cut. Search is BM25 keyword ranking, not embeddings, so there is no model download, GPU or API key.

Everything stays local in a SQLite file, served by one background daemon shared by all clients. The only network request is a one-time tokenizer file download, checked against a SHA-256 hash.

## Features

- **Hash-based re-reads:** Unchanged files return a short notice and edited files return a diff against the hash the agent holds.
- **Cache-wide search:** grep, BM25 keyword search and glob run over cached files.
- **Atomic edits:** Edit tools include a dry-run preview and batch edits.
- **Outline for big files:** Files over the size limit return a map of definitions.
- **Local-only storage:** A SQLite cache and one shared daemon; no code is sent anywhere.

## Good for

- Cut token spend when an agent keeps re-opening the same files
- Keep long coding sessions affordable across context compactions
- Preview an edit before writing it with edit_preview
- Batch-read several files within a token budget

## Install

### Claude Code (Terminal)

```sh
claude mcp add semantic-cache-mcp -- uvx semantic-cache-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "semantic-cache-mcp": {
      "command": "uvx",
      "args": [
        "semantic-cache-mcp"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "semantic-cache-mcp": {
      "command": "uvx",
      "args": [
        "semantic-cache-mcp"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "semantic-cache-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "semantic-cache-mcp"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "semantic-cache-mcp": {
      "command": "uvx",
      "args": [
        "semantic-cache-mcp"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "semantic-cache-mcp": {
      "command": "uvx",
      "args": [
        "semantic-cache-mcp"
      ]
    }
  }
}
```

## Tools

- `read`: Reads a file, returning the full text, a short unchanged notice, or a diff depending on the hash passed back.
- `batch_read`: Reads several files under a token budget.
- `read_image`: Reads an image file.
- `write`: Writes a file.
- `edit`: Edits a file.
- `batch_edit`: Applies several edits.
- `edit_preview`: Previews an edit as a dry run.
- `delete`: Deletes a file.
- `warm`: Loads files into the cache ahead of time.
- `grep`: Exact search over the cache.
- `search`: BM25 keyword search over the cache.
- `glob`: Matches file paths by pattern.
- `stats`: Reports cache statistics.
- `clear`: Clears the cache.

## FAQ

### Is the search semantic?

No. search is BM25 keyword ranking and grep is exact, so no embedding model, GPU or API key is needed.

### Does it send my code anywhere?

No. The only request is a one-time download of the o200k tokenizer file, verified by SHA-256.

### How do I install it?

With uv: claude mcp add semantic-cache --scope user -- uvx semantic-cache-mcp, or an mcpServers entry that runs uvx semantic-cache-mcp.

### What licence is it under?

MIT.

### Is Semantic Cache MCP free?

Yes. Semantic Cache MCP is open source, so you can use and self-host it for free.

### How do I add Semantic Cache MCP to Claude Code?

Run this command in your terminal: claude mcp add semantic-cache-mcp -- uvx semantic-cache-mcp

### What are the best alternatives to Semantic Cache MCP?

The closest alternatives to Semantic Cache MCP are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/semantic-cache-mcp
