SDK / infra · #20 trending MCP repo · ↗ +385 stars this week
Best Agent Memory MCP
Glen-Web-App/best-agent-memory-mcp
Best Agent Memory MCP servers, ranked and compared: long-term memory for Claude Code, Codex, Cursor and any MCP client. Glen, Mem0, Supermemory, Zep, Hindsight, Basic Memory, claude-mem, Graphiti, Cognee, the official memory server and more, with storage, capture model, team sharing, license and live stars.
- Stars
- 212
- This week
- +385
- Forks
- 11
- Open issues
- 0
- Last push
- 3d ago
Documentation
README
Best Agent Memory MCP
The best agent memory MCP servers, ranked: long-term memory for Claude Code, Codex, Cursor and any MCP client.
Best Agent Memory MCP compares 25 memory MCP servers that let an AI agent keep facts, decisions and past conversations between sessions. Hosted services (Glen, Mem0, Zep, Supermemory) sit next to open-source servers you run yourself (Hindsight, Basic Memory, Graphiti, Cognee, the official MCP memory server), and every entry says where memory is stored, whether capture is automatic or waits for the agent to call a tool, whether a team can share it, and what it costs. All of them connect to Claude Code, Cursor or Codex over MCP; the entries note which clients each project documents.
Short answer. For memory shared across a team's agents, start with Glen. For a hosted personal memory with a free tier, Mem0. For self-hosting with hybrid retrieval, Hindsight. For memory you can read and edit as files, Basic Memory. For a zero-dependency baseline, the official memory server.
Disclosure: this list is maintained by the Glen team, and Glen is ranked first. Every other entry is ranked on the published criteria, and its facts link to their sources.
Contents
- At a glance
- How we ranked
- The ranked list
- Deprecated or not recommended
- FAQ
- Related
- Contributing
- License
At a glance
Star badges are live. Several projects keep their MCP server inside a larger monorepo, so their star count covers the whole repo, not the server; the entries say where that applies.
| # | Name | Hosted or local | Memory stored as | Capture | Team sharing | License | Stars |
|---|---|---|---|---|---|---|---|
| 1 | Glen | Hosted | Shards and observations on Glen's servers | Plugin or CLI hooks; MCP alone is search only | Org-wide, access checked per observation | Plugin MIT; hosted service | site |
| 2 | Mem0 | Hosted | Mem0 Platform memories (graph on Custom plan) | Agent calls a tool | Not documented for MCP | Apache-2.0 (core repo) | |
| 3 | Supermemory | Hosted; self-host option | Supermemory cloud, organized in spaces | Agent calls a tool; hooks via separate plugins | Team spaces | MIT | |
| 4 | Zep Context MCP | Hosted; BYOC option | Temporal knowledge graph | Agent calls a tool | Shared Context Graphs with ABAC | Proprietary | closed source |
| 5 | Hindsight | Self-hosted or Hindsight Cloud | Postgres + pgvector | Agent calls a tool; auto-ingest via coding-agents package | Shared server or Cloud | MIT | |
| 6 | mcp-memory-service | Local or self-hosted | SQLite with local ONNX embeddings | Hooks (Claude Code, Codex) or tool calls | Self-hosted HTTP sync | Apache-2.0 | |
| 7 | Basic Memory | Local; paid cloud | Markdown files + SQLite index | Agent writes notes; plugin hooks in Claude Code | Basic Memory Teams (paid) | AGPL-3.0 | |
| 8 | claude-mem | Local; hosted observer by default | SQLite FTS5 + Chroma | Six lifecycle hooks | Opt-in TeamBrain | Apache-2.0 | |
| 9 | agentmemory | Local | Local data dir, BM25 + optional embeddings | Hooks + tool calls | One server for your agents | Apache-2.0 | |
| 10 | Cognee MCP | Local, self-hosted or Cognee Cloud | Graph + vector (SQLite, LanceDB, Kuzu) | Agent calls a tool | Per-user datasets on a server | Apache-2.0 | |
| 11 | Engram | Local | SQLite + FTS5 | Agent calls a tool; plugins | Git Sync; optional Engram Cloud | MIT | |
| 12 | Graphiti MCP | Self-hosted | Temporal graph on FalkorDB or Neo4j | Agent calls a tool | Group IDs on one server, no auth | Apache-2.0 | |
| 13 | MemPalace | Local; team server option | Verbatim text in Chroma, SQLite or pgvector | Transcript mining + auto-save hooks | Team server compose file | MIT | |
| 14 | Official memory server | Local | JSONL knowledge graph | Agent calls a tool | File lock on one machine | Not detected (monorepo) | |
| 15 | Pieces | Local (desktop app) | PiecesOS on-device store | OS-level automatic capture | Enterprise plan | Proprietary | closed source |
| 16 | Qdrant MCP | Local or self-hosted | Qdrant vectors (FastEmbed) | Agent calls a tool | Remote transport to one server | Apache-2.0 | |
| 17 | LongMemory | Local; HTTP server option | SQLite + embeddings | Session porter imports logs; plugins | Not documented | Apache-2.0 | |
| 18 | deja-vu | Local | Index of transcripts already on disk | Automatic, through hooks | None described | MIT | |
| 19 | MemOS | Hosted API; self-host server | MemOS cloud; Neo4j + Qdrant self-hosted | Agent calls a tool | Not documented | Apache-2.0 | |
| 20 | Memori | Hosted; VPC and on-prem options | SQL-native store | Agent calls a tool | Not documented | Apache-2.0 | |
| 21 | Membase | Hosted or local | Not documented | Tool calls plus imported sources | Not documented | MIT | |
| 22 | mcp-memory-keeper | Local | Files in ~/mcp-data/memory-keeper/ |
MCP tools | Parallel sessions on one machine | MIT | |
| 23 | mcp-knowledge-graph | Local | Project-local JSONL graph | Agent calls a tool | None described | MIT | |
| 24 | MemoryMesh | Local | JSON knowledge graph with your schemas | Prompt instructions you write | None described | MIT | |
| 25 | Stash | Self-hosted | Postgres | MCP tools | Not documented | Apache-2.0 |
How we ranked
Glen's first place is the maintainer's pick. Entries 2 to 25 are ordered on these criteria, read from each project's README, docs, pricing page and the GitHub API in early November 2026:
- Maintained. A commit or release in the last 6 months. Archived, winding-down and stale projects go to Deprecated or not recommended instead of the ranking.
- Ships an MCP server for memory. A generic database tool, a code index or an MCP server where memory is a side feature does not qualify. That leaves out
DeusData/codebase-memory-mcp(code intelligence), the Chroma, Milvus and Weaviate servers (generic vector stores) and Serena (memory is one small feature of a coding toolkit). - Capture model. Automatic capture through hooks or background extraction ranks above a server that saves only when the model decides to call a write tool.
- Retrieval quality evidence. Published benchmarks count, but almost every LoCoMo and LongMemEval number in this category is self-reported on a different model and judge, so scores are labeled (self-reported) and weigh less than a reproducible harness. Disputed results are flagged.
- Setup effort. One URL or one command beats a server that needs a graph database, an LLM key and a cloned monorepo.
- Team sharing. Documented ways to share memory across people, with access control, rank above per-machine files.
- Licensing and pricing transparency. A published license and a public price list rank above "contact sales" or no license file.
Star counts are a weak signal here. Monorepo stars overstate use of one server, and a few young repos gained stars much faster than their peers.
The ranked list
🥇 1. Glen
Memory belongs to the organization, not to one person: every teammate's agent sessions record into one org memory, and any teammate's agent can recall from it. Access control runs per observation at recall, so an agent only gets what its user is already cleared to see.
| Endpoint | https://mcp.tryglen.com/mcp, Streamable HTTP |
| Auth | OAuth 2.1 with dynamic client registration (the token is bound to one org picked at consent), or a personal API key in x-api-key with the org in x-glen-org-id |
| Tools | glen_search (a synthesized answer with citations), glen_list_orgs, forget, skill and artifact tools |
| Storage | Shards and observations on Glen's servers; LLM relevance passes pick what to inject |
| Other sources | Slack public channels, GitHub, tickets, docs, and calls through Fireflies, Fathom and Granola |
| Pricing | Free plan to start; paid plans exist; no public pricing page |
https://mcp.tryglen.com/mcp
The MCP connection searches memory. To also record agent conversations, install the plugin hooks with the CLI, which detects installed agents and sets up each one:
npx @tryglen/cli@latest install
Beyond search, Glen keeps a shared skills library (team skills are offered to agents automatically), an artifact library, and a transcript library with session takeover (glen takeover <code>). glen code-search traces lines of code back to the agent conversations that wrote them, and glen review runs a local PR reviewer. Privacy controls are glen off, glen incognito (recall works, nothing is recorded) and glen silent (records, injects nothing), with a macOS menu-bar recording indicator.
Strengths
- One memory for the whole org, with access checked per observation at recall, so sharing does not mean everyone sees everything.
- Contradiction detection: when a newer decision contradicts an older one, the older one stops being recalled.
- Captures more than agent sessions: Slack public channels, GitHub, tickets, docs and meeting calls feed the same memory.
- Two auth paths: OAuth 2.1 with dynamic client registration for interactive clients, an API key plus org header for headless use.
- Benchmark on tryglen.com: 21% faster to a merged change and 29% fewer tokens per task (self-reported).
Weaknesses
- Cloud only: memory lives on Glen's servers, with no local or self-hosted mode.
- Needs a Glen account and an org before anything works.
- An MCP-only connection can search but does not record agent conversations; recording needs the plugin or CLI hooks.
- Most of the value comes with a team. A solo developer gets less from shared memory.
Best for: engineering teams who want every teammate's agent to recall what the others decided, across Claude Code, Codex, Cursor and any MCP client.
🥈 2. Mem0
Listed in the official MCP Registry as io.github.mem0ai/mem0 with a remote Streamable HTTP endpoint, and documented for seven clients: Claude Desktop, Claude Code, Codex, Cursor, Windsurf, VS Code and OpenCode (docs).
Key facts: hosted · 11 tools (add_memory, search_memories, update_memory, delete_memory and more), scoped by user, agent, app or run · sign in through the client's browser flow or pass an API key as a bearer token · free plan with 10,000 adds and 1,000 retrievals a month for the first 30 days (model calls included), then 50,000 adds and 10,000 retrievals a month with your own LLM key (pricing).
npx mcp-add --name mem0-mcp --type http --url "https://mcp.mem0.ai/mcp" --clients <client>
Strengths
- Official registry listing and seven documented clients, so setup is one URL in most agents.
- The Free plan keeps 50,000 adds and 10,000 retrievals a month after the first 30 days, with unlimited end users.
- LoCoMo 92.5% and LongMemEval 94.4% (self-reported; Mem0's own page notes no two vendors used the same model stack or judge) (benchmarks).
Weaknesses
- The MCP server saves only when the agent calls a write tool.
- Graph memory is not on the Free plan; it comes with the Custom plan.
- Org-wide sharing over MCP is not documented.
- The self-hosted OpenMemory server was removed from the monorepo on 2026-07-29, so older tutorials point at code that no longer exists.
Best for: a hosted personal or per-app memory with OAuth-style sign-in and a usable free tier.
🥉 3. Supermemory
When a client connects, you choose which spaces it may access, and you can revoke it later from the console's Agents page; sign-in is OAuth in the browser and needs no API key (docs).
Key facts: hosted, self-host option on the Scale plan · tools include search_memory, add_memory, forget_memory, get_profile, list_spaces · MCP Apps widgets (memory-graph, guided-save, upload-file, select-space) · Free $0 ($5 credits a month, 1 seat), Pro $19/mo (3 seats), Max $100/mo, Scale $399/mo, Enterprise custom (pricing).
https://mcp.supermemory.ai/mcp
Strengths
- Teammates share memory through spaces they can read or write, starting at the $19 Pro plan with 3 seats.
- Separate hook plugins (
claude-supermemory,opencode-supermemory) add automatic capture that the MCP server alone does not do. - MCP Apps widgets give clients a UI for saving and browsing memory.
Weaknesses
- MCP v1 (
supermemoryai/supermemory-mcp) is deprecated; old installs need migrating to the new endpoint. - SSO only on Enterprise, and usage is billed in credits.
- Not in the official MCP Registry under its own namespace, and the docs page does not name the transport.
- Benchmark figures found (LongMemEval 81.6% with GPT-4o, 85.2% with Gemini-3) come from a competitor's table, Hindsight's.
- The 31,522 stars (as of 2026-11-03) are for the whole monorepo.
Best for: a small team that wants hosted shared memory and is willing to add Supermemory's plugins for automatic capture.
4. Zep Context MCP
The most enterprise-shaped auth in this list: OAuth 2.1 with PKCE, Google Workspace sign-in by default, custom OIDC (Entra ID, Okta) on Enterprise, attribute-based access on shared graphs, read-only connections and an account-level write kill switch (docs).
Key facts: hosted, BYOC uses its own host · temporal knowledge graph built on Graphiti · 12 tools (search_graph, get_user_summary, add_memory, add_memory_to_graph and more) · documented for Claude, ChatGPT, Claude Code, Codex CLI and Cursor, installed through the Zep Context plugin from each host's org catalog · Free trial 10,000 credits a month with 1 MCP seat, Flex $125/mo (5 seats), Flex Plus $375/mo (15 seats), Enterprise custom (pricing). Zep Cloud is proprietary; examples and SDK tooling live in getzep/zep (Apache-2.0).
https://api.getzep.com/mcp
Strengths
- Every user has a personal graph, and shared Context Graphs give project-wide or group-based access.
- Admins can make a connection read-only.
- Access tokens last about 5 minutes.
Weaknesses
- MCP access is metered by seat, and the cheapest paid plan is $125/mo.
- Capture is explicit tool calls guided by a skill; no automatic capture is described.
- Benchmark claims are disputed: Zep reports LoCoMo 94.7% (self-reported), while a run by ByteRover got 75.1%.
- Not in the official MCP Registry, and the docs do not state the transport.
Best for: companies that need identity-provider sign-in and per-group access on shared agent memory.
5. Hindsight
Recall runs four searches in parallel (semantic, BM25, graph and temporal), fuses them with reciprocal rank fusion and reranks with a cross-encoder (README).
Key facts: self-hosted (Docker, pip, Helm, embedded Python) or Hindsight Cloud, usage-based with free credits and no per-seat fee · Postgres + pgvector, or Oracle AI Database 23ai · MCP enabled by default at /mcp, one endpoint per memory bank, HTTP · needs an LLM key (25+ providers).
claude mcp add --transport http hindsight http://localhost:8888/mcp/<bank_id>/
Strengths
- MIT license and frequent releases (v1.2.0 on 2026-11-03).
@vectorize-io/hindsight-coding-agentsadds automatic ingestion from git history and past sessions for 13 coding agents.- LongMemEval 89.0% (self-reported); the README says Virginia Tech's Sanghani Center and The Washington Post reproduced results, and there is a paper (arXiv 2512.12818).
Weaknesses
- MCP auth is off by default; API-key bearer auth is an extension you turn on.
- Each MCP connection is scoped to one bank; cross-bank sharing is not described.
- Needs a Postgres server and an LLM key, heavier than file-based servers.
- 58,593 stars as of 2026-11-03 for a repo created 2025-10-30, a growth rate well above its peers; read the badge with that in mind.
Best for: self-hosting a server-grade memory with hybrid retrieval that several people's agents can reach.
6. mcp-memory-service
An individual maintainer's project with the widest self-hosted surface here: MCP plus a REST API, OAuth 2.0 with dynamic client registration, remote MCP, SSE events, a CLI and a dashboard (README).
Key facts: local or self-hosted, free · SQLite (single user), Cloudflare, or Hybrid (local reads with background cloud sync, the recommended mode) · embeddings run locally through ONNX, no API key · knowledge graph and automatic consolidation · documented for Claude Code, Gemini CLI, OpenCode, Codex CLI, Goose, Aider, Amp, Claude Desktop, VS Code, Cursor, Windsurf, Zed, JetBrains and more · v12.5.0 released 2026-11-03.
pip install mcp-memory-service
Strengths
- Configurable Claude Code hooks capture sessions automatically, and
python3 codex/install_hooks.pydoes the same for Codex. - Built to be shared: "Memory is shared across all agents and runs", and a self-hosted team setup syncs Hybrid to another HTTP instance.
- OAuth with dynamic client registration on a server you run.
Weaknesses
- Many backends and configuration paths, so there are more decisions to make at setup.
- The cloud-sync option depends on Cloudflare.
BENCHMARKS.mdexplains how to run LongMemEval, DevBench and LoCoMo, but we found no headline scores to compare.
Best for: a self-hosted team memory server with OAuth and hooks, without a vendor cloud.
7. Basic Memory
Memory is plain Markdown on disk, with wikilinks and frontmatter, that you, the agent and Obsidian all edit; a local SQLite index sits beside the files (README).
Key facts: v1.0.0 released 2026-10-29 · official MCP Registry listing io.github.basicmachines-co/basic-memory · stdio locally, HTTPS for the cloud · documented for Claude Desktop, Claude Code, Codex CLI, Cursor, VS Code and ChatGPT · Cloud $15/mo beta price (regular $19), 7-day trial; Teams shared workspace at the same price.
uv tool install basic-memory --prerelease=allow
Strengths
- Memory you can read, diff and version in git.
- Semantic vector search with optional cross-encoder rerank over the notes.
- A Claude Code plugin adds session-start briefings and pre-compaction checkpoints.
Weaknesses
- AGPL-3.0 limits embedding it in a closed product.
- Without
--prerelease=allow, the README says the install silently picks an older release. - Capture is mostly manual: you or the agent ask for a note to be written.
- Team sharing goes through the paid cloud; no LoCoMo or LongMemEval numbers were found.
Best for: people who want to read and edit their agent's memory as notes, Obsidian users especially.
8. claude-mem
112,227 stars as of 2026-11-03, the most of any single-purpose memory project in this list. Its MCP side is four search tools; capture comes from six lifecycle hooks, so a client without hooks gets search only (README).
Key facts: local SQLite with FTS5 plus a Chroma vector DB, served by a Bun worker with a web viewer · hooks on SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop and SessionEnd · Claude Code plugin plus installer targets for OpenCode, T3 Code, Antigravity, Pi, DeepSeek Harness, Grok Bot and OpenClaw · optional TeamBrain shared workspace and Cloud Sync to cmem.ai.
npx claude-mem install
Strengths
- Capture and injection at session start are automatic.
- Hybrid keyword and vector search over past observations.
<private>tags keep content out of storage.
Weaknesses
- The installer asks you to sign in and starts a hosted observer on a 30-day free trial; after that, compression falls back to your Anthropic plan unless you subscribe. Use
--provider hostto keep inference local. - Many moving parts: Bun worker, Chroma, SQLite.
- 125 open issues as of 2026-11-03.
npm install -g claude-meminstalls only the SDK and registers no hooks, a common setup mistake.
Best for: Claude Code users who want local automatic capture and will configure the observer themselves. See the plugins list for its hook side.
9. agentmemory
Runs with no API key: keyless mode searches with BM25, and local or remote embeddings add semantic search when you configure them (README).
Key facts: local, Node 20+ · API on localhost:3111 and viewer on :3113, both bound to loopback · 12 automatic hooks and 54 MCP tools · documented for Claude Code, Copilot CLI, Cursor, Gemini CLI, Codex CLI, OpenCode, pi and any MCP client; "All agents share the same memory server."
npx -y @agentmemory/agentmemory@latest
Strengths
- Hooks record session events with secret scrubbing and offline replay.
- A live viewer for editing and forgetting memories.
- No key needed to start.
Weaknesses
- 54 tools is a large tool list to load into a model's context.
- The "#1 ... based on real-world benchmarks" description is self-published, and we could not verify the numbers.
- 528 open issues for a repo created 2026-02-25.
Best for: one developer running several agents against one local memory without any API key.
10. Cognee MCP
Supports all three MCP transports (stdio, SSE, Streamable HTTP) and three modes: local embedded databases, a Cognee API server, or Cognee Cloud (README).
Key facts: graph plus vector memory (SQLite, LanceDB, Ladybug; Kuzu + LanceDB for per-dataset isolation) · tools remember, recall, forget, cognify_status · ENABLE_BACKEND_ACCESS_CONTROL is on by default and isolates datasets per user · stars cover the whole Cognee framework.
docker run -e TRANSPORT_MODE=http --env-file ./.env -p 8000:8000 cognee/cognee-mcp:main
claude mcp add cognee -t http http://localhost:8000/mcp
Strengths
- Per-user dataset access control on by default, plus a DNS-rebinding guard.
- Fully local option with embedded databases.
Weaknesses
- Needs
LLM_API_KEY; Claude Code does not grant MCP sampling, so it cannot borrow the host model. - Saves only on tool calls.
- Cognee Cloud pricing is not on the MCP page, and it is not in the official MCP Registry.
Best for: a self-hosted graph and vector memory where each user's data stays separate.
11. Engram
A single Go binary storing memory in SQLite with FTS5 at ~/.engram/engram.db, with no embeddings and no API key (README).
Key facts: local · CLI, HTTP API, MCP over stdio and a TUI · 14 setup targets including Claude Code, Codex, Windsurf, Cursor, OpenCode and Gemini CLI · Git Sync exports compressed chunks for sharing; optional project-scoped Engram Cloud.
brew install gentleman-programming/tap/engram
engram setup claude-code
Strengths
- Zero dependencies to install or run.
- Team sharing through Git with no server.
- Flags related or conflicting memories.
Weaknesses
- Keyword search only; semantic search is not documented.
- The README does not say how much the plugins capture without a tool call.
- The Codex integration has version preconditions.
Best for: a minimal local memory that a team syncs through Git.
12. Graphiti MCP
A bi-temporal knowledge graph: facts carry dates, search_memory_facts filters by them, and historical queries work without recomputing the graph (README). It is the open engine behind Zep.
Key facts: self-hosted · HTTP by default at http://localhost:8000/mcp/, or stdio · FalkorDB (default, bundled in one container) or Neo4j 5.26+ · OpenAI by default, also Anthropic, Gemini, Groq, Azure and Ollama · 13 tools · namespaces through --group-id · stars cover the whole Graphiti framework.
cd graphiti/mcp_server && docker compose up
Strengths
- Temporal edges and date-filtered fact search.
- Active parent project (v0.31.2 on 2026-10-20).
Weaknesses
- The README calls it a reference implementation, says not to use it as a production deployment, and states it has no authentication, no authorization and no prompt-injection protection.
- Needs an LLM call on every ingest.
- Saves only on tool calls; Claude Code is not among the documented clients.
Best for: experimenting with temporal graph memory on a trusted local machine.
13. MemPalace
Stores conversations verbatim, organized into wings (people and projects), rooms (topics) and drawers (original content), on a retrieval backend you pick: embedded Chroma (default), sqlite_exact, rust_exact or pgvector (README).
Key facts:
…