High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.
Persistent memory and MCP server for Claude Code
Mnemo gives Claude Code a memory that survives across sessions. It captures memories locally, stores them in SQLite, and recalls them with semantic search through an MCP server and CLI commands.
Builders who use Claude Code, Cursor, or other MCP-capable agents and want reusable project memory.
You can reuse decisions, conventions, and preferences without re-explaining them to your agent.
What it does
Persistent memory store
Saves memories locally in `memory.db` so they survive between sessions.
Semantic recall
Uses embeddings and HNSW search to find memories by meaning, not just keywords.
Claude Code skill and MCP tools
Adds a `/mnemo` skill and `mnemo_*` MCP tools that Claude Code can use when relevant.
Auto-capture hooks
Can watch edits and capture changes to files like `CLAUDE.md`, `AGENTS.md`, and decision docs.
Cross-agent tracking
Shows which agent captured what, including Claude Code and Cursor.
Backup, restore, and sync
Supports timestamped backups, restore, migration, and encrypted multi-machine sync.
Knowledge graph
Lets you create entities, links, and memory attachments for related context.
How to get it
- 1Run
mnemo entity create AuthService -t service -d "login + tokens" mnemo entity link Billing requires AuthService mnemo entity attach <memoryId> AuthService mnemo entity show AuthService --depends # memories, relations, and what depends on it
- 2Run your own sync backend with npx @mnemo-mcp/sync-server — it never sees plaintext.
export MNEMO_ENCRYPTION_KEY="a strong passphrase" # memory.db is then AES-256-GCM at rest
- 3Anything you write to those files becomes a project memory automatically. Disable with…
score = 0.7 × cosine_similarity + 0.2 × recency + 0.1 × access_boost
- 4Recency decays with a 30-day half-life. Access boost saturates at 20 reads.
@mnemo-mcp/core — pure TS memory engine (embeddings, HNSW, store, graph, plugins, crypto) @mnemo-mcp/server — MCP server (drop into Claude Code; 9 tools) @mnemo-mcp/cli — terminal commands + hook handlers + init @mnemo-mcp/sync-server — self-hostable, end-to-end-encrypted sync backend
- 5See ROADMAP.md for design notes on each.
npm install npm run build npm test # fast (150+ tests, hash embedder) MNEMO_TEST_ONNX=1 MNEMO_E2E=1 npm test # full incl. real ONNX (~5s) npm run lint
README
Mnemo
Persistent memory for Claude Code. Your AI never starts from scratch again.

