Which MCP memory server should you use for coding agents? If you want memory captured for you from your sessions, use Mem0. If you want everything local and open source in files you can edit, use Basic Memory. If your agents need the same company knowledge graph as your other AI products, use Zep (or Graphiti, its open-source core, if you self-host). If a team or several parallel agents share a codebase and need its decisions, guardrails and tasks, use RepoMemory. For a free, minimal start on one machine, the reference Knowledge Graph Memory Server does the job.
At a glance
| Mem0 | Basic Memory | RepoMemory | Zep / Graphiti | Knowledge Graph Memory Server | |
|---|---|---|---|---|---|
| What it is | Memory layer for AI agents and apps | Markdown knowledge base with MCP | Shared project memory for coding agents | Context graphs for agents | Reference MCP server |
| How memory gets in | Extracted by an LLM; the Claude Code plugin captures sessions with hooks | The agent or you write notes | The agent records typed entries on purpose | Episodes ingested into a graph; Zep's MCP add_memory |
The agent creates entities, relations and observations |
| Search | Semantic, BM25 keyword and entity matching, fused | Full-text and semantic (hybrid) | Postgres full-text: any of the query's words | Embeddings, BM25 and graph traversal | Case-insensitive substring |
| Runs | Hosted, or self-hosted | Local, or cloud | Hosted only | Zep: managed cloud or your VPC. Graphiti: self-hosted | Local JSONL file |
| Open source | Yes, Apache 2.0 | Yes, AGPL-3.0 | No | Graphiti: Apache 2.0. Zep: no | Yes, MIT |
| Team sharing | Memories scoped to users, agents, apps or runs | Teams: one shared cloud workspace | Team plan: one shared ledger | Shared graphs, access by policy | One file, shared through a lock file |
| Price | Free: 10,000 adds, 1,000 retrievals a month. From $19 | Local free. Cloud from $15 a seat a month | Free: 300 new entries a month. From $9 | Free: 10,000 credits a month. From $125 | Free |
Sources and dates are in each section below.
Mem0
Best for: memory that is captured for you, without asking the agent to write anything down.
Mem0 calls itself "drop-in memory infrastructure for AI agents and apps". Its
extraction runs one LLM call over a conversation, and retrieval fuses semantic,
BM25 keyword and entity matching (GitHub,
checked 22 October 2026). For coding agents it has a hosted MCP server at
mcp.mem0.ai with 11 tools, browser sign-in or an API key, and setup for
Claude Code, Codex, Cursor, VS Code and others
(MCP docs, checked 22 October 2026).
Its Claude Code plugin uses hooks to save your messages, Claude's answers,
changed files and test results locally, then sends batches to the Mem0
Platform for extraction (Claude Code docs,
checked 22 October 2026). OpenMemory is the name Mem0 gives this coding-agent
memory: it "auto-captures your coding preferences, patterns, and setup"
(OpenMemory, checked 22 October 2026).
- Strengths: nothing to write by hand; search copes with different wording; the library and a self-hosted server are Apache 2.0; a generous free plan.
- Limits: the Claude Code plugin needs a Mem0 Platform key, and extraction runs on Mem0's servers. What gets remembered is the model's choice, not yours. Plans count retrievals as well as adds: Hobby is free, Starter is $19 a month, and graph memory starts on Pro at $249 (pricing, checked 22 October 2026).
We compare the two in more depth in our Mem0 alternative page.
Basic Memory
Best for: one developer who wants memory as plain Markdown files on their own disk, open source and offline.
Basic Memory keeps knowledge as Markdown files with a local SQLite index (Postgres
is also supported) and searches it with full-text and vector retrieval combined.
Its MCP tools include write_note, read_note, edit_note, search_notes and
build_context. It is AGPL-3.0
(GitHub, checked 22
October 2026). Local use is free; the cloud version, with sync across devices
and AI tools, starts at $15 a seat a month after a 7-day trial, and it lists
Claude, Codex and Cursor among the tools it works with
(basicmemory.com, checked 22 October 2026). Basic
Memory Teams offers "a single, shared cloud workspace" (GitHub, as above).
- Strengths: you own the files and can read, edit and version them like any other Markdown, including in Obsidian or VS Code; search handles meaning as well as words; nothing leaves your machine unless you choose the cloud.
- Limits: notes are free-form, so it has no built-in idea of a decision that replaces another, or of tasks an agent can claim. Sharing with a team means the paid cloud.
RepoMemory
Best for: a codebase shared by several agents or people, where what was decided, reverted or forbidden must reach every session.
This is our product. RepoMemory keeps a ledger per project of decisions,
lessons, guardrails, notes and tasks, which agents record on purpose. Its MCP
server at https://api.repomemory.dev/mcp has five tools: brief, recall,
record_entry, claim_task and retire_entry. A session starts with
brief, which returns every active guardrail, the open tasks and the latest
decisions. A new entry can supersede an old one, which is retired from recall
but kept with a pointer. Agents claim tasks before starting them, and a claim
runs out after two hours unless renewed. Each entry records which key or
person wrote it. Recall and brief tell the agent that entries are notes, not
instructions, and flag one worded like a prompt injection. The dashboard's
Ledger page lets you browse, edit, delete, export and import it. See the
docs.
- Strengths: only new entries cost anything, so agents can recall before every change for free; reversed decisions don't come back; parallel agents don't take the same task; the Team plan gives every key one shared ledger.
- Limits: hosted only, and not open source. Search is Postgres full-text
search on words, not embeddings, so a query has to share words with the
entry. Nothing is captured for you: the agent has to call
record_entry, which in practice means a few lines inAGENTS.mdorCLAUDE.md. The free plan is 300 new entries a month; Pro is $9 for 3,000 and Team $49 for 20,000 (pricing).
Zep and Graphiti
Best for: organisations that already put business data and conversations into a knowledge graph, and want coding agents to read the same one.
Zep is "the unified context layer for enterprise data". It builds a dated
context graph per user, customer, account or domain from business data,
documents and conversations, and runs in its managed cloud or inside your VPC
(getzep.com, checked 22 October 2026). Its Memory
MCP Server has search_graph, get_user_summary, add_memory and
search_graph_in for shared graphs, works with Claude, ChatGPT, Cursor and
other remote MCP clients, and "does not auto-ingest every message"
(Zep blog, checked 22 October
2026). The free plan has 10,000 credits a month and one MCP seat; Flex is $125
a month for 50,000 credits and 5 MCP seats
(pricing, checked 22 October 2026).
Graphiti is Zep's open-source core, Apache 2.0. Facts have validity windows, so old ones are "invalidated — not deleted", and search combines embeddings, BM25 and graph traversal. It needs Neo4j, FalkorDB or Neptune and an LLM (GitHub, checked 22 October 2026). Its MCP server is "experimental and under active development" (MCP docs, checked 22 October 2026).
- Strengths: facts that change over time are tracked, not overwritten; rich retrieval; access policies and audit for shared graphs.
- Limits: built for enterprise and per-user context, not a codebase's decisions and tasks. The jump from free to $125 a month is steep, and self-hosting Graphiti means running a graph database and an LLM yourself.
Knowledge Graph Memory Server
Best for: trying MCP memory for free on one machine, or a starting point for your own server.
The reference server from the MCP project stores entities, relations and
observations in a local JSONL file, with tools such as create_entities,
add_observations, read_graph and search_nodes. It runs with npx or
Docker and is MIT-licensed
(README,
checked 22 October 2026). search_nodes keeps every entity whose name, type
or observation contains the query, case-insensitively
(source,
checked 22 October 2026).
- Strengths: free, open, tiny and easy to read; no account or network needed; a lock file lets several clients on one machine share it.
- Limits: the whole query has to appear as written, with no ranking, so a multi-word query rarely matches. There is no hosting, team sharing, authorship or way to retire a fact other than deleting it.
How to choose
- You want memory captured without effort: Mem0. Accept that a model decides what is kept.
- You want local, open-source files you can edit: Basic Memory, or the reference server if you only need the basics.
- Your company already runs a context graph: Zep, or Graphiti if you will self-host it.
- Several agents or teammates share one repository: RepoMemory, for guardrails in every brief, superseded decisions, task claims and free recall. Start on the free plan; see pricing and the docs for connecting Claude Code, Cursor and Codex.
- You must self-host and also want project memory for a team: RepoMemory is not an option. Look at Mem0's self-hosted server or Graphiti.