# mnema

A local-first verified memory store for AI agents. Keeps context in ~/.mnema and shares state across clients without mandatory cloud sync.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed
- Author: Zimac-AI
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Zimac-AI/mnema
- Updated: 2026-07-12
- HTML: https://affpapa.org/en/nevibecode/mcp/mnema

## What it 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`.

## Requirements
- Environment variables: `MNEMA_DATA_DIR`, `MNEMA_URL`, `MNEMA_TOKEN` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- 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
- 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

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
