MemPalace gives AI agents a memory that survives the end of a session. It saves your conversations and project files as verbatim text, without summarizing or paraphrasing them, and finds them again with semantic search. Everything is filed like a memory palace: people and projects become wings, sessions and days become rooms, and the original text sits in drawers, so a search can stay inside one project instead of trawling everything.
It runs locally by default, with ChromaDB as the store and a small embedding model downloaded once. An MCP server with 47 tools lets Claude Code, Codex, Cursor, Gemini CLI and local models search and write to the palace, and optional hooks save sessions as you go and before Claude Code compacts them. There is also a knowledge graph of people and projects over time, and a team server mode backed by Qdrant if you want a shared memory.
MemPalace is MIT-licensed, with about 61,000 stars and 181 contributors since April 2026; version 3.12.0 came out on 12 November 2026. Its headline figure is 96.6% recall at five on the LongMemEval benchmark without any LLM. After launch the team publicly corrected several early claims, and its history file lists what was retracted.
- Repository: github.com/MemPalace/mempalace
- Licence: MIT (MIT License)
- Language: Python. Stars: 60.5K. Forks: 7,669. Last push: Nov 13, 2026.
- Scan: safe, Nov 13, 2026, commit 0ed1be8
Who it is for
People who use Claude Code or another agent every day and are tired of re-explaining their projects, developers building agents that need memory, and anyone who wants their AI history searchable without sending it to a cloud service. You need to be comfortable in a terminal.
Getting started
1. Install the command-line tool in its own environment
uv tool install mempalace2. Set up a palace for a project
mempalace init ~/projects/myapp3. Import your past Claude Code sessions
mempalace mine ~/.claude/projects/ --mode convos4. Search your history
mempalace search "why did we switch to GraphQL"The README warns of impostor MemPalace sites spreading malware. The only official sources are the GitHub repo, the PyPI package and mempalaceofficial.com. Auto-save hooks are a separate step described in its docs.
Safety scan
We cloned MemPalace/mempalace at commit 0ed1be8 on Nov 13, 2026 and ran the checks described on the GitHub Tools page: credential patterns, decode-and-execute code, install-time scripts, committed binaries, risky CI workflows, every host the code talks to, known vulnerabilities in pinned dependencies, and project hygiene. A person read every hit. This is what we found.
- No secret hits and no committed binaries across 874 files and about 389,000 lines, mostly Python. The one pattern hit is os.dup2 pointing standard output at a temporary file to capture a tool's output, not a network shell.
- 91 advisories, 7 critical. Two critical are in ChromaDB 1.5.9 and concern its HTTP server, where a remote caller can make it load a model with remote code. MemPalace uses ChromaDB embedded in the same process (PersistentClient) and does not start that server, and the team server mode uses Qdrant. ChromaDB has no fixed release yet. The other five criticals and most highs are in Pillow, which only the development tools install.
- Telemetry is off. ChromaDB enables anonymous telemetry by default, and MemPalace sets anonymized_telemetry=False on every client and in the environment. The update check is opt-in, contacts only PyPI and never installs anything. OpenAI and Anthropic addresses appear only as optional endpoints for LLM features you configure yourself.
- The Claude Code plugin adds Stop, SessionEnd and PreCompact hooks. They run mempalace hook run, which saves the session transcript into your local palace. The launcher sets PYTHONSAFEPATH so a project folder cannot slip in its own fake mempalace module. The Cursor and Antigravity installers write hook files without sudo.
- The extra pass for skill repos found only test material. Injection phrases are tests that check stored memories are fenced off as data; the ~/.ssh paths are tests that reject them as transcript paths. The hidden characters are in multilingual benchmark data. No exfiltration hosts or pipe-to-shell.
- Six workflows, no pull_request_target, and all 14 third-party actions are pinned to commits. A security policy, Dependabot and contributing guide are present.
What the scanner counted
| Check | Result |
|---|---|
| Secrets | None found. |
| Suspicious code | 1 pattern hit found and read; every one is listed under the raw findings. |
| Install-time code | 2 installer scripts |
| Committed binaries | None. |
| CI workflows | 6 workflows. None use pull_request_target. 0 of 14 third-party actions pinned to a tag rather than a commit. |
| Network hosts | 40 distinct hosts referenced from source; most often github.com, api.openai.com, peer.example, api.anthropic.com. 13 URLs to a bare IP address, listed under the raw findings. |
| Known vulnerabilities | 91 advisories across 299 pinned packages: 7 critical, 36 high, 37 moderate, 9 low, 2 unrated. Cargo.lock: 79 packages, 5 advisories; benchmarks/lean_mempalace/go/go.mod: 10 packages, 0 advisories; benchmarks/lean_mempalace/rust/Cargo.lock: 48 packages, 1 advisories; uv.lock: 199 packages, 86 advisories. |
| Project hygiene | Has security policy, automated dependency updates, licence file, contributing guide. Missing CodeQL. |
| OpenSSF Scorecard | Not scored: the project is not in Scorecard's weekly index. |
The raw findings
Every hit the scanner wrote out, with a link to the exact line at the scanned commit. Secrets candidates are redacted.
Pattern hits (1)
| Where | Rule | Match |
|---|---|---|
| mempalace/mcp_server/tools_write.py:787 | raw-socket-shell | os.dup2(tmp.fileno(), 1) |
URLs to bare IP addresses (13)
| Where | Rule | Match |
|---|---|---|
| tests/test_llm_client.py:843 | ip-literal-url | ("http://100.64.0.1:1234", "start of CGNAT"), |
| tests/test_llm_client.py:844 | ip-literal-url | ("http://100.100.50.50:1234", "middle of CGNAT (typical Tailscale assignment)"), |
| tests/test_llm_client.py:845 | ip-literal-url | ("http://100.127.255.254:1234", "near end of CGNAT"), |
| tests/test_llm_client.py:862 | ip-literal-url | ("http://100.0.0.1:1234", "below CGNAT (public)"), |
| tests/test_llm_client.py:863 | ip-literal-url | ("http://100.63.255.255:1234", "just below CGNAT (boundary)"), |
| tests/test_llm_client.py:864 | ip-literal-url | ("http://100.128.0.0:1234", "just above CGNAT (boundary)"), |
| tests/test_llm_client.py:865 | ip-literal-url | ("http://100.255.255.255:1234", "well above CGNAT"), |
| tests/test_llm_client.py:954 | ip-literal-url | "http://100.64.0.1:8000", |
| tests/test_llm_client.py:955 | ip-literal-url | "http://100.127.255.254:8000", |
| tests/test_llm_client.py:962 | ip-literal-url | "http://172.32.0.1:8000", |
| tests/test_llm_client.py:963 | ip-literal-url | "http://100.128.0.1:8000", |
| tests/test_llm_client.py:964 | ip-literal-url | "http://100.63.255.255:8000", |
| tests/test_llm_client.py:965 | ip-literal-url | "http://8.8.8.8:8000", |
Installer scripts (2)
- hooks/antigravity/install.sh, 377 lines
- hooks/cursor/install.sh, 400 lines
Worst known vulnerabilities (24 of 91)
| Advisory | Severity | Package | Summary |
|---|---|---|---|
| GHSA-36p7-vc44-83pf | critical | chromadb@1.5.9 | ChromaDB has a code injection vulnerability |
| GHSA-f4j7-r4q5-qw2c | critical | chromadb@1.5.9 | ChromaDB Python project has a pre-authentication code injection vulnerability |
| GHSA-332p-7hrc-92wf | critical | pillow@12.3.0 | Pillow: Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO |
| GHSA-5x8w-8jj5-q52h | critical | pillow@12.3.0 | Pillow: Heap buffer overflow in FlashPix (FPX) JPEG decoding leads to code execution |
| GHSA-8g5g-8vmr-9782 | critical | pillow@12.3.0 | Pillow: Heap buffer overflow in ImagingJpegDecode |
| GHSA-v9pv-5gc8-w2m6 | critical | pillow@12.3.0 | Pillow multi-frame loaders can reuse stale native image storage after mode transitions |
| GHSA-w889-685w-c8fh | critical | pillow@12.3.0 | Pillow: Argument Injection in Ghostscript call, potentially leading into RCE |
| GHSA-36hh-v3qg-5jq4 | high | pyo3@0.22.6 | PyO3 has an Out-of-bounds Read in `nth` / `nth_back` for `PyList` and `PyTuple` iterators |
| GHSA-2wm9-hf6c-p5cr | high | chromadb@1.5.9 | ChromaDB allows any authenticated users to arbitrarily read, write, update, or delete data in any tenant's collection |
| GHSA-xph7-9rjv-w5fr | high | chromadb@1.5.9 | ChromaDB's SimpleRBACAuthorizationProvider doesn't check which tenant, database, or collection a permission applies to |
| GHSA-537c-gmf6-5ccf | high | cryptography@48.0.0 | Vulnerable OpenSSL included in cryptography wheels |
| GHSA-g6cj-pr64-35w5 | high | cryptography@48.0.0 | cryptography: PKCS#7 EnvelopedData decryption exposes a Bleichenbacher oracle through distinguishable errors and timing |
| GHSA-jwv3-5hgf-82ww | high | cryptography@48.0.0 | python-cryptography: Duplicate self-signed intermediates can cause exponential path-building |
| GHSA-v4x8-3wr5-3wq8 | high | filelock@4.1.0 | filelock ReadWriteLock: SQLite reopens the lock database by name, so a planted symlink or journal file makes the lock us… |
| GHSA-22hg-r758-rrw9 | high | pillow@12.3.0 | Pillow: Infinite loop in MIC n_frames when the embedded TIFF |
| GHSA-27h8-gf7j-v5hc | high | pillow@12.3.0 | Pillow: NULL dereference in ImagingExpand via rank filters on zero-size images |
| GHSA-3j72-p6qg-6xp7 | high | pillow@12.3.0 | Pillow: TarIO negative size field causes infinite CPU-spin loop |
| GHSA-58r4-6rv3-gfh8 | high | pillow@12.3.0 | Pillow: Out-of-bounds access in _imagingmorph on a zero-width image |
| GHSA-5xm2-6676-qcp9 | high | pillow@12.3.0 | Pillow: APNG background disposal allocates full canvas before decompression bomb check |
| GHSA-65qm-jvmh-6pqg | high | pillow@12.3.0 | Pillow: GIF seek keeps rejected size after DecompressionBombError, allowing DoS |
| GHSA-78g4-xqwv-q3g8 | high | pillow@12.3.0 | Pillow: Bundled libopenjp2 2.5.4 in all wheels since 11.1.0 carries OSV-2025-219 heap-buffer-overflow write reachable fr… |
| GHSA-7mwm-ghpf-9vrm | high | pillow@12.3.0 | Pillow: Double free in ImagingScaleAffine on calloc failure via Image.transform |
| GHSA-9v9v-9qvf-h2hj | high | pillow@12.3.0 | Pillow: Heap over-read in WMF/EMF rendering via 16-bit dimension truncation (Windows builds) |
| GHSA-c6hw-5grf-ff96 | high | pillow@12.3.0 | Pillow: OOB read in TiffDecode.c tile and RGBA paths leaks heap memory into pixels |
By the numbers
| Stars | 60.5K |
|---|---|
| Forks | 7,669 |
| Contributors | 181 |
| Commits | 2,617 |
| Open issues | 363 |
| Open pull requests | 452 |
| Releases | 20 |
| Latest release | v3.12.0 |
| Licence | MIT |
| Main language | Python |
| Project age | 7 months |
| Last push | Nov 13, 2026 |
| Tracked files | 874 |
| Lines of code | 388.9K |
| Checkout size | 69 MB |
Lines by language: Python 250.4K, JSON 97.6K, Markdown 22.3K, JavaScript 5,565, Shell 3,449, CSS 2,717.
Questions
Is MemPalace free?
Yes. It is MIT-licensed, needs no account or API key, and runs on your own machine. Optional LLM features use a provider you set up yourself.
Does MemPalace send my conversations anywhere?
Not by default. The palace and the embedding model stay on your machine. Data leaves only if you opt in to a remote backend, the team server or an LLM endpoint.
Does it work with Claude Code?
Yes. Install it, add its MCP server, and optionally wire the auto-save hooks so sessions are saved before compaction. It also works with Codex, Cursor, Gemini CLI and local models.
Are the benchmark numbers trustworthy?
The 96.6% LongMemEval figure is from raw mode with no LLM and has been reproduced by others. Some launch claims were overstated, and the project retracted them publicly in its history file. We did not run the benchmarks ourselves.
This post is part of GitHub Tools, where every repository is cloned and scanned before it is written up. The scan is a snapshot of one commit on one day; the repository has moved on since, so check it before you install.