Mnemo gives Claude Code a brain that survives across sessions. It captures decisions, conventions, and preferences — and recalls them by meaning, on demand, with sub-100ms semantic search.
Install
# install the CLI
npm install -g @mnemo-mcp/cli
# install Mnemo into Claude Code (skill + MCP server)
mnemo init
# (optional) also wire auto-capture hooks
mnemo init --with-hooks
# verify
mnemo doctor
After mnemo init, restart Claude Code. The /mnemo skill and the mnemo_* MCP tools are now available — Claude will use them automatically when relevant.
Use it from the terminal too
mnemo remember "our API auth uses OAuth2 with refresh tokens every 30min"
mnemo remember --global "I prefer pnpm over npm"
mnemo recall "what's our auth pattern?"
mnemo recall "auth" --explain # show the ranking breakdown per hit
mnemo list
mnemo stats
mnemo forget <id>
mnemo backup # timestamped snapshot
mnemo restore mnemo-backups/<file>.json
mnemo migrate # rebuild the index after an embedder change
mnemo serve # localhost web dashboard
mnemo watch docs/ # auto-capture matching files as they change
Knowledge graph (v2.1)
mnemo entity create AuthService -t service -d "login + tokens"
mnemo entity link Billing requires AuthService
mnemo entity attach <memoryId> AuthService
mnemo entity show AuthService --depends # memories, relations, and what depends on it
Cross-agent, plugins, and sync (v2.3–v2.5)
mnemo agents # who captured what (claude-code, cursor, aider…)
mnemo plugins # discovered embedder/ranker/hook plugins
# end-to-end encrypted multi-machine sync (server stores ciphertext only):
export MNEMO_ENCRYPTION_KEY=… MNEMO_SYNC_URL=https://your-host MNEMO_SYNC_TOKEN=…
mnemo sync push # encrypt locally → upload
mnemo sync pull # download → decrypt → import
Run your own sync backend with npx @mnemo-mcp/sync-server — it never sees plaintext.
Encryption at rest
export MNEMO_ENCRYPTION_KEY="a strong passphrase" # memory.db is then AES-256-GCM at rest
What Mnemo solves
Claude Code forgets everything when the session ends. CLAUDE.md partially helps — it's a static blob loaded on every turn — but it grows unwieldy fast and can't answer "do we have a precedent for X?"
Mnemo gives you semantic, on-demand memory:
CLAUDE.md | Mnemo | |
|---|---|---|
| Capacity | A handful of paragraphs before token cost hurts | Tens of thousands of memories |
| Retrieval | Always loaded, every turn | On demand, by meaning |
| Updates | You edit a file by hand | Captured automatically or via /teach |
| Cross-project | Per-project only | Project + global tiers |
| Forgetting | Manually delete lines | mnemo forget <id> or /forget |
How it works
Claude Code session
├── /mnemo skill ← teaches Claude when to call the tools
├── @mnemo-mcp/server server ← exposes recall/remember/forget/list/stats
└── @mnemo-mcp/cli hooks ← session-start, pre-task, post-edit auto-wiring
│
▼
@mnemo-mcp/core
├── ONNX all-MiniLM-L6-v2 (384-dim embeddings, ~25MB, lazy)
├── HNSW vector index (sub-100ms recall at 50k memories)
└── sql.js (WASM SQLite) (~/.mnemo/memory.db)
Everything is local-first. No daemon. No cloud account. No telemetry.
Auto-capture rules
By default the post-edit hook captures any change to:
CLAUDE.md,AGENTS.md,GEMINI.md*.adr.mddocs/decisions/**docs/adr/**
Anything you write to those files becomes a project memory automatically. Disable with mnemo init (no --with-hooks).
Recall scoring
score = 0.7 × cosine_similarity + 0.2 × recency + 0.1 × access_boost
Recency decays with a 30-day half-life. Access boost saturates at 20 reads.
Layout
@mnemo-mcp/core — pure TS memory engine (embeddings, HNSW, store, graph, plugins, crypto)
@mnemo-mcp/server — MCP server (drop into Claude Code; 9 tools)
@mnemo-mcp/cli — terminal commands + hook handlers + init
@mnemo-mcp/sync-server — self-hostable, end-to-end-encrypted sync backend
Roadmap
- ✅ v0.1 — core engine + CLI
- ✅ v0.2 — MCP server (5 tools)
- ✅ v0.3 — hooks (session-start, pre-task, post-edit)
- ✅ v0.4 —
/mnemoskill - ✅ v1.0 —
mnemo init, beefier doctor, CI, polish - ✅ v1.1 — team mode, channels, secret guard, ingest, why, digest, dead, cite, interactive recall, JSON output, completions
- ✅ v1.2 — JSON mode in all commands, idempotent init, doctor robustness
- ✅ v2.0 — procedural memory:
mnemo procedure record/run/suggest/done+ 2 new MCP tools + auto-suggestion viapre-taskhook - ✅ v2.1 (2.1.0) — quality of life:
backup/restore,migrate,watch,servedashboard,recall --explain/--stream, encryption at rest, int8 quantization - ✅ v2.1 (2.2.0) — knowledge graph (entities + relations + BFS depends-on + 2 MCP tools)
- ✅ v2.2 (2.3.0) — self-reflective learning (auto-capture anti-patterns from
Stop/SubagentStophooks) - ✅ v2.3 (2.4.0) — cross-agent memory (per-agent attribution,
mnemo agents, standard MCP discovery) - ✅ v2.4 (2.5.0) — plug-in framework (custom embedders, rankers, capture rules, hooks)
- ✅ v2.5 (2.6.0) — optional end-to-end-encrypted sync (
@mnemo-mcp/sync-server+mnemo sync) + web UI
See ROADMAP.md for design notes on each.
Development
npm install
npm run build
npm test # fast (150+ tests, hash embedder)
MNEMO_TEST_ONNX=1 MNEMO_E2E=1 npm test # full incl. real ONNX (~5s)
npm run lint
License
MIT — see LICENSE.
Files in the repo
- .github
- docs
- e2e
- packages
- .gitignore
- CHANGELOG.md
- demo.gif
- DEMO.md
- demo.mp4
- demo.tape
- LICENSE
- NOTICES
- package-lock.json
- package.json
- README.md
- ROADMAP.md
- tsconfig.base.json
- vitest.config.ts
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More connectors

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code
Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.
Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.
Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.
20 MB lightweight cross-platform database client for 90+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 90+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP Server。