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.
$ npx -y skills add Lyellr88/marm-memory --agent claude-code
Repo: Lyellr88/marm-memory
What's inside
Contributions welcome! Browse open issues to contribute, or join the MARM Discord to share workflows, get setup help, and connect with other builders.
pip install marm-mcp-server
marm-memory init --g-claude --g-codex --g-gemini
Also available: --g-qwen and --g-kiro. Run without flags to install into your current project folder instead of home
"Use the marm-init skill to set up MARM."
Manual setup
Prefer to wire it up yourself:
Replace "agent" with your client’s CLI command (for example, claude, gemini, or qwen). For Codex, use codex mcp add marm-memory --url http://localhost:8001/mcp instead.
| If you are... | Start the server | Connect your MCP client |
|---|---|---|
| Solo developer / researcher | marm-memory start | "agent" mcp add --transport http marm-memory http://localhost:8001/mcp |
| Private local STDIO user | marm-mcp-stdio | "agent" mcp add --transport stdio marm-memory-stdio marm-mcp-stdio |
| Multiple agents sharing memory | marm-memory start --profile swarm | "agent" mcp add --transport http marm-memory http://localhost:8001/mcp |
| Private high-throughput swarm | marm-memory start --profile swarm-max | "agent" mcp add --transport http marm-memory http://localhost:8001/mcp |
| Trusted private lab/server | marm-memory start --profile trusted | "agent" mcp add --transport http marm-memory http://localhost:8001/mcp |
Your AI forgets everything. MARM Memory doesn't.
marm-memory gives your agents a private, shared memory for the context that normally gets lost between chats: decisions, research, fixes, notes, and project history. Switch from Claude Code to Codex or Gemini without losing the context already gathered.
It brings three things together:
All 15 tools work over HTTP and STDIO. Your agents share the same local memory across sessions instead of starting from scratch each time. The bundled Console App provides a browsable view of Memories, the Knowledge Graph, and Indexed Projects, including progress for graph builds and repository indexing. Indexing a repository creates its independent Code Graph, which you can explore from Knowledge Graph → Code Explorer even before storing any memories.
| Layer | What it does | Why it matters |
|---|---|---|
| Memory model | Sessions, structured logs, notebooks, summaries, and semantic memories | Keeps project history searchable instead of trapped in one chat |
| Scale layer | SQLite WAL mode, connection pooling, serialized write queue, and HTTP rate-limit presets | Lets one server support solo use, multi-agent work, and swarm-style bursts |
| Intelligence layer | FTS filter, semantic re-rank, bounded semantic fallback, auto-classification, write-time consolidation, and compaction candidates | Keeps recall useful as memory grows instead of letting duplicates pile up |
| Code graph layer | Repo indexing, symbol lookup, call tracing, architecture overview, and change-impact analysis | Gives agents project structure without rereading the whole codebase |
| Concept graph layer | Entity and relationship extraction from stored memories, with links back into the code graph | Connects decisions, errors, tools, and people across sessions instead of leaving them as flat text |
| Token layer | Lightweight 7-tool core surface (15 total with bundled graph tools), semantic re-rank before retrieval, and write-time deduplication | Reduces tokens sent to the model on every recall and cost stays predictable as memory scales |
| Deployment layer | Pip, Docker, STDIO, HTTP, and managed swarm, swarm-max, and trusted profiles | Lets you run private local memory or shared multi-agent memory with the same MCP surface |
See Performance & Scaling Benchmarks for retrieval latency, concurrency, and write-cost numbers, and Architecture & Internals for the mechanisms behind each layer.
marm-memory is the local runtime manager installed with the Python package. These are the normal operational commands; use marm-memory <command> --help for flags and command-specific examples.
Daily runtime work
marm-memory fast-start-http # start HTTP, Console, and open the browser
marm-memory start # start or reuse the managed HTTP runtime
marm-memory start --profile swarm # shared multi-agent preset
marm-memory stop # stop the managed runtime safely
marm-memory restart # restart the managed runtime
marm-memory status # inspect runtime, database, queue, and graph status
marm-memory logs --follow # follow bounded runtime logs
marm-memory console # start or reuse the bundled local Console
Transports and setup
marm-memory http # run HTTP in the foreground
marm-memory stdio # run the strict local MCP STDIO transport
marm-memory init # install the MARM skill into detected agents (project scan)
marm-memory init --g-claude # install the skill into the home-folder claude directory
marm-memory doctor # diagnose the local install
marm-memory key init # create or reuse ~/.marm/.env without displaying the key
marm-memory key path # print the managed key-file path
marm-memory key reveal # explicitly display the managed key
marm-memory console --import-key # open an authenticated local Console session
marm-memory upgrade --check # compare the installed package with PyPI
marm-memory uninstall # preview package removal; always preserves ~/.marm
Knowledge, projects, and maintenance
marm-memory knowledge status # Indexers, models, and how far behind automatic indexing is
marm-memory knowledge build --all # Rebuild the whole concept graph (new memories index themselves)
marm-memory knowledge auto off # Stop indexing memories automatically (on, off, status)
marm-memory projects list # List all tracked workspaces
marm-memory projects index <path> # Add a repo to the code graph (kept current after that)
marm-memory projects status # Inspect target repo graph readiness
marm-memory projects auto off # Stop re-indexing repos automatically (on, off, status)
marm-memory maintenance status # Check internal database optimization state
marm-memory maintenance embeddings migrate # Upgrade old 384-dim vectors to 512-dim
marm-memory maintenance chunks rechunk # Recalibrate long memory text splits
Docker commands are documented separately below because they require explicit data mounts, network exposure, and key-handling choices.
MARM is tuned for fast recall first, even as memory grows and long memories are chunked behind the scenes.
These measurements use the fastembed-backed jinaai/jina-embeddings-v2-small-en encoder and a throwaway local SQLite database. Every timed path calls the shipped MARMMemory code, not a benchmark-local reimplementation. Sections 1-4 are timings from a single run of scripts/benchmarking/performance/bench_hotpath.py on local hardware; absolute milliseconds vary by machine, so treat the scaling shape as the signal. Section 5 is a separate accuracy benchmark (run_eval.py) measuring retrieval rather than speed, and its latest row is a controlled before and after, explained there.
FAQ
marm-memory is a Claude Code plugin with 1 hand-picked skill for data work, indexed on Flowy. Install it with the command on its page. It includes marm-init. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it