Local-first persistent memory plugin for Claude Code storing session lessons as markdown in an Obsidian vault.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
The install command below didn't complete successfully in our automated test.
pipx install memem/bin/bash: line 1: pipx: command not found
This is an experimental automated check and can have false negatives β missing environment variables, a slow cold install, etc. It doesnβt necessarily mean somethingβs wrong. Last checked 1mo ago.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Cortex Plugin.
Persistent, self-evolving memory for Claude Code. Stop re-explaining your project every session.
For LLM/AI tool discovery, see llms.txt.
memem is a Claude Code plugin that gives Claude persistent memory across sessions. An event-triggered miner (Stop-hook β detached mine_delta subprocess) extracts durable lessons (decisions, conventions, bug fixes, preferences) from each new conversation turn, stores them as markdown in an Obsidian vault, and automatically surfaces relevant ones as an Active Memory Slice working state. An explicit narrative assembly path still exists, but the default runtime context is slice-first.
It's local-first: no cloud services, no API keys required, no vendor lock-in. Everything lives in ~/obsidian-brain/memem/memories/ as human-readable markdown.
v2.9.1 activates the path-scoped retrieval that shipped dormant in v2.9.0: recall now auto-derives paths_context from the current session so the paths: bonus actually fires without any caller action. The new recent_session_paths() in memem/transcripts.py resolves session_id β JSONL via a direct CWD-slug stat first (O(1)), falling back to next(base_dir.rglob(...), None) (short-circuit on first match); it then tail-reads the last 512 KB of the file (~5 ms even on a 64 MB session, vs ~390 ms for a full read), walks assistant turns most-recent-first, and extracts the top-N deduplicated file paths from Read/Edit/Write/NotebookEdit file_path inputs and Bash command first-line path tokens via _extract_paths_from_content_blocks(). The auto-derivation is wired into active_memory_slice (MCP tool), the auto-recall.sh UserPromptSubmit hook, and the cli.py slice path; caller-supplied paths_context still wins; derivation failures are logged at debug/warning and never propagate β any exception returns [] silently. No API or schema changes; 12 new tests in tests/test_recent_paths.py cover extraction, recency/dedup/limit, missing/malformed sessions, and end-to-end active_memory_slice integration. See CHANGELOG for full details.
v2.9.0 trims the MCP surface from 14 tools to 6 β removing memory_recall, memory_graph, memory_graph_audit, memory_graph_rebuild, memory_list, memory_import, context_assemble, and memory_remind from the MCP layer (CLI and library equivalents remain for all eight) β and cuts total tool-description schema size 57% (12,827 β 5,474 chars). transcript_search is backed by a persistent FTS5 index at ~/.memem/transcript_fts.db (one row per Q/A turn-pair, index_session() called incrementally from mine_delta; old single-row-per-session indexes auto-migrate; the grep fallback is bounded by size/count/time caps and never silently truncates). Path-scoped memories arrive via a new paths: frontmatter field and a 1.05Γ w_path bonus in retrieve() for memories whose path globs match paths_context; memory_save gains an optional paths param; active_memory_slice accepts paths_context; and the miner annotates candidates with paths: when β₯2 paths each appear β₯3 times. Telemetry isolation is hardened via MEMEM_TELEMETRY_SOURCE. Closed-loop evaluation tooling is wired: a canary --doctor check, --dual-engine replay, and deferred-gate comments in lessons.py / feedback.py. Benchmark 79.3% (119/150), all acceptance gates pass. See CHANGELOG for full details.
v2.8.0 retires the L0βL3 layer system and replaces it with a context model that reflects how memory actually works. The starting point was honest data: 462 memories had been auto-classified L0 ("always relevant"), which was not a layer, it was a full briefing that no session could absorb. The new model has three tiers: (1) profiles β schema-shaped always-injected documents per user (profile_user.md: Preferences / Conventions / Environment) and per project (profile_<project>.md: Identity / Stack & Structure / Conventions), stored at <vault>/memem/profiles/, populated by the miner's new PROFILE reconcile op and bootstrappable from your existing vault via --migrate-layers; (2) working rules β type:procedural memories (failureβfix patterns, corrections) ranked by citation count and injected as a ## Working rules block at session start (β€1200 chars); (3) episode index β the existing 25-entry episodic title index, unchanged. Consolidation logic moves from the deleted consolidation.py into the dreamer's cluster_merge category with a bug fix: only the members listed in supporting_ids are bi-temporally invalidated after a successful merge, not all cluster members unconditionally. The dreamer gains reflection_with_citations (synthesizes type:insight memories from episodic clusters) and tense_rewrite (corrects expired future-tense memories) as additive-safe categories that fire automatically every 25 substantive mining deltas via --dream --safe-auto. The 18-query benchmark improved to 80.0% (120/150) after L0 MMR pre-seeding was removed β the anchor mechanism was penalizing relevance, not helping it (measured during release validation; up from 79.3%/119/150 in v2.7.0). See CHANGELOG for full details.
v2.7.0 makes the miner smarter about what it writes: instead of adding every extracted candidate blindly, it compares each one against its nearest vault neighbors in a single batched Haiku call and picks ADD, UPDATE, SUPERSEDE, or NOOP with safety rails (protected-target guard, truncation guard, β€5 destructive ops per delta, global fallback to ADD-all on any exception). The previously unreachable bi-temporal invalidation path (invalid_at / replaced_by) is now exercised by SUPERSEDE ops. Every retrieval is now linked to a session id, and the miner scans assistant text for cited memory ids and writes {"type":"citation"} rows to .recall_log.jsonl β closing the feedback loop so --analyze-recalls shows citation rate per tool and the dreamer demotion guard is live again after sitting inert since v2.5. Additional improvements: key expansion (miner emits up to 8 synonyms/aliases per memory, FTS+BM25 indexed), tool-trace digest (Bash/Edit decisions are now minable), memory_save three-band dedup (merge instead of reject for 0.70β0.92 near-duplicates), --purge-contaminated --exclude, and flock-safe feedback EMA writes. Benchmark unchanged at 79.3%. See CHANGELOG for full details.
v2.6.0 unifies retrieval: a single three-way RRF engine (cosine + BM25 + FTS5) now serves every call path β hook, MCP tools, and CLI. The unbenchmarked heuristic engine that served memory_search/memory_recall since v2.4.0 is deleted (β218 LOC: 5-signal re-ranker, ngram union, file-scan fallback, and a 15% feedback weight reading a file nothing ever wrote). Deprecated and invalidated memories are now excluded from the retrieval index at vault-load time, fixing a leak via the hook path. The scope_id parameter changes from a hard filter to a soft ranking bonus β cross-project results that score well now appear. The 18-query benchmark is maintained at β₯74% precision (79.3%, measured during release validation). See the A/B comparison report for transparency on result-set divergence vs the prior engine, and CHANGELOG for full details.
v2.5.0 is a maintenance release: 24 audited defects fixed and ~2,256 LOC of dead code removed. No new memory capabilities. Key fixes: self-mining contamination guard (stale-sweep now skips headless mining transcripts), RRF/MMR scoring bugs fixed (18-query benchmark measured during release validation: 74.7% β 78.7%), embedding index staleness fixed (incremental upsert + mtime invalidation + cross-process flock), double access-count stores eliminated (telemetry sidecar is now the single store), episode deduplication (one stable-id episode per session). Removed: compaction.py, reaper.py, attribution pipeline, storage.py, 8 dead settings knobs, and hybrid injection mode (was documented but never implemented). New CLI: python3 -m memem.server --purge-contaminated [--apply]. See CHANGELOG for full details.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/tt-wang-cortex-plugin)<a href="https://allmcps.com/mcp/tt-wang-cortex-plugin"><img src="https://allmcps.com/api/badge/tt-wang-cortex-plugin?style=directory" alt="Cortex Plugin on AllMCPs" /></a>