Mneme
About
Local-first, audit-safe memory for Claude Code and MCP clients.
Details
- Author
- TheGoatPsy
- GitHub stars
- 3
- Downloads
- 365
- Categories
- Knowledge Base, AI
Jump to
- Markdown as ground truth, no opaque binary storage
- No LLM call on the critical path; deterministic Stop capture
- Hybrid retrieval with FTS5 BM25 and opt-in local dense embeddings
- Token-efficient architecture with adaptive context budget
- Built-in <private> tag redaction with SHA256 audit log
- Temporal claim lifecycle with valid-from/to, supersedes, and provenance time-travel
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MnemeCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install the Claude Code plugin with pipx install mneme-cc-plugin && mneme install. Alternatively, install the npm package mneme-mcp-server for use with any MCP client. No cloud account is required; the vault is a local directory of markdown files.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mneme": {
"mneme": {
"command": "npx",
"args": [
"-y",
"mneme-mcp-server"
]
}
}
}
}
McpServers
{
"mneme": {
"command": "npx",
"args": [
"-y",
"mneme-mcp-server"
]
}
}
mneme
> Vault-native memory for Claude Code. Markdown is ground truth.
<p align="center">
<a href="https://pypi.org/project/mneme-core/"></a>
<a href="https://pypi.org/project/mneme-cc-plugin/"></a>
<a href="https://www.npmjs.com/package/mneme-mcp-server"></a>
<a href="https://github.com/OnourImpram/mneme/actions/workflows/ci.yml"></a>
<a href="https://github.com/OnourImpram/mneme/blob/main/LICENSE"></a>
<a href="https://doi.org/10.5281/zenodo.20674727"></a>
</p>
<p align="center"><code>pipx install mneme-cc-plugin && mneme install</code></p>
FTS5 retrieval, RRF-fused hybrid core, built-in temporal claim lifecycle with memory blame, gated knowledge-graph enrichment, zero LLM cost on Stop, token-aware adaptive context budget, agent security firewall, domain privacy modes.
Status: 3.5.0 public release. Package, plugin, runtime, citation, and documentation version sources are kept in lockstep by tools/version_bump.py (18 sources including this line, verified in CI), so no single declared version can drift. Upgrading from an earlier line: docs/UPGRADING.md.
Why mneme
Most Claude Code memory plugins store your conversation history in opaque SQLite blobs and call an LLM every time you finish a session. mneme takes the opposite stance.
- Markdown is ground truth. Your vault is a directory of plain .md files you can git diff, grep, edit, and back up.
- No LLM on the critical path. The Stop hook appends deterministically. Compression happens in the background, opt-in, with a cost cap.
- Hybrid retrieval, shipped and opt-in. The default MCP search path is FTS5 BM25. A local hashing-embedding dense backend is now a shipped opt-in feature, RRF-fused, activated with a flag. Full-profile knowledge graph enrichment (Graphiti + Neo4j) remains gated. The heavyweight packaged LEANN / sentence-transformers dense adapter is roadmap.
- Token-efficient by architecture. Shell output compression, injection deduplication, adaptive top-k, and three injection format levels save 40 to 60 percent on session token consumption.
- Privacy by default. Inline <private> tag redaction at staging write with SHA256 audit log. Zero outbound network calls except opted-in compression LLM and optional local Neo4j.
- Temporal reasoning. The deterministic claim lifecycle (valid-from/to, supersedes, as-of queries, contradiction detection, temporal blame provenance time-travel) is built in on every profile — pure SQLite, no extra dependency. Graphiti export and LLM claim extraction remain optional and never run on the Stop or critical path.
- Pattern and trajectory memory. First-class vault-markdown primitives for Signal/Action/Outcome patterns and per-session step recorders, queryable via the same retrieval pipeline.
- Agent security and domain modes. A capability firewall, data-flow taint tracking, and a human-approval gate for durable edits ship in 2.0. Domain privacy modes (clinical, security-review) block external extraction and artifact upload at the config layer. A mode can never weaken built-in privacy guarantees or disable redaction.
- Context Continuity Engine (opt-in). Proactive working-set checkpoints at configurable fill thresholds make compaction loss recoverable: after a compaction event the engine detects what the host summary dropped and re-injects only those items, salience-ranked, within a token budget. Checkpoints are plain markdown in the vault, zero-LLM, default off.
On vaults and Obsidian
A vault is simply a plain directory of markdown files. mneme requires no specific editor, no external application, and no Obsidian installation. You can work with your vault using grep, git, VS Code, or any text editor. The term "vault" is borrowed convention for a self-contained markdown directory, not a dependency on any particular tool.
Obsidian is fully optional. Because the vault is plain markdown, a user who already uses Obsidian can point it at the same directory and get rendered notes, backlinks, and graph-view navigation over the wikilinks mneme writes. The two tools coexist cleanly: mneme stores all derived state (indexes, staging, audit logs) inside a .mneme directory that Obsidian ignores as a dot folder, and mneme's indexer excludes the .obsidian settings folder from indexing, so neither tool disturbs the other. Obsidian is a convenient viewer and navigator for vault content. It is not part of mneme's capture, indexing, or retrieval path, and it must not be treated as an installation prerequisite.
How mneme compares
Memory tools in the Claude Code and agent ecosystem make different trade-offs. The table below compares architectural capabilities across the dimensions mneme commits to, and it deliberately includes the rows where another tool leads. These cells describe design properties that are publicly verifiable from each tool's documentation. They are not a benchmarked ranking. For mneme's own reproducible numbers see Reproducible Numbers; for per-tool detail and an honest "where mneme is not the best fit" list see docs/COMPETITIVE.md.
Legend: ✓ built in · gated shipped, needs an opt-in dependency or flag · ~ partial · — not available · n/a the dimension does not apply.
| Dimension | mneme | claude-mem | mem0 | Letta | Zep | Supermemory |
|---|:---:|:---:|:---:|:---:|:---:|:---:|
| Plain-markdown store you can git diff and grep | ✓ | — | — | ~ | — | — |
| Built-in <private> redaction with SHA256 audit | ✓ | — | — | — | — | — |
| Deterministic Stop capture, no LLM call | ✓ | — | n/a | n/a | n/a | n/a |
| Hybrid retrieval, FTS5 plus local dense, RRF-fused | ✓ | ~ | ~ | ~ | ✓ | ✓ |
| Temporal claim lifecycle (valid-from/to, supersedes, blame) | ✓ | — | ~ | ~ | ✓ | ~ |
| Project and code graph (tree-sitter, PR-impact) | gated | ~ | — | — | — | — |
| Adaptive token and context budget | ✓ | — | — | — | — | — |
| Agent security: capability firewall, taint, approval gate | ✓ | — | — | — | — | — |
| One-command lossless migration from claude-mem | ✓ | n/a | — | — | — | — |
| Local-first, no cloud account required | ✓ | ✓ | ~ | ✓ | — | — |
| Runs in Claude Code, Codex, Antigravity, any MCP client | ✓ | ~ | ~ | ~ | ~ | ~ |
| License | Apache-2.0 | Apache-2.0 | Apache-2.0 | Apache-2.0 | cloud | open source |
| Team memory with a web graph UI (mneme: self-hosted git sync + local console) | ✓ | — | ~ | — | ✓ | ✓ |
| Agent autonomously rewrites its own memory (mneme: policy-graduated, rollback, audit chain) | ✓ | — | ~ | ✓ | — | — |
| Auto-summarization at session end, on by default (mneme: deterministic zero-LLM) | ✓ | ✓ | — | — | ~ | ~ |
| Localized observation-prompt presets (mneme: en + tr) | ~ | ✓ | — | — | — | — |
The 3.0 line closed the former gap rows on mneme's own terms. Team memory is self-hosted (any git remote, redaction-before-share, optional age end-to-end encryption) with a loopback-only web console rather than a vendor cloud. Autonomy is policy-graduated: the agent applies operator-allowed low-risk edit classes on its own, every change is journalled for one-command rollback and chained into a tamper-evident HMAC audit log, and durable categories always keep a human in the loop. The default-on session summary is deterministic and zero-LLM — no key, no cost, no latency — with LLM compression as the opt-in richer layer. Localized presets ship for English and Turkish today (claude-mem still leads on raw language count, hence the honest ~). Where a hosted product is genuinely the better fit, docs/COMPETITIVE.md says so.
Implementation Status
An honest, at-a-glance map of what is shipped today versus what is gated behind optional infrastructure or still on the roadmap. Shipped means present in the default install path and covered by CI. Gated means implemented but inactive until you provide the optional dependency or flag. Roadmap means designed (often with a seam or protocol already in place) but not yet packaged.
| Capability | Status | Detail |
|---|---|---|
| FTS5 BM25 retrieval (mneme_search) | Shipped | default MCP search path |
| RRF fusion protocol | Shipped | mneme-core/retrieval/rrf.py; FTS5-fed by default |
| <private> redaction + SHA256 audit | Shipped | Python + TypeScript mirror; staging write |
| Zero-LLM deterministic Stop capture | Shipped | Stop hook appends a typed session doc |
| Adaptive context layer (shell compress, injection dedup, adaptive top-k) | Shipped | distill.* subsystem |
| Pattern + trajectory memory | Shipped | vault-markdown primitives |
| Claude Code / Codex / Antigravity native plugins | Shipped (native) | 5 lifecycle hooks + 2 skills + MCP |
| Open MCP adapter (Kimi, Qwen, any MCP client) | Shipped (non-native) | MCP tools only, no auto-capture |
| Background AI compression | Shipped (opt-in, default off) | monthly cost-cap ledger |
| Local dense retrieval (hashing-embedding, RRF-fused) | Shipped (opt-in) | FTS5 remains the default; sentence-transformers is an opt-in seam, not a default dependency |
| Temporal claim lifecycle + rule-based claim extraction + temporal blame | Shipped | Graphiti export gated; LLM extraction optional, never on the Stop/critical path |
| Project + code graph (mneme-graph) | Shipped (separate package) | tree-sitter Python/JavaScript/TypeScript extraction, community detection, PR-impact, entity canonicalization |
| Code memory (mneme-code) | Shipped (separate package) | AGENTS.md procedural parsing, test-output to failure memory, fix-trajectory |
| Domain modes | Shipped | vault-config user modes + CLI; clinical and security-review modes block external extraction and artifact upload; user config can never weaken a built-in privacy mode or disable redaction |
| Agent security | Shipped | capability firewall, data-flow taint tracking, human-approval gate for durable edits, poisoned-vault benchmark |
| Read-only console | Shipped | self-contained, offline, injection-safe HTML audit report |
| Connectors (Obsidian local + GitHub injected-transport) | Shipped (opt-in, default off) | redaction-before-ingest; revoke by disabling |
| KG temporal enrichment via live Neo4j/Graphiti writes (summarize/timeline) | Gated | full profile: Docker + Neo4j |
| Packaged LEANN / sentence-transformers dense adapter | Roadmap | local hashing-embedding dense backend ships; heavyweight adapter is roadmap |
| Web-based knowledge-graph visual explorer | Roadmap | planned |
| Multi-user team features (merge-conflict resolution, per-user ACL, dashboards) | Roadmap (Team) | read-only shared vaults via git remote work today |
Reproducible Numbers
These come from the in-repo benchmark suite, seeded with MNEME_BENCH_SEED=42. Benchmark A uses a 500-document corpus. Benchmark E uses its default 300-document, 30-query fixture. Reproduce with make bench-all.
Note: All figures below are deterministic regression anchors computed on a seeded synthetic corpus; they are not real-world quality measurements (see ADR-012).
| Benchmark | Metric | Result |
|---|---|---|
| A. Retrieval quality | nDCG@5, RRF fused | 0.893 (FTS5 baseline 0.801, +9.2 points) |
| B. Stop hook latency | p95 | 2 ms (constraint budget 1000 ms) |
| B. Retrieve latency | p95 | 3 ms on indexed 500-doc corpus |
| C. Shell output compression | reduction | 88 percent on redundant Bash logs |
| C. Injection deduplication | skip rate | 95 percent in tight 20-turn sessions |
| C. Compressed format | savings | keypoints 46 percent, ref 88 percent vs full |
| D. Migration tool | assertions | 4 of 4 pass (migrated, idempotent, dedup, redaction) |
| E. Head-to-head adapter | mneme leg | nDCG@5 0.831, MRR 0.772 on 300-doc fixture |
CI regression guards lock the path-scoped benchmark surface. Pull requests touching benchmarked code run the benchmark workflow. Any run that drops Benchmark A nDCG@5 by more than 0.02 or breaches the 1000 ms Stop hook p95 fails the build.
Three-Tier Install
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


