mempalace
The best-benchmarked open-source AI memory system. And it's free.
Install / Use
claude mcp add MemPalace -- npx -y github:MemPalace/mempalaceIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of mempalace
mempalace scores 97/100 on our quality scale, 60th of 965 AI & Machine Learning skills we index (top 7%).
Its MCP Server is 16 KB long, well organised into 27 sections with 9 code examples: a thorough specification that gives an agent plenty to work with.
With 60,404 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated today, so mempalace is actively maintained.
- Our last check on 2026-10-20 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 95/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
mempalace compared with similar skills
All 4 of these similar skills score higher than mempalace; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| mempalace (this skill)by MemPalace | 97 | 60.4k | today | MCP Server |
| claude-memby thedotmack | 100 | 113.5k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 109.2k | today | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 90.9k | 10d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 78.9k | today | CLAUDE.md |
Frequently asked questions
- How do I install mempalace?
- Run
claude mcp add MemPalace -- npx -y github:MemPalace/mempalace. The install tabs above show the steps for each supported agent. - Which AI agents does mempalace work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is mempalace safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 95/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is mempalace still maintained?
- The repository was last updated today, so mempalace is actively maintained.
Skill content
View source on GitHubMemPalace
Local-first AI memory. Verbatim storage, pluggable backend, 96.6% R@5 raw on LongMemEval — zero API calls.
[![][version-shield]][release-link] [![][python-shield]][python-link] [![][license-shield]][license-link] [![][discord-shield]][discord-link]
</div>[!CAUTION] Beware of impostor sites. MemPalace has no other official websites. The only official sources are this GitHub repository, the PyPI package, and the docs at mempalaceofficial.com. Any other domain (including
.tech,.net, or other.comvariants) is an impostor and may distribute malware. Details and timeline: docs/HISTORY.md.
[!IMPORTANT] Claude Code sessions expire in 30 days without auto-save hooks wired. Read this →
Need the shortest recovery/setup path? Use the Claude Code retention setup checklist.
What it is
MemPalace stores your conversation history as verbatim text and retrieves it with semantic search. It does not summarize, extract, or paraphrase. The index is structured — people and projects become wings, topics become rooms, and original content lives in drawers — so searches can be scoped rather than run against a flat corpus.
The retrieval layer is pluggable. The current default is ChromaDB; the
interface is defined in mempalace/backends/base.py
and alternative backends can be dropped in without touching the rest of
the system.
Nothing leaves your machine unless you opt in.
Architecture, concepts, and mining flows: mempalaceofficial.com/concepts/the-palace.
Install
Agent-guided setup
Install the MemPalace skills first, then ask your coding agent to set up MemPalace. The setup skill detects your system, installs the Python package, configures MCP, and asks whether you want a private local palace, a shared-brain hub, or a client connected to an existing hub:
npx skills add MemPalace/mempalace
The repository exposes three skills: mempalace for guided installation and
operations, mempalace-recall for search-before-answer recall, and
mempalace-task for logstream delegation. Installing a skill does not by
itself install the MemPalace CLI or MCP server; the setup skill guides the
agent through those system changes and verifies the live connection.
During guided setup the agent can offer weekly stable-release checks. They are
disabled by default, contact only PyPI when enabled, and never install updates
automatically. Cached availability appears in scoped mempalace_status fields
for the serving runtime and, when a local proxy is present, its client runtime,
allowing the agent to explain the release and request authorization before showing an exact
upgrade plan. Setup records whether the runtime came from uv tool, pipx, or
pip so the plan never proposes an upgrade command for the wrong installation.
Direct CLI setup
MemPalace ships a CLI, so install it in an isolated environment to avoid
PEP 668 errors on Debian/Ubuntu/Homebrew Pythons and to keep mempalace's
deps (chromadb, numpy, grpcio, …) from conflicting with anything
else in your global site-packages.
We recommend uv — uv tool install puts
the mempalace CLI in an isolated environment on your PATH:
uv tool install mempalace
mempalace init ~/projects/myapp
pipx works the same way if you prefer it:
pipx install mempalace.
Prefer plain pip only inside an activated virtualenv where you
explicitly want import mempalace available:
python -m venv .venv && source .venv/bin/activate
pip install mempalace
Android / Termux
Native Termux installation is not currently supported because compiled dependencies such as ChromaDB and ONNX Runtime publish Linux wheels, not Android wheels. Android ARM64 users can run the regular Linux packages in an isolated Debian PRoot container instead. See the Termux installation guide for the tested setup and an argv-preserving launcher.
Docker
A container image is also available for running the MCP server or the CLI without a local Python toolchain. Multi-arch (amd64 + arm64), so it runs natively on Apple Silicon:
docker pull ghcr.io/mempalace/mempalace:latest
Everything persists under /data — palace, config, and the cached embedding
model — so mount a volume there and reuse it across runs:
# MCP server over stdio — note the `-i` flag (JSON-RPC needs stdin)
docker run -i --rm -v mempalace-data:/data ghcr.io/mempalace/mempalace
# Run any CLI command instead. The container only sees what you mount, so
# mount the directory you want to mine — read-only is enough, mining never
# writes to the source.
docker run --rm -v mempalace-data:/data -v /path/to/project:/work:ro \
ghcr.io/mempalace/mempalace mine /work
docker run --rm -v mempalace-data:/data ghcr.io/mempalace/mempalace search "why GraphQL"
The first command that needs embeddings downloads the model into /data
(~80 MB for the default minilm, ~300 MB for embeddinggemma). It is a
one-off as long as the volume persists, but it does mean the first call is
slow and needs network — worth knowing before assuming a hung container.
Wire it into an MCP client (e.g. Claude Code) as a stdio server. Mount anything you want the server to be able to mine — it cannot reach your transcripts otherwise:
{
"mcpServers": {
"mempalace": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "mempalace-data:/data",
"-v", "/absolute/path/to/.claude/projects:/transcripts:ro",
"ghcr.io/mempalace/mempalace"
]
}
}
}
Use a real absolute path there — ~ and $HOME are not expanded by every
MCP client. Paths are container paths from then on: mine /transcripts, not
~/.claude/projects.
Mount permissions on Linux. The image runs as uid 1000 and bind mounts
keep their host ownership, so a mounted directory has to be readable by that
uid — an ordinary 0755 checkout is fine, a 0700 directory is not, and the
failure surfaces as PermissionError: [Errno 13] rather than anything about
Docker. Docker Desktop maps uids on macOS and Windows, so this only bites on
Linux. Do not work around it with --user: /data is owned by uid 1000
inside the image, so another uid cannot write the palace at all.
docker compose run --rm mcp works too (see docker-compose.yml), and
deploy/docker-compose.server.yml stands up the team server. To build the
image yourself instead of pulling — required for the GPU variant, which is not
published:
docker build -t mempalace . # CPU
docker build --build-arg EXTRAS="extract,spellcheck" -t mempalace .
docker build -f Dockerfile.gpu -t mempalace:gpu . # CUDA; run with --gpus all
The GPU image is x86_64-only: onnxruntime-gpu publishes no aarch64 Linux
wheels, so that last build fails on an ARM host (including Apple Silicon) with
a dependency-resolution error rather than an obvious one.
Note that a build from a clone uses whatever branch you checked out; develop
is the default branch, so pull the published image if you want the released
version.
Storage backends
ChromaDB is the default and needs no configuration. MemPalace also ships a pluggable backend contract, exercised across deliberately different substrates so the contract is never accidentally shaped around one vendor. Every non-default backend is opt-in.
| Backend | Mode | Install | Namespaces | Lexical | Configure with |
| ------- | ---- | ------- | :--------: | :-----: | -------------- |
| chroma (default) | Local (embedded) | bundled | – | ✓ | – |
| sqlite_exact | Local (exact NumPy) | bundled | – | ✓ | – |
| rust_exact | Local (native vectors) | wheel / compiled | – | ✓ | – |
| milvus | Local (Lite) · Server opt-in | mempalace[milvus] | ✓ | ✓ | MEMPALACE_MILVUS_URI |
| qdrant | Server (REST) | bundled | ✓ | ✓ | MEMPALACE_QDRANT_URL |
| pgvector | Server (Postgres) | mempalace[pgvector] | ✓ | ✓ | MEMPALACE_PGVECTOR_DSN |
Select with --backend <name>, MEMPALACE_BACKEND=<name>, or
"backend": "<name>" in config.json. rust_exact uses the exact same sqlite_exact.sqlite3 file on disk as sqlite_exact with zero data migration. See native installation and vector CLI usage for the separately distributed wheel and executables.
Native vector search
rust_exact and the standalone mempalace-native CLI scan the same sqlite_exact database with a native Rust engine. The rust_exact adapter falls back to the Python backend for complex filters, requests for returned embeddings, and installs without the native extension; the mempalace-native executable is Rust-only and has no Python fallback. No benchmark figures are published for this release; mempalace-native bench --db <sqlite_exact.sqlite3> measures it on your own data. See crates/ for the core workspace, PyO3 bindings, and native CLI.
Quickstart
# Mine content into the palace
mempalace mine ~/projects/myapp # project files
mempalace mine ~/.claude/projects/ --mode convos # Claude Code sessions (scope with --wing per project)
# Search
mempalace search "why did we switch to GraphQL"
# Load context for a new session
mempalace wake-up
For Claude Code, Gemini CLI, Antigravity, MCP-compatible tools, and local models, see mempalaceofficial.com/guide/getting-started.
Benchmarks
All numbers below are reproducible from this repository with the commands
in benchmarks/BENCHMARKS.md. Full
per-question result files are committed under benchmarks/results_*.
LongMemEval — retrieval recall (R@5, 500 questions):
| Mode | R@5 | LLM required | |---|---|---| | Raw (semantic search, no heuristics, no LLM) | 96.6% | None | | Hybrid v4, held-out 450q (tuned on 50 dev, not seen during training) | 98.4% | None | | Hybrid v4 + LLM rerank (full 500) | ≥99% | Any capable model |
The raw 96.6% requires no API key, no cloud, and no LLM at any stage. The hybrid pipeline adds keyword boosting, temporal-proximity boosting, and preference-pattern extraction; the held-out 98.4% is the honest generalisable figure.
The rerank pipeline promotes the best candidate out of the top-20
retrieved sessions using an LLM reader. It works with any reasonably
capable model — we have reproduced it with Claude Haiku, Claude Sonnet,
and minimax-m2.7 via Ollama Cloud (no Anthropic dependency). The gap
between raw and reranked is model-agnostic; we do not headline a "100%"
number because the last 0.6% was reached by inspecting specific wrong
answers, which benchmarks/BENCHMARKS.md flags as teaching to the test.
Other benchmarks (full results in benchmarks/BENCHMARKS.md):
| Benchmark | Metric | Score | Notes | |---|---|---|---| | LoCoMo (session, top-10, no rerank) | R@10 | 60.3% | 1,986 questions | | LoCoMo (hybrid v5, top-10, no rerank) | R@10 | 88.9% | Same set | | ConvoMem (all categories, 250 items) | Avg recall | 92.9% | 50 per category | | MemBench (ACL 2025, 8,500 items) | R@5 | 80.3% | All categories |
We deliberately do not include a side-by-side comparison against Mem0, Mastra, Hindsight, Supermemory, or Zep. Those projects publish different metrics on different splits, and placing retrieval recall next to e
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
113.5kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
109.2kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
90.9kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
78.9kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
