Compartment
Lets your AI agent keep encrypted, fully offline memory that carries across sessions, projects and agents.
576 stars on GitHubby MaxFreedomPollardLicense Apache-2.0Updated last month
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add compartment -- uvx compartment serve
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Remember that I prefer figures before conclusions in client reports.
What did I decide about the Airtable setup?
What it is
Compartment stores what your agents learn in one encrypted vault on your computer. Each memory is a single claim with a source and date, and can expire. Recall uses a hybrid keyword and vector search that answers in about 12 ms. There is no account, API key or network use.
What it can do
memory_store_many: store a batch of memoriesmemory_recent: list the newest memoriesmemory_link: record a relation between thingsmemory_relations: look up relations by entity or datecompartment init: create the vaultcompartment integrate: connect Claude, Hermes or OpenClaw
When to use
- βΊWhen you want your agent to remember your preferences in every later session
- βΊWhen you want agents on one computer to share the same memory
- βΊWhen you want memory that expires after a date, such as a door code
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
AgentDB Memory PatternsLets your agent remember conversations and context across sessions, using AgentDB as its persistent memory store.memory-systemHelps your agent remember your preferences, project conventions and past decisions across separate sessions using a simple memory index.agent-safla-neuralTeaches your agent to build AI systems that remember past work, learn from feedback and keep context across sessions.Frequently asked questions
Is it free and open source?
Yes. The readme shows a license badge and says there is no account or cloud.
Is the data encrypted?
Yes. Everything on disk is encrypted, including embedding vectors, and only your passphrase opens it.
Does it use the network?
No. The readme says no network and no telemetry.
Which agents does it work with?
Claude Code, Claude Desktop, Hermes Agent, OpenClaw, Cursor, Codex and other MCP clients.
Does it use an LLM inside?
No. Embeddings run locally with a bundled model and the host model decides what to store.
Can I remove stored memories?
Memories can expire on a date, and a newer opinion replaces an older one.
If it does not work
- βΊRun compartment init first, then connect an agent with compartment integrate claude.
- βΊIf recall returns nothing, check that the vault is unlocked.
- βΊRun compartment status to see the total and your own memory counts.
5 new skills a week. 1 minute to read.