---
title: "mempalace"
type: "tool"
slug: "mempalace-mempalace"
canonical_url: "https://www.graphcanon.com/tools/mempalace-mempalace"
github_url: "https://github.com/MemPalace/mempalace"
homepage_url: "http://mempalaceofficial.com/"
stars: 57069
forks: 7370
primary_language: "Python"
license: "MIT"
categories: ["data-retrieval"]
tags: ["memory", "llm", "ai", "python", "chromadb"]
updated_at: "2026-07-07T18:17:30.927233+00:00"
---

# mempalace

> The best-benchmarked open-source AI memory system. And it's free.

MemPalace is an AI memory system that stores conversation history verbatim and retrieves it with semantic search. It supports a pluggable backend architecture, defaulting to ChromaDB, ensuring data remains within the local machine unless explicitly shared.

## Facts

- Repository: https://github.com/MemPalace/mempalace
- Homepage: http://mempalaceofficial.com/
- Stars: 57,069 · Forks: 7,370 · Open issues: 583 · Watchers: 327
- Primary language: Python
- License: MIT
- Last pushed: 2026-07-07T10:53:19+00:00

## Categories

- [Data & Retrieval](/categories/data-retrieval.md)

## Tags

memory, llm, ai, python, chromadb

## Related tools

- [transformers](/tools/huggingface-transformers.md) - 🤗 Transformers: the model-definition framework for state-of-the-art machine learning models (★ 162,347)
- [langflow](/tools/langflow-ai-langflow.md) - Langflow is a powerful platform for building and deploying AI-powered agents and workflows. (★ 151,298)
- [firecrawl](/tools/firecrawl-firecrawl.md) - The API to search, scrape, and interact with the web at scale. (★ 147,117)
- [PaddleOCR](/tools/paddlepaddle-paddleocr.md) - PaddleOCR: A powerful OCR toolkit for transforming PDFs/images into structured data (★ 84,919)
- [graphify](/tools/graphify-labs-graphify.md) - AI coding assistant skill that transforms various file types into a queryable knowledge graph (★ 79,371)
- [worldmonitor](/tools/koala73-worldmonitor.md) - Real-time global intelligence dashboard. (★ 61,516)
- [llm-app](/tools/pathwaycom-llm-app.md) - Ready-to-run cloud templates for RAG, AI pipelines, and enterprise search with live data. (★ 59,097)
- [meilisearch](/tools/meilisearch-meilisearch.md) - A lightning-fast search engine API bringing AI-powered hybrid search to your sites and applications. (★ 58,448)

## README (excerpt)

```text
<div align="center">

<img src="assets/mempalace_logo.png" alt="MemPalace" width="240">

# MemPalace

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](https://github.com/MemPalace/mempalace)**, the **[PyPI package](https://pypi.org/project/mempalace/)**, and the docs at **[mempalaceofficial.com](https://mempalaceofficial.com)**. Any other domain (including `.tech`, `.net`, or other `.com` variants) is an impostor and may distribute malware. Details and timeline: [docs/HISTORY.md](docs/HISTORY.md).

> [!IMPORTANT]
> **Claude Code sessions expire in 30 days without auto-save hooks wired.** [Read this →](https://github.com/MemPalace/mempalace/discussions/1388)
>
> Need the shortest recovery/setup path? Use the [Claude Code retention setup checklist](https://mempalaceofficial.com/guide/claude-code-retention.html).

---

## 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`](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](https://mempalaceofficial.com/concepts/the-palace.html).

---

## Install

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`](https://docs.astral.sh/uv/) — `uv tool install` puts
the `mempalace` CLI in an isolated environment on your PATH:

```bash
uv tool install mempalace
mempalace init ~/projects/myapp
```

[`pipx`](https://pipx.pypa.io/) 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:

```bash
python -m venv .venv && source .venv/bin/activate
pip install mempalace
```

### Docker

A container image is also available for running the MCP server or the CLI
without a local Python toolchain. Everything persists under `/data` (palace,
config, and the cached embedding model), so mount a volume there.

```bash
# Build the image (CPU; bundles the `extract` + `spellcheck` extras)
docker build -t mempalace .

# MCP server over stdio — note the `-i` flag (JSON-RPC needs stdin)
docker run -i --rm -v mempalace-data:/data mempalace

# Run any CLI command instead (mount the host directory you want to mine)
docker run --rm -v mempalace-data:/data -v /path/to/project:/work mempalace mine /work
docker run --rm -v mempalace-data:/data mempalace search "why GraphQL"
```

Wire it into an MCP client (e.g. Claude Code) as a stdio server:

```json
{
  "mcpServers": {
    "mempalace": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-v", "mempalace-data:/data", "mempalace"]
    }
  }
}
```

`docker compose run --rm mcp` works too (see `docker-compose.yml`). For
CUDA-accelerated embeddings, build the GPU variant with
`docker build -f Dockerfile.gpu -t mempalace:gpu .` and run it with
`--gpus all`. Customise the bundled extras at build time, e.g.
`docker build --build-arg EXTRAS="extract,spellcheck" -t mempalace .`.
```

---

**Machine-readable endpoints**

- JSON: [`/api/graphcanon/tools/mempalace-mempalace`](/api/graphcanon/tools/mempalace-mempalace)
- LLM index: [/llms.txt](/llms.txt)
- Full corpus: [/llms-full.txt](/llms-full.txt)

_GraphCanon - The knowledge graph for AI development. https://www.graphcanon.com/_
