Memorx
SOTA developer memory system β local MCP server in Go that gives any coding CLI persistent, project-scoped session/feature memory
Ask AI about Memorx
Powered by Claude Β· Grounded in docs
I know everything about Memorx. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
memorX
Your AI picks up exactly where you left off β across commits, plans, and sessions.
One command to install. Zero-friction capture via Claude Code hooks. A live local dashboard so you can see your AI's memory. Single Go binary, zero runtime dependencies, 100% local.
go install github.com/arbazkhan971/memorx/cmd/devmem@latest
memorx install # wires Claude Code hooks + MCP server in one shot
memorx dashboard # open http://127.0.0.1:37778 β live memory stream
That's it. Open Claude Code and every session automatically knows where you left off.
Why memorX
Every AI coding CLI (Claude Code, Codex, Cursor, Windsurf, Gemini CLI) suffers from amnesia. Close a session, lose all context. Switch tools, start from scratch. You waste 5β10 minutes per session re-explaining your project, decisions, and progress.
memorX fixes this. One binary, works everywhere, remembers everything.
What you get
- Zero-friction capture β 5 Claude Code lifecycle hooks auto-capture sessions, commits, and decisions. No tool calls required.
- Live local web dashboard β
memorx dashboardopens a real-time web UI showing active feature, plan progress, memory stream, git timeline, and search. Embedded in the binary, no Node or Bun required. - Cross-process live event stream β SSE-driven live updates work across the hook subcommand, the MCP server, and the dashboard via a tiny file-based event log at
.memory/events.jsonl. - Auto-briefing on every session β the
SessionStarthook injects a "welcome back" summary into every new Claude Code conversation. - Transcript summarization β on
SessionEnd, memorX reads the Claude Code JSONL transcript and stores a rule-based summary (tool counts, edited files, commits, decisions). No LLM call, fully deterministic. - Git-native β
PostToolUsehook watches forgit commitand auto-syncs commits with intent classification (feature/bugfix/refactor), matching commits to plan steps. - Plan persistence β plans survive across sessions, auto-track progress from commits.
- Bi-temporal facts β tracks what's true now AND what was true before (contradiction resolution, time-travel queries).
- Memory linking β A-MEM/Zettelkasten-style connections between related memories.
- 3-layer progressive-disclosure search β
memorx_search_indexβmemorx_timelineβmemorx_get_memory, token-efficient recall. - Privacy tags β wrap anything in
<private>β¦</private>and it's stripped at the storage boundary. Works uniformly across hooks, MCP tools, and import. - Universal MCP β works with Claude Code, Cursor, Codex, Windsurf, Gemini CLI β any MCP client.
Install
One command (recommended)
go install github.com/arbazkhan971/memorx/cmd/devmem@latest
memorx install
memorx install detects Claude Code, writes hook entries to ~/.claude/settings.json, registers the MCP server via claude mcp add, and creates ~/.memorx/settings.json. Idempotent and non-destructive β re-running is safe and existing non-memorx hooks are preserved.
Verify
memorx doctor # self-test: DB, hooks, binary on PATH
Manual setup (other MCP clients)
# Claude Code
claude mcp add -s user --transport stdio memorx -- memorx
# Cursor β add to .cursor/mcp.json:
{ "mcpServers": { "memorx": { "command": "memorx", "transport": "stdio" } } }
Dashboard
memorx dashboard # :37778 by default
memorx dashboard --port 8080 # custom port
The dashboard shows:
- Active feature with branch + plan progress bar
- Memory counts (features, notes, facts, commits, sessions)
- Live event stream (updates in real-time as hooks and MCP tools write)
- Recent memories with type tags (decision / blocker / note / ...)
- Recent commits with intent tags (feat / fix / refactor / ...)
- Search box β live full-text search across all notes
Pure Go net/http + embedded HTML via //go:embed. No Node, no bundler, no external process.
How the live stream works across processes
The MCP server, hook subcommands, and dashboard all run in separate processes. They share updates through a tiny JSONL event log at .memory/events.jsonl:
- Any process that publishes an event (hook, MCP tool) appends a line to the log.
- The dashboard's background goroutine tails the file and re-publishes each new entry into its in-process broker.
- SSE subscribers on
/api/eventsreceive the live stream.
The log is opportunistically truncated to the last 256 events when it exceeds 1 MB, so it never grows unbounded.
How it works
ββ Claude Code session ββββββββββββββββββββββββββββββββββββββ
β β
β SessionStart βββββββΆ memorx hook session-start β
β ββΆ briefing injected into context β
β β
β you prompt βββββββββΆ memorx hook user-prompt-submit β
β ββΆ observation stored (auto) β
β β
β Claude runs Edit βββΆ (captured by transcript) β
β β
β Claude runs Bash βββΆ memorx hook post-tool-use β
β (git commit) ββΆ sync commits, classify intent, β
β match to plan steps β
β β
β SessionEnd βββββββββΆ memorx hook session-end β
β ββΆ transcript summarized, β
β session closed with summary β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
.memory/memory.db (SQLite, WAL)
.memory/events.jsonl (live event log)
β
βΌ
memorx dashboard (localhost:37778)
All hooks are subcommands of the single memorx binary β they share the same DB connection pool and the same code as the MCP server. No separate worker process, no port conflicts, no orphan daemons.
CLI reference
memorx Run MCP stdio server (default, for MCP clients)
memorx install Install hooks & MCP config into Claude Code
memorx dashboard [--port N]
Start local web dashboard (default :37778)
memorx hook <event> Run a Claude Code lifecycle hook
Events: session-start, user-prompt-submit,
post-tool-use, stop, session-end
memorx doctor Self-test: DB, hooks, binary on PATH
memorx version Print version
memorx help Show this help
MCP tools (76 tools)
memorX exposes 76 MCP tools covering core memory, search, git sync, plans, sessions, analytics, time-travel, predictive intelligence, self-healing, multi-agent, compliance, and workflow integration. Highlights:
| Tool | What it does |
|---|---|
memorx_briefing | Quick "welcome back" β what you were working on |
memorx_remember | Save a note, decision, blocker, progress update, or next step. Auto-links to related memories |
memorx_search | FTS5 + trigram search across all memory types |
memorx_search_index | New. Compact hit index (~30 tokens/hit) β filter before fetching |
memorx_timeline | New. Chronological window around a memory or the recent feed |
memorx_get_memory | New. Full detail for a specific memory ID with links |
memorx_observe | New. Lightweight observation capture (used by hooks) |
memorx_sync | Pull git commits, classify intent, auto-match to plan steps |
memorx_save_plan | Store a plan with trackable steps that survives sessions |
memorx_end_session | End session with summary β next session reads it automatically |
memorx_health | Memory health score (0β100) with actionable suggestions |
memorx_forget | Smart cleanup: stale facts, stale notes, completed features |
memorx_generate_rules | Auto-generate AGENTS.md from memory |
Run memorx (no args) to start the MCP server; every MCP-aware client can introspect the full tool list.
Privacy
Wrap anything you don't want stored in <private>...</private> tags:
"Our API key is <private>sk-abc123</private>" β "Our API key is "
Stripping happens at the Store.CreateNote boundary (internal/memory/privacy.go), so it's enforced uniformly across hooks, MCP tools, import, and dashboard ingestion. Tag matching is case-insensitive and spans multi-line blocks. If a note is entirely private, the store rejects it rather than persisting an empty record.
Verified tested: privacy stripping across memorx_remember (MCP), memorx_observe (hook/MCP), and user-prompt-submit (hook). Zero leakage.
Parallel Work (Multiple CLIs Simultaneously)
memorX supports concurrent access via SQLite WAL mode:
Terminal 1: Claude Code Terminal 2: Cursor
ββββββββββββββββββββββ ββββββββββββββββββββββ
β feature: auth-v2 β β feature: billing β
β "Token refresh β β "Webhook handler β
β working" β β done" β
ββββββββββ¬ββββββββββββ ββββββββββ¬ββββββββββββ
ββββββββββββ¬βββββββββββββββββββββ
βΌ
.memory/memory.db
(WAL mode: concurrent reads, serialized writes)
Architecture
MCP Client (Claude Code / Cursor / Codex / Windsurf)
β stdio
βΌ
memorX (single Go binary, ~18 MB)
βββ CLI dispatcher (install, hook, dashboard, doctor, version)
βββ MCP Layer (76 tools + 2 resources)
βββ Hook subcommands (session-start, user-prompt-submit,
β post-tool-use, stop, session-end)
βββ Dashboard (net/http + embed, SSE live stream on :37778)
βββ Cross-process event log (.memory/events.jsonl)
βββ Session Manager (features, sessions, briefings)
βββ Git Engine (commits, intent classification, sync)
βββ Search Engine (FTS5 + trigram + BM25 scoring)
βββ Plan Engine (CRUD, auto-detect, commit-to-step matching)
βββ Memory Core (bi-temporal facts, notes, A-MEM links, privacy)
βββ Consolidation Engine (contradictions, decay, summarization)
βββ Analytics (dev patterns, health scoring)
βββ SQLite (WAL mode, .memory/memory.db)
Key design choices:
- Single binary β no Docker, no daemon, no Node, no Bun, no Python, no Chroma
- SQLite + WAL β concurrent access from multiple tools, sub-millisecond writes
- FTS5 + trigram β full-text search with BM25 ranking, fuzzy fallback, no embedding model needed
- Bi-temporal β every fact has
valid_at/invalid_at, enables "what was true last week?" queries - stdio transport β MCP client spawns the binary, communicates via stdin/stdout
//go:embeddashboard β HTML/CSS/JS bundled into the binary at compile time
Direct Go dependencies: mark3labs/mcp-go (MCP SDK), modernc.org/sqlite (pure-Go SQLite, no CGO), google/uuid. Everything else is stdlib.
Benchmark
memorX ships with a 70-scenario benchmark across 7 developer memory abilities:
make benchmark
Ability Score Accuracy Scenarios
βββββββββββββββββββββ βββββ ββββββββ βββββββββ
Decision Recall 100.0% 100.0% 10/10
Knowledge Updates 100.0% 100.0% 10/10
Plan Tracking 100.0% 100.0% 10/10
Abstention 100.0% 100.0% 7/7
Session Continuity 99.3% 100.0% 15/15
Temporal Reasoning 99.0% 100.0% 10/10
Cross-Feature 98.8% 100.0% 8/8
Overall: 99.6% score | 100% accuracy | <1ms latency
Token Savings
Without memorX: 5,000β10,000 tokens per session re-explaining context
With memorX: 200β500 tokens via memorx_briefing + memorx_search_index
The new progressive-disclosure search (memorx_search_index β memorx_get_memory) adds another ~10Γ savings on recall by filtering before fetching full content.
Comparison
| Feature | memorX | claude-mem | Mem0 | Zep | KeepGoing |
|---|---|---|---|---|---|
| Automatic capture via hooks | Yes | Yes | No | No | Yes |
| Live local web dashboard | Yes | Yes | No | No | No |
| Cross-process live event stream | Yes | Yes | No | No | No |
| Session/feature tracking | Yes | Partial | No | No | Partial |
| Git commit integration | Yes | No | No | No | Partial |
| Plan persistence | Yes | No | No | No | No |
| Bi-temporal facts | Yes | No | No | Yes | No |
| Memory linking | Yes | No | Yes | Yes | No |
| 3-layer progressive search | Yes | Yes | No | No | No |
| Privacy tags | Yes | Yes | No | No | No |
| Single binary, zero deps | Yes | No | No | No | No |
| Works with any MCP client | Yes | Partial | No | No | No |
| 100% local, no cloud | Yes | Yes | No | No | Yes |
| Built-in benchmark | Yes | No | No | No | No |
Tested
Every feature listed above has been verified end-to-end:
- MCP stdio backward compat β
memorx(no args) handlesinitialize+tools/list(76 tools) +tools/callcorrectly - All 5 hooks β
session-start,user-prompt-submit,post-tool-use,stop,session-endall run cleanly with the Claude Code JSON payload format on stdin - Smart installer β writes valid
~/.claude/settings.jsonhook entries, registers the MCP server, is idempotent, preserves existing non-memorx hooks and top-level settings - Dashboard β all 6 endpoints (
/,/api/status,/api/features,/api/memories,/api/commits,/api/search,/api/events) serve correctly; empty responses return[]notnull - Cross-process SSE β events published by the MCP server process and by hook subcommands both reach dashboard SSE subscribers via
.memory/events.jsonl - Privacy stripping β secrets in
<private>β¦</private>blocks are stripped uniformly throughmemorx_remember(MCP),memorx_observe(hook/MCP), anduser-prompt-submit(hook). Zero leakage across all three paths - Transcript summarizer β parses real Claude Code JSONL format, correctly extracts user-turn count, tool counts, edited files, commits, and decision patterns
- Doctor β happy and sad paths both produce useful output
- Unit tests β all passing in
memory,search,storage,plans,hooks,dashboard,git, andconsolidationpackages
License
MIT
