Indexes the coding-agent sessions already sitting on your disk — months of history from before you installed it — and serves them back over MCP. 3.5 GB searched in ~1.5 ms, no LLM, no embeddings.
Compartment
Summary
Encrypted, fully offline agent memory: one local vault shared by every agent on the machine, AEAD-encrypted down to the embedding vectors, searched in about 12 ms.
Features
- AEAD encryption at rest including the embedding vectors, not just the text
- 100% offline — a runtime guard aborts on any network attempt, verified in CI on three OSes
- ~12 ms full search from a RAM-resident index
- 6,718 curated facts optionally seeded at install
- Cryptographic deletion: destroy the key and the record is gone
- Hash-chained history with tamper detection; vault relocks on restart or power loss
- One transferable vault shared by every agent on the machine
- GUI with a memory map alongside the MCP server
Installation
Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.
Description
Your agent forgets you when the session ends. Compartment is a local memory vault that stops it — and unlike hosted memory services, nothing leaves the machine.
Offline by construction
There is no network call, no API key, no cloud account and no telemetry. The embedding model ships inside the package, and a runtime guard aborts on any attempted network access — CI proves it on three operating systems. A full search returns in roughly 12 ms, which is faster than the round trip a hosted memory service needs before it even starts thinking.
Encrypted properly
Every byte at rest is authenticated-encrypted, including the embedding vectors. That detail matters: most memory tools leave vectors in the clear, and vectors can be inverted back toward the text they came from. Deletion is cryptographic — destroy the record's key and it is unrecoverable. Tampering is detected, history is hash-chained, and the vault relocks on restart or power loss.
The security is not a tax on speed. Keeping plaintext off disk forces the index into RAM, and a RAM-resident index is the fastest kind there is.
Seeded, not empty
Most memory tools start blank and only become useful after weeks of use. Compartment can install with 6,718 curated facts already in the vault: physical constants and unit conversions; 800+ hardware entries with real specifications covering Apple silicon, PCs, CPUs and GPUs, phones, consoles, Raspberry Pi, storage, displays and connectors; operating-system versions and release names; network ports and HTTP; file signatures; character encodings; shell and Unix internals; git, regex, SQL and hashing; and ISO country, currency and time codes. An offline agent works better without internet access; an online one stops burning tool calls on things it could have looked up locally.
Setup
pip install compartment && compartment init, then compartment integrate claude (or the agent of your choice). One vault is shared simultaneously by every agent on the computer and is fully transferable between machines. Unlock when you want to use it, lock when you want it closed; by default an unlock persists for weeks, until you lock it or restart.
Apache 2.0 licensed. Also published on PyPI, Glama, LobeHub and mcpservers.org. A GUI with a memory map ships alongside the server.
Related MCP Servers
Weaviate's MCP server, built into the database itself — hybrid search, schema inspection, tenant listing and batch upserts at /v1/mcp, scoped by RBAC.
Google's open-source MCP server for enterprise databases — one binary that fronts AlloyDB, BigQuery, Spanner, Postgres, MySQL, Oracle, MongoDB, Snowflake and more.
A universal database MCP server — one integration for PostgreSQL, MySQL, SQL Server, SQLite, and MariaDB.
