MemPalace MCP server

OfficialMemPalace60,509Config last verified Nov 10, 2026

Local MCP server that files conversation history and project files verbatim into wings, rooms and drawers, then searches them semantically.

MemPalace keeps conversation history and project files as verbatim text and retrieves them with semantic search; it does not summarize or extract. Each piece of original content is a drawer, filed into a room (a topic) inside a wing (a person or project), so a search can be scoped to one wing or room instead of the whole corpus. ChromaDB is the default vector store, with Milvus, Qdrant and pgvector as alternatives, and embeddings run locally with embeddinggemma-300m or all-MiniLM-L6-v2 unless you point it at an OpenAI-compatible endpoint. Alongside the drawers sits a temporal knowledge graph in SQLite, subject-predicate-object facts with validity windows, and every agent gets its own diary.

The MCP server ships in the mempalace PyPI package as mempalace-mcp and exposes 47 tools: browsing and search, drawer reads and writes, mining a directory or a folder of transcripts, knowledge-graph queries with supersession, tunnels between wings, diaries, and an append-only coordination log that agents use to hand each other tasks and patches. Hooks for Claude Code, Codex CLI and Cursor save sessions automatically; elsewhere the agent saves when it calls a tool. By default a palace lives on one machine. You can instead run a self-hosted hub over HTTP with a bearer token and point several clients at it, and a read-only mode hides the write tools. It is MIT-licensed and free.

Quick install

Copy-paste configs are provided for all 8 supported clients. Pick your client below.

Add to ~/.claude.json

~/.claude.json
json
{
  "mcpServers": {
    "mempalace": {
      "command": "uvx",
      "args": [
        "--from",
        "mempalace",
        "mempalace-mcp"
      ],
      "env": {
        "MEMPALACE_PALACE_PATH": "<MEMPALACE_PALACE_PATH>"
      }
    }
  }
}
Or via CLI
bash
claude mcp add mempalace -- uvx --from mempalace mempalace-mcp

Available tools

ToolDescription
mempalace_statusPalace overview: total drawers, wing and room counts.
mempalace_list_wingsList all wings with their drawer counts.
mempalace_list_roomsList rooms within a wing, or every room if no wing is given.
mempalace_get_taxonomyFull wing, room and drawer-count taxonomy.
mempalace_get_aaak_specReturn the spec for AAAK, the compressed dialect MemPalace uses for diaries and compressed memories.
mempalace_kg_queryQuery an entity's relationships in the knowledge graph, optionally as of a past date.
mempalace_kg_addAdd a subject-predicate-object fact with an optional validity window.
mempalace_kg_invalidateMark a fact as no longer true.
mempalace_kg_supersedeAtomically replace a single-valued fact with its successor at a shared boundary.
mempalace_kg_timelinePaged chronological timeline of facts for one entity or the whole graph.
mempalace_kg_statsKnowledge graph overview: entities, triples, current versus expired facts, relationship types.
mempalace_traverseWalk the palace graph from a room to find connected rooms in other wings.
mempalace_find_tunnelsFind rooms that bridge two wings.
mempalace_graph_statsPalace graph overview: rooms, tunnel connections, edges between wings.
mempalace_mesh_peersShow this replica's identity and version vector plus each configured sync peer's reachability and last sync outcome.
mempalace_create_tunnelCreate an explicit tunnel linking locations in two wings.
mempalace_list_tunnelsList explicit cross-wing tunnels, optionally filtered by wing.
mempalace_delete_tunnelDelete an explicit tunnel by ID.
mempalace_list_hallwaysList within-wing entity co-occurrence links built at mine time, strongest first, paged.
mempalace_delete_hallwayDelete a hallway record by ID.
mempalace_follow_tunnelsFollow tunnels from a room and return connected rooms with drawer previews.
mempalace_searchSemantic search over past-session memories, returning matching drawers.
mempalace_check_duplicateCheck whether content already exists in the palace before filing it.
mempalace_add_drawerFile verbatim content as a new drawer, checking for duplicates first.
mempalace_checkpointSave a whole session in one call: dedupe each item, file the new ones as drawers, then write one diary entry.
mempalace_delete_drawerIrreversibly delete a drawer and its earlier revisions.
mempalace_delete_drawersBulk-delete up to 500 drawers by ID, reporting per-ID results.
mempalace_mineMine a directory into the palace as project files, chat transcripts or office documents.
mempalace_delete_by_sourceDelete every drawer mined from one source file, dry-run by default.
mempalace_syncPrune drawers whose source files were deleted, moved or gitignored, dry-run by default.
mempalace_get_drawerFetch one drawer's full content and metadata by ID.
mempalace_get_drawersFetch many drawers by ID in one call.
mempalace_list_drawersPaged list of drawers with optional wing, room and filed-at date filters.
mempalace_update_drawerUpdate a drawer's content or wing and room, keeping the replaced text as a revision.
mempalace_diary_writeAppend an entry to the calling agent's own diary, written in AAAK.
mempalace_diary_readRead the calling agent's recent diary entries.
mempalace_hook_settingsView or set auto-save hook behavior such as silent saving and desktop notifications.
mempalace_memories_filed_awayCheck whether a recent checkpoint was saved, with message count and timestamp.
mempalace_reconnectForce a reconnect to the palace database after outside changes left the in-memory index stale.
mempalace_event_appendAppend an immutable coordination event (task request, reply, patch ready) to the logstream.
mempalace_task_createCreate a complete task request for another agent and return a one-line handoff.
mempalace_event_listList coordination events with structured filters and a resume cursor.
mempalace_event_waitBlock until a matching coordination event arrives or a timeout of up to five minutes expires.
mempalace_event_ackAcknowledge a coordination event by appending an ack routed back to its writer.
mempalace_artifact_putStore exact handoff content (patch, file, log, JSON, note) up to 4 MiB and return its ID and sha256.
mempalace_artifact_getFetch a stored coordination artifact with its sha256.
mempalace_patch_submitStore a patch artifact and announce it with a patch.ready event in one call.

Required configuration

  • MEMPALACE_PALACE_PATHOptional

    Directory the palace is stored in. Defaults to ~/.mempalace/palace.

  • MEMPALACE_EMBEDDING_API_URLOptional

    OpenAI-compatible /v1/embeddings endpoint, used when embedding_model is set to openai-compat.

What you can do with it

Recover the exact wording of an old session

Mine ~/.claude/projects with mode convos, then mempalace_search scoped to one project's wing returns the original exchange, not a summary of it.

Track facts that change over time

When a project switches database or a teammate changes role, mempalace_kg_supersede closes the old fact and opens the new one at the same date, so an as-of query returns whichever was true then.

Hand work between agents on a shared hub

One agent posts a task with mempalace_task_create, another waits on it with mempalace_event_wait and replies with mempalace_patch_submit, all through the palace's append-only logstream.

FAQ

Is it free?
Yes. MemPalace is open source under the MIT license, installs from PyPI or as a Docker image, and has no paid tier. Embeddings run locally unless you configure a remote endpoint.
Does it support remote or OAuth?
There is no hosted service and no OAuth. The default is a local stdio server; for sharing you run your own hub that serves MCP over HTTP behind a bearer token, and clients' mempalace-mcp processes forward to it.
Can a team share one palace, and how does that compare to Glen?
Yes, by running a hub that several clients connect to, which you host and keep running. Content arrives through hooks or tool calls from those agents. Glen is a managed service that records agent sessions, Slack, GitHub, tickets, docs and calls into one org memory and filters each recall to what the asking user is cleared to see.
Compare MemPalace alternatives →← Browse all agent-memory servers