recall-mcp
One shared, layered, local-first brain for every AI CLI you use. Claude Code, Gemini CLI, Cursor, Continue, Zed — they all forget. recall-mcp is the memory they share.
Quick start
# Install
pipx install recall-mcp
# Wire it into Claude Code (one-time)
echo '{"mcpServers":{"recall-mcp":{"type":"stdio","command":"recall-mcp"}}}' >> ~/.claude.json
# Restart Claude Code. Done.
That's it. Every conversation now writes to and reads from the same persistent brain — and so do Gemini CLI, Cursor, and any other MCP-aware client you wire up the same way.
What it does
flowchart TD
A[Claude Code] -- MCP --> M[recall-mcp]
B[Gemini CLI] -- MCP --> M
C[Cursor / Continue / Zed] -- MCP --> M
M --> S[(SQLite<br/>facts)]
M --> V[(ChromaDB<br/>vectors)]
M --> E[(Entity<br/>graph)]
M --> T[(Temporal<br/>lineage)]
M --> F[(FTS5<br/>keyword)]
classDef client fill:#1f6feb,stroke:#1f6feb,color:#fff,stroke-width:0
classDef brain fill:#a371f7,stroke:#a371f7,color:#fff,stroke-width:0
classDef store fill:#0d1117,stroke:#30363d,color:#7d8590
class A,B,C client
class M brain
class S,V,E,T,F store
Every AI CLI has the same blind spot: each new session starts with amnesia. Native save_memory tools store flat lists that bloat the system prompt over time. Cloud memory services need accounts, paid tiers, and trust your data to a vendor.
recall-mcp gives you one brain shared by every MCP-aware AI client:
- 🧠 7 memory layers — vector similarity, BM25 keyword, entity graph, temporal lineage, importance scoring, forgetting engine, hybrid retrieval
- 🔌 Drop-in via MCP — works with Claude Code, Gemini CLI, Cursor, Continue, Zed, any client speaking Model Context Protocol
- 🏠 Local-first — SQLite + ChromaDB on your machine. No accounts, no Docker, no cloud lock-in
- 🔄 Brain-swappable — switch between Claude, Gemini, MiniMax, Qwen — they all share the same memory
- 🛡️ Graceful degradation — when embeddings hit rate limits, BM25 + entity + temporal carry the load. Never poisons the index
Install
pipx install recall-mcp
Or with uv:
uv tool install recall-mcp
Or from source:
git clone https://github.com/Dhari-Q/recall-mcp
cd recall-mcp
pip install -e .
Configure your AI client
Claude Code
Add to ~/.claude.json under your project's mcpServers:
{
"mcpServers": {
"recall-mcp": {
"type": "stdio",
"command": "recall-mcp"
}
}
}
Gemini CLI
Add to ~/.gemini/settings.json:
{
"mcpServers": {
"recall-mcp": {
"command": "recall-mcp",
"trust": true
}
}
}
Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"recall-mcp": {
"command": "recall-mcp"
}
}
}
Restart your client. Done.
Five tools you'll use
| Tool | Purpose |
|---|---|
memory_recall(query, top_k) |
Hybrid search across all layers — vector + BM25 + entity + temporal |
memory_remember(content, type, confidence, tags) |
Store a fact, decision, preference, or gotcha |
memory_recent_sessions(limit) |
List recent session summaries with decisions and bug fixes |
memory_search_entity(name, limit) |
Find memories tied to a specific file, project, person, or tool |
memory_stats() |
Sanity-check counts across every layer |
Optional: real semantic search
By default, recall-mcp ships with BM25 keyword + entity graph + temporal retrieval — those work without any API key.
To enable vector / semantic search (queries like "how do I swap the AI" finding "switchable via /model" without shared keywords), point recall-mcp at an embeddings provider:
Create ~/.recall-mcp/.env (or export in your shell):
# MiniMax (global) — fastest path
MINIMAX_API_KEY=sk-...
# Or OpenAI
OPENAI_API_KEY=sk-...
# Or OpenRouter
OPENROUTER_API_KEY=sk-...
Vector layer activates automatically on next start.
Optional: auto-prefetch hook for Claude Code
The MCP tools above are deliberate — the model has to call them. For silent automatic recall on every prompt (like Claude Code's native memory but layered), add a UserPromptSubmit hook. See examples/claude_code_hook.md for the recipe.
Memory types
When you ask the model to remember something, it picks one of:
| Type | Decay | Examples |
|---|---|---|
architecture |
Permanent | "We use ChromaDB for vectors" |
decision |
Permanent | "We chose MIT over GPL" |
convention |
Permanent | "All API calls go through retry_utils" |
pattern |
Permanent | "Use with statements for sqlite connections" |
gotcha |
Permanent | "MiniMax embeddings are NOT OpenAI-compatible" |
preference |
Permanent | "User prefers terse responses" |
progress |
7 days | "Finished MCP wiring on 2026-04-28" |
context |
30 days | Misc. background facts |
Storage location
All data lives in $RECALL_MCP_HOME (defaults to ~/.recall-mcp/):
~/.recall-mcp/
├── memory/ # SQLite — facts + entity graph + temporal lineage
├── episodic/ # SQLite — session summaries
└── chroma/ # ChromaDB — vector embeddings
Set RECALL_MCP_HOME to point multiple machines at a synced folder (e.g., Syncthing) and your AI's memory follows you.
Architecture
recall-mcp implements seven memory layers, each backed by a focused storage engine:
- Episodic (per-turn / per-session events) — SQLite
- Semantic (extracted facts, decisions) — SQLite + ChromaDB
- Entity graph (who/what/why, dependencies) — SQLite
- Temporal lineage (millisecond timestamps, before/after queries) — SQLite
- Importance scoring (not all memories equal) — derived
- Forgetting engine (decay + Jaccard dedup) — derived
- Hybrid retrieval (BM25 + vector + entity + temporal, fused with optional LLM re-rank) — runtime
When you call memory_recall, all four retrieval paths run in parallel, results are deduplicated, scored by source quality + importance, and returned ranked.
Credits
Memory architecture derived from Hermes by Nous Research (MIT). recall-mcp generalizes the layered memory + retrieval engine into a standalone MCP server that any AI client can plug into.
License
MIT — see LICENSE.
Metadata
Release files for recall-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| recall_mcp-0.1.0.tar.gz | 31.7 kB | Without provenance | Details for recall_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| recall_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for recall_mcp-0.1.0-py3-none-any.whl |
Total release size: 64.2 kB
Release files / recall_mcp-0.1.0.tar.gz
| Download URL | recall_mcp-0.1.0.tar.gz |
|---|---|
| Size | 31.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b9a5673e800d0154611d08a8044e9782b22a1dbaee76d098fa0119e2ac535cb
|
|
BLAKE2b-256 checksum How to use checksums |
283ef08ac37210fb94026775d0851316857d677ce42a27f710fd7202124e1bb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / recall_mcp-0.1.0-py3-none-any.whl
| Download URL | recall_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 32.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
099cf22b046420159388fa0d684fcb3ff47b0d0f177051eff1b52ae1a73b4a84
|
|
BLAKE2b-256 checksum How to use checksums |
449ceef1c41909d8aabd13ce61765d52995e34dfed38680fa9612f9debe04ce2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for recall-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.