# echocache [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/kskurtveit/echocache  
**GitHub Stars:** 1  
**npm Downloads (last month):** 303  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/echocache

## Description
Cache expensive LLM results: HTTP-style freshness plus semantic recall of related answers.

## Tools
Capabilities this server exposes over MCP:

- **cache_get** — Exact-match lookup with fresh / stale / expired freshness
- **cache_set** — Store a result; auto-links it into the similarity graph
- **cache_query** — Semantic search across all cached entries
- **cache_related** — Graph traversal from one entry to entries linked to it
- **cache_invalidate** — Delete an entry, optionally cascading to its dependents
- **cache_stats** — Exact-match hit rate, `queryHits`/`queryMisses`, and tokens served

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "echocache": {
    "command": "npx",
    "args": ["-y","echocache"],
    "env": {
      "ECHOCACHE_DB_PATH": "",
      "ECHOCACHE_MAX_ENTRIES": "",
      "ECHOCACHE_MAX_BYTES": "",
      "ECHOCACHE_DEFAULT_TTL_SECONDS": ""
    }
  }
}
```

**Requires environment variables:** `ECHOCACHE_DB_PATH`, `ECHOCACHE_MAX_ENTRIES`, `ECHOCACHE_MAX_BYTES`, `ECHOCACHE_DEFAULT_TTL_SECONDS` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What echocache MCP server does

It gives agents two ways to recover prior results: an exact lookup based on the model, prompt, and parameters, and a semantic search that can find an answer even when a later request uses different wording.

Stored entries become nodes in a similarity graph. The server can also preserve explicit parent relationships for derived results. This makes it possible to find related conclusions, trace connected entries, and remove dependent results when an upstream source changes.

The intended candidates are research findings, design decisions, judgments, codebase orientation, cross-file syntheses, and conclusions about something being absent. File contents and simple file locations are poor candidates because grep or a targeted read may reconstruct them more cheaply.

## How it works

`cache_set` stores a response and adds it to the similarity graph. `cache_get` performs an exact lookup and reports whether the result is fresh, stale, or expired. Callers can provide a time-to-live and a stale-while-revalidate period, following an HTTP-cache-style freshness model.

`cache_query` searches cached entries by meaning, while `cache_related` follows graph links from a selected entry. `cache_invalidate` removes an entry and can cascade through derived-from relationships. `cache_stats` reports exact-match hit rate, semantic query hits and misses, and tokens served.

The echocache MCP server runs over standard MCP stdio. Its data is held in one SQLite file, which allows multiple projects on the same machine to use the same cache. Semantic recall and cross-project access distinguish it from host-specific memory, but the repository notes that cross-project reuse remains unproven.

## Setup and configuration

Install without cloning or building by registering the npm package with the host. For Claude Code, use:

```sh
claude mcp add echocache -- npx -y echocache
```

Other stdio-capable hosts use `npx -y echocache` as the command with no arguments. Claude Desktop, Cursor, and VS Code place that command in their MCP configuration. OpenCode uses a local MCP entry with the command represented as `['npx', '-y', 'echocache']`.

All documented settings are optional environment variables:

- `ECHOCACHE_DB_PATH` selects the SQLite file; the default is `~/.echocache/cache.db`.
- `ECHOCACHE_MAX_ENTRIES` sets the LRU entry limit; the default is 10,000.
- `ECHOCACHE_MAX_BYTES` sets the LRU response-size limit; the default is 256 MB.
- `ECHOCACHE_DEFAULT_TTL_SECONDS` supplies a default freshness lifetime when a caller omits one. If unset, entries do not expire by time, although LRU limits still apply.

## Tools and capabilities

- `cache_get`: retrieve an exact match with freshness status.
- `cache_set`: save a result and automatically link it to similar entries.
- `cache_query`: search all cached entries semantically.
- `cache_related`: traverse related or derived entries.
- `cache_invalidate`: delete an entry, optionally cascading to dependents.
- `cache_stats`: inspect hit rates, query results, and tokens served.

## Limitations and notes

The echocache MCP server is not a replacement for reading files, a source of truth, or in-conversation prompt caching. Caching a file read generally does not reduce token use because the content still has to enter the context. A later agent should use cached paths or line numbers as pointers to source details, not as substitutes for validating those details.

For a single user working in one project with Claude Code, persistent memory may already provide similar value without a separate server. The documented advantage is broader sharing across projects and MCP hosts, plus semantic retrieval and explicit freshness handling. The repository also reports that cached derivations can lose to precise grep-and-read workflows for narrow questions or parallel file-reading tasks.

_Full upstream README: https://allmcps.com/mcp/echocache/readme_

