mempalace
Summary: MemPalace is a persistent local memory server that lets you file, search, organize, and relate verbatim memories (drawers) across projects, people, and time.
Inspect the palace — overview stats (drawers, wings, rooms), list wings, list rooms, and full wing→room→drawer taxonomy.
Store and manage memories — add verbatim drawers (wing/room/content), fetch by ID, list with pagination and filters, update content or location, delete, and pre-check duplicates before filing.
Semantic search — keyword-only queries with similarity scoring, optional wing/room filters, result limits, and a cosine-distance threshold for strictness.
Knowledge graph — add subject→predicate→object facts with time windows, query an entity's relationships by direction or
as_ofdate, invalidate facts that ended, view chronological timelines, and get graph stats.Cross-domain linking — traverse the room graph, find rooms that bridge two wings, create/list/delete/follow explicit tunneling between wings, and get graph-level connection stats.
Agent diary — write and read your own AAAK-compressed journal entries across sessions, tagged by topic.
AAAK format access — retrieve the compressed memory dialect spec needed to read or write AAAK content.
Runtime controls — view or set hook behavior (silent saving, desktop toasts), check whether a checkpoint was recently saved, and force a database reconnect after external CLI/script writes.
Provides persistent memory inside VS Code Copilot Chat, allowing it to remember user preferences, notes, and mined data from local files across sessions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mempalace Remember that my favorite color is blue."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MemPalace MCP Bridge for VS Code Copilot
Give MemPalace a persistent local memory inside VS Code Copilot Chat.
This repo provides a plug-and-play bridge:
one-command setup
generated workspace MCP config
automatic MCP server startup through VS Code
full-stack verification with
verify.sha stable ChromaDB
0.6.xline for existing palaces
What you get
Persistent memory inside Copilot Chat
Fully local — no cloud, no API key, no Docker
Auto-start — no terminal, VS Code handles everything
Mine your own files — query your notes, docs, and decisions
Built-in verification —
verify.shclassifies the bridge as healthy, suspicious, or unsafe by checking the environment, the generated MCP config, real MCP startup, and palace manifest driftPalace safety checks — setup, update, verify, and runtime startup reject unsupported
chromadbversions and keep the bridge on the supported0.6.xlinePalace format safety gate — risky stable-path operations refuse palaces detected as
chroma_1_xorunknownNarrow legacy repair — a legacy
{}palace is repaired automatically only when strict invariants hold, with a timestamped SQLite backup and a post-repair smoke testUniversal runtime paths — one
.mcp.jsonfor host and DevContainer (/opt/mempalace-mcp-bridge,/mempalace/palace)Palace manifest — setup writes
mempalace-bridge-manifest.jsoninto the palace root for version traceability, recording both the runtime compatibility line and the actual storage profile (so a 1.x-migrated schema is never mislabelled as 0.6.x-native)Devcontainer integration — host palace mount shared across environments
Safe ChromaDB
0.6.x↔1.xreconstruction tooling — non-destructive and runtime-validatedReusable across environments with a shared palace
Compatibility status This bridge targets ChromaDB
0.6.xonly (chromadb>=0.6,<0.7). ChromaDB1.xuses an incompatible storage format; non-0.6.xinstalls are rejected at startup. Palaces detected aschroma_1_xorunknownformat are rejected before any read/write operation. The single exception is the narrow legacy repair, which may rewrite an untyped{}configuration only when a strict, fail-closed preflight confirms the palace matches the documented legacy shape.mainfails fast when the installedchromadbversion is outside the0.6.xrange.
This repository handles the runtime and setup layer for VS Code Copilot Chat MCP integration. For structured memory methodology, see Memory Engineering.
Related MCP server: Memorious MCP
Who this is for
This repo is for you if:
you want MemPalace working fast inside VS Code Copilot Chat
you want a local setup with no manual MCP wiring
you want a stable setup for existing palaces on Chroma
0.6.xyou prefer reproducibility over chasing the newest Chroma release
Quickstart
# 1. Clone
git clone https://github.com/apajon/mempalace-mcp-bridge.git
cd mempalace-mcp-bridge
# 2. Setup (installs uv, mempalace, creates .venv, configures .mcp.json)
bash setup.sh
# 3. Open this folder in VS Code
code .
# 4. Verify
bash verify.shImportant: open the repository root folder in VS Code (
code .from insidemempalace-mcp-bridge/). Opening a subfolder will prevent MCP from loading.
Then reload VS Code (Ctrl+Shift+P → Developer: Reload Window) if needed.
MCP Configuration
The setup script generates .mcp.json automatically. The config is deliberately
free of any user-specific path, so the same file works on the host and inside a
DevContainer:
{
"servers": {
"mempalace": {
"type": "stdio",
"command": "uv",
"args": ["run", "--directory", "/opt/mempalace-mcp-bridge", "python", "scripts/run_mcp_server.py"],
"env": {
"MEMPALACE_PALACE_PATH": "/mempalace/palace"
}
}
}
}/opt/mempalace-mcp-bridge and /mempalace are runtime paths: setup.sh
creates them as symlinks on the host (see scripts/runtime_aliases.sh) and they
are bind mounts inside a devcontainer. That is what removes every
/home/<user> and clone-specific path from the config.
uvmust be resolvable on the MCP client's PATH (that is the price of a portable config). See docs/runtime_paths.md for the complete path contract.
A ready-to-copy example is at examples/mcp/vscode.mcp.json.
See docs/mcp_vscode.md for full details and troubleshooting.
Update
git pull
bash update.shupdate.sh upgrades MemPalace, enforces the pinned ChromaDB line, checks .mcp.json paths, and runs verify.sh. It never touches ~/.mempalace/palace.
See docs/update_workflow.md for edge cases and what the script does step by step.
Verify
bash verify.shChecks that the virtual environment, MemPalace, and MCP server are all healthy. Reports actionable errors if anything is broken.
Test it in Copilot
Open Copilot Chat and try:
"Remember that I like Python."
Restart VS Code, then ask:
"What do you remember about me?"VS Code auto-starts the MemPalace MCP server when Copilot Chat opens.
Use your own data
To mine your own notes after setup:
uv run --directory . mempalace mine /path/to/your/projectThen ask Copilot about anything in those files.
Known limitations
This bridge currently targets ChromaDB
0.6.x, not ChromaDB1.xmainhard-fails outside the supportedchromadb>=0.6,<0.7rangeNo migration to ChromaDB
1.xis provided. Non-0.6.xpalaces are blocked at startup.Experimental ChromaDB
1.xinvestigation work exists outside this project's stable contract and is not part of the supported bridge workflow.Linux / WSL2 is the tested path today
Copilot behavior remains probabilistic even with MemPalace as the preferred context source
Devcontainer integration
For teams using VS Code devcontainers, the palace is mounted from the host so it persists across container rebuilds.
See docs/devcontainer_integration.md for the mount design and .devcontainer config.
Troubleshooting
Why this exists
MemPalace is powerful, but not plug-and-play in real workflows.
Setting it up requires multiple manual steps and breaks the flow of using Copilot Chat.
That friction stops most users before they get any value.
This repo removes that friction.
How it fits together
VsCode Copilot Chat
|
v
MCP Server <- launched automatically by Copilot via .mcp.json
|
v
MemPalace
|
v
Local Memory (palace) <- ~/.mempalace/palacesetup.sh generates the universal .mcp.json — no user-specific path, the bare
uv launcher, and the runtime paths /opt/mempalace-mcp-bridge and
/mempalace/palace. So Copilot can start the server without any manual
configuration, on the host and in a devcontainer alike.
If you already have a legacy .vscode/mcp.json, just run:
bash setup.sh # or: bash update.shsetup.sh / update.sh consolidate it into the universal .mcp.json and then
remove the obsolete .vscode/mcp.json so its stale clone path is never picked up.
Older configs that embedded an absolute uv path, the canonical link, or the
python -m mempalace.mcp_server launcher are migrated automatically.
The same setup step writes mempalace-bridge-manifest.json into the palace root. The file is intentionally small and easy to inspect manually: it records the bridge version, MemPalace version, ChromaDB version, Python version, storage backend and format, the supported compatibility line, and the creation timestamp. If a valid manifest already exists, setup preserves it. If the file exists but is malformed, setup replaces it with a fresh valid manifest.
Memory Engineering
Advanced structured memory patterns — wings, rooms, retrieval order, persistence rules, deduplication — now live in a dedicated repository:
This includes:
structured memory strategy for engineering workflows
worked examples (two-wing / three-room setup)
semantic deduplication reference
This repository focuses solely on MCP bridge setup and runtime integration. The methodology is not duplicated here.
Documentation
Setup & runtime
Installation: docs/installation.md
Runtime paths (host + DevContainer): docs/runtime_paths.md
Canonical bridge link: docs/canonical_link.md
MCP / VS Code config: docs/mcp_vscode.md
Update workflow: docs/update_workflow.md
Devcontainer integration: docs/devcontainer_integration.md
Troubleshooting: docs/troubleshooting.md
Architecture & internals
Architecture overview: docs/architecture.md
Error model: docs/error_model.md
Support matrix: docs/support_matrix.md
Limitations: docs/limitations.md
ChromaDB reconstruction (0.6.x → 1.x)
CLI usage: docs/cli_usage.md
Palace format detection: docs/palace_format_detection.md
Reconstruction workflow: docs/chromadb_reconstruction_workflow.md
Migration guide: docs/chromadb_reconstruction_migration.md
Compatibility
Linux (tested on Ubuntu 24.04 via WSL2)
VS Code with GitHub Copilot Chat
curlrequired (setup.shuses it to installuv)ChromaDB
0.6.xline pinned intentionally viachromadb>=0.6,<0.7
Copilot context guidance
Copilot is configured to use MemPalace as its primary context source via
.github/copilot-instructions.mdQuery order: MemPalace project wing -> shared wings ->
docs/architecture.md->README.md-> workspace searchThis improves first-response relevance. It is not a strict guarantee - Copilot behavior is probabilistic
Memory Engineering (external)
Strategy, examples, deduplication: mempalace-memory-engineering
Related
MemPalace: https://github.com/milla-jovovich/mempalace
ChromaDB: https://github.com/chroma-core/chroma
Memory Engineering: https://github.com/apajon/mempalace-memory-engineering
Available Tools
29 toolsmempalace_add_drawerB
File verbatim content into the palace. Checks for duplicates first.
Inputs: wing (required), room (required), content (required), source_file, +1 more.
mempalace_check_duplicateC
Check if content already exists in the palace before filing
Inputs: content (required), threshold.
mempalace_create_tunnelA
Create a cross-wing tunnel linking two palace locations. Use when content in one project relates to another — e.g., an API design in project_api connects to a database schema in project_database.
Inputs: source_wing (required), source_room (required), target_wing (required), target_room (required), +3 more.
mempalace_delete_drawerA
Delete a drawer by ID. Irreversible.
Inputs: drawer_id (required).
mempalace_delete_tunnelB
Delete an explicit tunnel by its ID.
Inputs: tunnel_id (required).
mempalace_diary_readA
Read your recent diary entries (in AAAK). See what past versions of yourself recorded — your journal across sessions.
Inputs: agent_name (required), last_n.
mempalace_diary_writeA
Write to your personal agent diary in AAAK format. Your observations, thoughts, what you worked on, what matters. Each agent has their own diary with full history. Write in AAAK for compression — e.g. 'SESSION:2026-04-04|built.palace.graph+diary.tools|ALC.req:agent.diaries.in.aaak|★★★'. Use entity codes from the AAAK spec.
Inputs: agent_name (required), entry (required), topic.
mempalace_find_tunnelsC
Find rooms that bridge two wings — the hallways connecting different domains. E.g. what topics connect wing_code to wing_team?
Inputs: wing_a, wing_b.
mempalace_follow_tunnelsA
Follow tunnels from a room to see what it connects to in other wings. Returns connected rooms with drawer previews.
Inputs: wing (required), room (required).
mempalace_get_aaak_specA
Get the AAAK dialect specification — the compressed memory format MemPalace uses. Call this if you need to read or write AAAK-compressed memories.
Inputs: no named parameters.
mempalace_get_drawerA
Fetch a single drawer by ID — returns full content and metadata.
Inputs: drawer_id (required).
mempalace_get_taxonomyC
Full taxonomy: wing → room → drawer count
Inputs: no named parameters.
mempalace_graph_statsA
Palace graph overview: total rooms, tunnel connections, edges between wings.
Inputs: no named parameters.
mempalace_hook_settingsA
Get or set hook behavior. silent_save: True = save directly (no MCP clutter), False = legacy blocking. desktop_toast: True = show desktop notification. Call with no args to view.
Inputs: silent_save, desktop_toast.
mempalace_kg_addA
Add a fact to the knowledge graph. Subject → predicate → object with optional time window. E.g. ('Max', 'started_school', 'Year 7', valid_from='2026-09-01').
Inputs: subject (required), predicate (required), object (required), valid_from, +1 more.
mempalace_kg_invalidateB
Mark a fact as no longer true. E.g. ankle injury resolved, job ended, moved house.
Inputs: subject (required), predicate (required), object (required), ended.
mempalace_kg_queryA
Query the knowledge graph for an entity's relationships. Returns typed facts with temporal validity. E.g. 'Max' → child_of Alice, loves chess, does swimming. Filter by date with as_of to see what was true at a point in time.
Inputs: entity (required), as_of, direction.
mempalace_kg_statsA
Knowledge graph overview: entities, triples, current vs expired facts, relationship types.
Inputs: no named parameters.
mempalace_kg_timelineA
Chronological timeline of facts. Shows the story of an entity (or everything) in order.
Inputs: entity.
mempalace_list_drawersB
List drawers with pagination. Optional wing/room filter. Returns IDs, wings, rooms, and content previews.
Inputs: wing, room, limit, offset.
mempalace_list_roomsA
List rooms within a wing (or all rooms if no wing given)
Inputs: wing.
mempalace_list_tunnelsB
List all explicit cross-wing tunnels. Optionally filter by wing.
Inputs: wing.
mempalace_list_wingsA
List all wings with drawer counts
Inputs: no named parameters.
mempalace_memories_filed_awayB
Check if a recent palace checkpoint was saved. Returns message count and timestamp.
Inputs: no named parameters.
mempalace_reconnectA
Force reconnect to the palace database. Use after external scripts or CLI commands modified the palace directly, which can leave the in-memory HNSW index stale.
Inputs: no named parameters.
mempalace_searchA
Semantic search. Returns verbatim drawer content with similarity scores. IMPORTANT: 'query' must contain ONLY search keywords. Use 'context' for background. Results with cosine distance > max_distance are filtered out.
Inputs: query (required), limit, wing, room, +2 more.
mempalace_statusA
Palace overview — total drawers, wing and room counts
Inputs: no named parameters.
mempalace_traverseA
Walk the palace graph from a room. Shows connected ideas across wings — the tunnels. Like following a thread through the palace: start at 'chromadb-setup' in wing_code, discover it connects to wing_myproject (planning) and wing_user (feelings about it).
Inputs: start_room (required), max_hops.
mempalace_update_drawerA
Update an existing drawer's content and/or metadata (wing, room). Fetches existing drawer first; returns error if not found.
Inputs: drawer_id (required), content, wing, room.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 29 tools
Each tool has a clearly distinct purpose, covering drawers, tunnels, diary, knowledge graph, and settings. Descriptions are detailed and disambiguate similar operations like find_tunnels vs list_tunnels.
All tools follow a consistent 'mempalace_verb_noun' pattern with underscores. Verbs are uniform (add, get, list, delete, update, etc.) and nouns are clear.
29 tools is high but justified by the broad scope (drawers, tunnels, knowledge graph, diary, settings). Each tool serves a distinct function, though the count could be slightly reduced by merging some rarely used ones.
The tool surface covers CRUD for drawers, tunnels, and knowledge graph, plus extra features. Minor gaps exist, such as missing update_tunnel and batch operations, but core workflows are fully supported.
Maintenance
Related MCP Connectors
Private memory for AI agents: save and recall facts across Claude Code, Codex, Cursor and ChatGPT.
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Private persistent memory for Claude, ChatGPT & Gemini via MCP - semantic search, zero-code setup.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA mem0-like memory system for GitHub Copilot that provides persistent knowledge storage and retrieval capabilities using local ChromaDB.MIT
- AlicenseAqualityDmaintenanceProvides AI assistants with long-term semantic memory capabilities through local vector-based storage. Enables storing, recalling, and managing information across sessions with complete privacy using ChromaDB, with no data ever leaving your machine.322 PyPI9MIT
- AlicenseBqualityDmaintenanceEnables GitHub Copilot to query local ChromaDB instances to retrieve relevant documents and context for AI conversations. It allows users to search vector collections using natural language tools directly within VS Code.1ISC
- AlicenseNot gradedqualityDmaintenanceEnables persistent memory management using ChromaDB vector store, with Docker support for easy deployment.8 npm5MIT