Lyellr88/marm-memory
Local-first 3-in-1 AI memory layer & MCP server for Claude Code, Codex, Grok, Gemini, VS Code and Cursor. Fuses session history, codebase indexing & concept graphs in SQLite. Enables zero-cloud, privacy-first context & instant recall, supports multi-agent swarms.
325 ★61 forksPythonUpdated 1d ago
What you need to know
MARM — a persistent local memory server for AI agents over MCP. 14 tools across core memory (recall, log, notebook, summary, compaction), a code graph (repo indexing, symbol lookup, call tracing), and a concept graph; runs over HTTP or STDIO so multiple agents/clients share the same memory.
Install
pip install marm-mcp-server marm-memory init --g-claude --g-codex --g-gemini (installs the marm-init skill into agent configs) Docker: docker run -d --name marm-mcp-server -p 127.0.0.1:8001:8001 -v ~/.marm:/home/marm/.marm lyellr88/marm-mcp-server:latest
Usage
- •Start the server: marm-memory start (HTTP on localhost:8001, keyless on loopback)
- •Connect a client: 'claude mcp add --transport http marm-memory http://localhost:8001/mcp' (Codex: codex mcp add marm-memory --url http://localhost:8001/mcp)
- •Or STDIO: 'claude mcp add --transport stdio marm-memory-stdio marm-mcp-stdio'
- •Just tell the agent in natural language (e.g. 'log this session'); the agent calls the tools automatically
Key features
- ✓14 MCP tools: marm_smart_recall, marm_log_entry, marm_log_show, marm_delete, marm_summary, marm_notebook, marm_compaction + 5 code-graph tools (index/lookup/trace/architecture/impact) + 2 concept-graph tools
- ✓Hybrid recall: an exact FTS5 BM25 lane for config keys/API names plus a filter→rerank semantic lane (jina-embeddings-v2-small-en, 512-dim) with bounded semantic fallback
- ✓Code graph via codebase-memory-mcp (tree-sitter, 158 languages) with git-signature auto-reindexing; concept graph of entities/relationships with code cross-linking
- ✓SQLite WAL + connection pooling + serialized write queue; local-first, everything in ~/.marm/ (no cloud sync, no telemetry)
- ✓HTTP and STDIO transports; swarm/multi-agent presets with rate limits (80/200/600 RPM); web Console
Best for
Developers who want persistent, fully-local cross-session and cross-agent memory for coding agents (Claude, Gemini, Codex, Qwen) with code-structure awareness.
Caveats
- ⚠Requires Python 3.10+, ~100MB storage minimum, 512MB RAM minimum
- ⚠Docker HTTP mode requires an API key (MARM_API_KEY); local pip HTTP is keyless only on loopback (SERVER_HOST=0.0.0.0 forces key mode)
- ⚠Graph engine binary (~269MB) is downloaded on first graph use for pip installs; graph tools degrade if it fails, core memory keeps working
- ⚠Write-time consolidation (~9x write cost) and compaction are opt-in; first semantic search loads the embedding model (slower)
- ⚠Concept-graph extraction is CPU-bound; draining a backlog raises median recall from ~8ms to ~16ms temporarily
- ⚠Distributed multi-node memory is out of scope (one machine, many agents)
Platforms: Windows · macOS · LinuxClients: Claude Code · Claude Desktop · VS Code / GitHub Copilot Agent · Cursor · Codex CLI · Gemini CLI · Qwen Code · xAI / Grok Remote MCP
Documentation ↗Reviewed 2026-08-07
Topics
agent-memoryai-agentsai-memoryclaude-codecodex-clideveloper-toolsembeddingsindexing-engineknowledge-graphllmlocal-firstlong-term-memorymcpmcp-serversmodel-context-protocolpersistent-memoryragself-hostedsematic-searchsqlite
- Stars
- 325★
- Forks
- 61
- Language
- Python
- License
- Apache-2.0
- Created
- 2025-06-10
- Last push
- 2026-08-06