mnema — Claude Code MCP server: what it does, how to install
A local-first verified memory store for AI agents. Keeps context in ~/.mnema and shares state across clients without mandatory cloud sync.
Open on GitHubWhat mnema does
Mnema provides a durable memory store for AI agents over MCP. Data lives locally inside ~/.mnema in an append-only format. Nothing leaves your machine. The bridge connects to remote servers only when MNEMA_URL and MNEMA_TOKEN are passed explicitly.
The server exposes four tools: consult to query prior context, learn to store a fact, related to walk graph connections, and list to browse items. Search merges lexical matching with spreading activation on the graph. Every result includes confidence bounds. The storage core is formally verified with Kani proofs, a TLA⁺ model, and 250+ test cases.
Prebuilt releases only target macOS universal and Linux x86_64. Other systems must build the binary from source. Once installed, Claude Code connects via claude mcp add.
What it helps with
- retain project knowledge across separate coding sessions
- query historical decisions before modifying code
- explore linked nodes in the agent knowledge graph
- share memory across team members via an external endpoint
Example prompts for the agent
- Run consult in mnema to retrieve our staging database configuration
- Record with learn: port 8080 is reserved for auth service
- Execute related on user_session to view connected graph items
How to install mnema
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mnema
How to install mnema in Claude Code?
First, download the executable by running curl -fsSL https://mnema.zimac.ai/install.sh | sh. Then register the server using claude mcp add mnema -- mnema mcp.
What tools does mnema provide?
The server provides four tools: consult for contextual lookup, learn to persist durable facts, related to inspect neighboring nodes, and list to view recent entries.
Where is the memory stored?
Files reside on your machine in ~/.mnema as append-only segments. No information is transmitted externally unless you configure MNEMA_URL and MNEMA_TOKEN to point to a remote store.