MrTechKing

6 min read

MemPalace: Local Long-Term Memory for Your AI Agents (GitHub, Scanned)

Stores your AI conversations word for word on your own machine and lets your agent search them, with no API calls needed.

MemPalace logo
✅
Scan: safe. Nothing malicious, and it turns off ChromaDB's telemetry. The critical advisories are in ChromaDB's network server, which MemPalace does not run, and in test tools. Scanned Nov 13, 2026; the full report is below.

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.

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 mempalace

2. Set up a palace for a project

mempalace init ~/projects/myapp

3. Import your past Claude Code sessions

mempalace mine ~/.claude/projects/ --mode convos

4. 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

CheckResult
SecretsNone found.
Suspicious code1 pattern hit found and read; every one is listed under the raw findings.
Install-time code2 installer scripts
Committed binariesNone.
CI workflows6 workflows. None use pull_request_target. 0 of 14 third-party actions pinned to a tag rather than a commit.
Network hosts40 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 vulnerabilities91 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 hygieneHas security policy, automated dependency updates, licence file, contributing guide. Missing CodeQL.
OpenSSF ScorecardNot 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)
WhereRuleMatch
mempalace/mcp_server/tools_write.py:787raw-socket-shellos.dup2(tmp.fileno(), 1)
URLs to bare IP addresses (13)
WhereRuleMatch
tests/test_llm_client.py:843ip-literal-url("http://100.64.0.1:1234", "start of CGNAT"),
tests/test_llm_client.py:844ip-literal-url("http://100.100.50.50:1234", "middle of CGNAT (typical Tailscale assignment)"),
tests/test_llm_client.py:845ip-literal-url("http://100.127.255.254:1234", "near end of CGNAT"),
tests/test_llm_client.py:862ip-literal-url("http://100.0.0.1:1234", "below CGNAT (public)"),
tests/test_llm_client.py:863ip-literal-url("http://100.63.255.255:1234", "just below CGNAT (boundary)"),
tests/test_llm_client.py:864ip-literal-url("http://100.128.0.0:1234", "just above CGNAT (boundary)"),
tests/test_llm_client.py:865ip-literal-url("http://100.255.255.255:1234", "well above CGNAT"),
tests/test_llm_client.py:954ip-literal-url"http://100.64.0.1:8000",
tests/test_llm_client.py:955ip-literal-url"http://100.127.255.254:8000",
tests/test_llm_client.py:962ip-literal-url"http://172.32.0.1:8000",
tests/test_llm_client.py:963ip-literal-url"http://100.128.0.1:8000",
tests/test_llm_client.py:964ip-literal-url"http://100.63.255.255:8000",
tests/test_llm_client.py:965ip-literal-url"http://8.8.8.8:8000",
Installer scripts (2)
Worst known vulnerabilities (24 of 91)
AdvisorySeverityPackageSummary
GHSA-36p7-vc44-83pfcriticalchromadb@1.5.9ChromaDB has a code injection vulnerability
GHSA-f4j7-r4q5-qw2ccriticalchromadb@1.5.9ChromaDB Python project has a pre-authentication code injection vulnerability
GHSA-332p-7hrc-92wfcriticalpillow@12.3.0Pillow: Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO
GHSA-5x8w-8jj5-q52hcriticalpillow@12.3.0Pillow: Heap buffer overflow in FlashPix (FPX) JPEG decoding leads to code execution
GHSA-8g5g-8vmr-9782criticalpillow@12.3.0Pillow: Heap buffer overflow in ImagingJpegDecode
GHSA-v9pv-5gc8-w2m6criticalpillow@12.3.0Pillow multi-frame loaders can reuse stale native image storage after mode transitions
GHSA-w889-685w-c8fhcriticalpillow@12.3.0Pillow: Argument Injection in Ghostscript call, potentially leading into RCE
GHSA-36hh-v3qg-5jq4highpyo3@0.22.6PyO3 has an Out-of-bounds Read in `nth` / `nth_back` for `PyList` and `PyTuple` iterators
GHSA-2wm9-hf6c-p5crhighchromadb@1.5.9ChromaDB allows any authenticated users to arbitrarily read, write, update, or delete data in any tenant's collection
GHSA-xph7-9rjv-w5frhighchromadb@1.5.9ChromaDB's SimpleRBACAuthorizationProvider doesn't check which tenant, database, or collection a permission applies to
GHSA-537c-gmf6-5ccfhighcryptography@48.0.0Vulnerable OpenSSL included in cryptography wheels
GHSA-g6cj-pr64-35w5highcryptography@48.0.0cryptography: PKCS#7 EnvelopedData decryption exposes a Bleichenbacher oracle through distinguishable errors and timing
GHSA-jwv3-5hgf-82wwhighcryptography@48.0.0python-cryptography: Duplicate self-signed intermediates can cause exponential path-building
GHSA-v4x8-3wr5-3wq8highfilelock@4.1.0filelock ReadWriteLock: SQLite reopens the lock database by name, so a planted symlink or journal file makes the lock us…
GHSA-22hg-r758-rrw9highpillow@12.3.0Pillow: Infinite loop in MIC n_frames when the embedded TIFF
GHSA-27h8-gf7j-v5hchighpillow@12.3.0Pillow: NULL dereference in ImagingExpand via rank filters on zero-size images
GHSA-3j72-p6qg-6xp7highpillow@12.3.0Pillow: TarIO negative size field causes infinite CPU-spin loop
GHSA-58r4-6rv3-gfh8highpillow@12.3.0Pillow: Out-of-bounds access in _imagingmorph on a zero-width image
GHSA-5xm2-6676-qcp9highpillow@12.3.0Pillow: APNG background disposal allocates full canvas before decompression bomb check
GHSA-65qm-jvmh-6pqghighpillow@12.3.0Pillow: GIF seek keeps rejected size after DecompressionBombError, allowing DoS
GHSA-78g4-xqwv-q3g8highpillow@12.3.0Pillow: 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-9vrmhighpillow@12.3.0Pillow: Double free in ImagingScaleAffine on calloc failure via Image.transform
GHSA-9v9v-9qvf-h2hjhighpillow@12.3.0Pillow: Heap over-read in WMF/EMF rendering via 16-bit dimension truncation (Windows builds)
GHSA-c6hw-5grf-ff96highpillow@12.3.0Pillow: OOB read in TiffDecode.c tile and RGBA paths leaks heap memory into pixels

By the numbers

Stars60.5K
Forks7,669
Contributors181
Commits2,617
Open issues363
Open pull requests452
Releases20
Latest releasev3.12.0
LicenceMIT
Main languagePython
Project age7 months
Last pushNov 13, 2026
Tracked files874
Lines of code388.9K
Checkout size69 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.