Best MCP memory servers for Claude Code and Cursor in 2026: 8 options compared
The best MCP memory server depends on where your memory needs to live and who has to share it. For a single developer who wants zero infrastructure, the official Knowledge Graph Memory server or Basic Memory is enough. F
The best MCP memory server depends on where your memory needs to live and who has to share it. For a single developer who wants zero infrastructure, the official Knowledge Graph Memory server or Basic Memory is enough. For a team that shares memory across Claude Code, Cursor and other agents, you want a server with real scoping (per project, per collection or per space), hybrid search, and authentication: HydraDB, Supermemory, Mem0 or a self-hosted mcp-memory-service. If you need a temporal knowledge graph and are willing to run it yourself, use Graphiti.
This guide compares eight MCP memory servers on the things that actually break in practice: search quality, scoping, auth, concurrency and cost. Every claim comes from the project's own README, docs or pricing page, and the tool lists below come from running a small smoke-test script (included) against the servers that start without an account.
TL;DR: which MCP memory server should you choose?
- For shared team memory across Claude Code, Cursor and Codex with hybrid search and graph context, choose HydraDB.
- For a zero-dependency local memory file you fully control, choose the official Knowledge Graph Memory server.
- For memory you can read and edit as Markdown notes, choose Basic Memory.
- For a self-hosted, Apache-2.0 memory service with OAuth and a dashboard, choose mcp-memory-service.
- For temporal facts ("what was true in March?") on your own graph database, choose Graphiti MCP.
- For memory plus a code graph your agent can query, choose Cognee MCP.
- For a hosted memory API with nothing to run and OAuth sign-in, choose Mem0 or Supermemory.
What is an MCP memory server?
An MCP memory server is a Model Context Protocol server that gives an AI client tools to save and recall information across sessions. Claude Code, Cursor, Codex, Windsurf and Claude Desktop all speak MCP, so one memory server can serve every tool you use. The client decides when to call the tools; the server decides how memory is stored, searched, scoped and secured.
That split matters. The client's built-in memory (CLAUDE.md, Cursor rules, project memories) is a file the model reads at startup. An MCP memory server is a queryable store the model searches on demand, which is what you need once memory outgrows a single file or has to be shared.
How we evaluated these servers
We looked at five criteria, in the order teams usually hit them:
- Retrieval: keyword-only, semantic, or hybrid. Substring search fails as soon as the question is phrased differently from the stored note.
- Scoping: can one server keep project A's memory away from project B, and can a tool call say which scope it means?
- Auth and sharing: local process only, or a remote server with OAuth or API keys so a team can share it safely?
- Concurrency and scale: what happens when two agents write at once, or when memory grows to tens of thousands of items?
- Cost and license: open source license, self-hosting, and the published price of the hosted tier.
Test any MCP memory server in 60 seconds
Before committing to a server, list its tools. The script below speaks MCP over stdio using only the Python standard library: it lists tools, flags destructive ones from their annotations, shows which tools accept a scope argument, and optionally runs tool calls with timing.
"""Smoke-test any stdio MCP memory server before you wire it into Claude Code or Cursor.
Usage:
python mcp_memory_smoke.py [--call TOOL JSON_ARGS]... -- <server command...>
"""
import json, subprocess, sys, time
SCOPE_KEYS = {"namespace", "collection", "group_id", "group_ids", "database",
"user_id", "agent_id", "project", "space", "containerTag"}
def main(argv):
calls, i = [], 0
while argv[i] != "--":
if argv[i] == "--call":
calls.append((argv[i + 1], json.loads(argv[i + 2])))
i += 3
else:
sys.exit(f"unknown flag {argv[i]}")
cmd = argv[i + 1:]
proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.DEVNULL, text=True)
next_id = 0
def rpc(method, params=None):
nonlocal next_id
next_id += 1
msg = {"jsonrpc": "2.0", "id": next_id, "method": method, "params": params or {}}
proc.stdin.write(json.dumps(msg) + "\n"); proc.stdin.flush()
while True: # skip notifications until our response arrives
reply = json.loads(proc.stdout.readline())
if reply.get("id") == next_id:
if "error" in reply:
raise RuntimeError(reply["error"])
return reply["result"]
init = rpc("initialize", {"protocolVersion": "2025-06-18", "capabilities": {},
"clientInfo": {"name": "smoke", "version": "0.1"}})
proc.stdin.write(json.dumps({"jsonrpc": "2.0", "method": "notifications/initialized"}) + "\n")
proc.stdin.flush()
print(f"server: {init['serverInfo']['name']} {init['serverInfo'].get('version', '')}")
tools = rpc("tools/list")["tools"]
for t in tools:
ann = t.get("annotations") or {}
props = set((t.get("inputSchema") or {}).get("properties", {}))
flags = []
if ann.get("destructiveHint") and not ann.get("readOnlyHint"):
flags.append("DESTRUCTIVE")
if ann.get("readOnlyHint"):
flags.append("read-only")
if props & SCOPE_KEYS:
flags.append("scope=" + ",".join(sorted(props & SCOPE_KEYS)))
print(f" {t['name']:<28} {' '.join(flags)}")
scoped = sum(1 for t in tools if set((t.get('inputSchema') or {}).get('properties', {})) & SCOPE_KEYS)
print(f"{len(tools)} tools, {scoped} accept a scope argument")
for name, args in calls:
start = time.perf_counter()
result = rpc("tools/call", {"name": name, "arguments": args})
ms = (time.perf_counter() - start) * 1000
text = " ".join(" ".join(c.get("text", "") for c in result.get("content", [])).split())
print(f"call {name} ({ms:.0f} ms): {text[:160]}")
proc.terminate()
if __name__ == "__main__":
main(sys.argv[1:])
Here is a write in one session and two searches in a second, separate process against the official memory server, which stores everything in one JSONL file:
export MEMORY_FILE_PATH=/tmp/team-memory-demo.jsonl
python mcp_memory_smoke.py --call create_entities \
'{"entities":[{"name":"payments-service","entityType":"repo","observations":["Integration tests need STRIPE_TEST_KEY from 1Password","Use pnpm, not npm"]}]}' \
-- npx -y @modelcontextprotocol/server-memory
python mcp_memory_smoke.py \
--call search_nodes '{"query":"pnpm"}' \
--call search_nodes '{"query":"which package manager"}' \
-- npx -y @modelcontextprotocol/server-memory
server: memory-server 2.2.2
create_entities
...
delete_entities DESTRUCTIVE
read_graph read-only
search_nodes read-only
open_nodes read-only
9 tools, 0 accept a scope argument
call search_nodes (7 ms): { "entities": [ { "name": "payments-service", ...
call search_nodes (1 ms): { "entities": [], "relations": [] }
Memory survived across processes, which is the whole point. But "which package manager" found nothing, because search_nodes matches text in entity names, types and observations rather than meaning. That one result is the best argument for hybrid search in a memory server. The same script against Basic Memory 4.1.3 reported 12 tools, 11 accept a scope argument (all project-scoped), and against HydraDB's local server 1.11.1 it reported 39 tools by default, 22 after withholding the connector tools.
8 best MCP memory servers in 2026
1. HydraDB MCP server
Best for: teams that want one memory layer shared by Claude Code, Cursor, Codex and their own agents, with hybrid search and knowledge-graph context.
Overview: HydraDB is an open source context and memory database. Its MCP server (hydra-db/hydradb-mcp, Apache-2.0) runs as a hosted remote server at https://mcp.hydradb.com, as a local stdio process via npx -y @hydradb/mcp@^1.1.0, or as a self-hosted HTTP server from npm or Docker.
Key features:
-
hydradb_querysearches memories and ingested documents together and returns knowledge-graph relations with each result. The default is hybrid search (alpha0.8, from 0 = keyword to 1 = vector);recency_biasre-ranks toward recently updated sources without excluding older ones, andtemporal_reasoningresolves time-based questions using dated facts. - Scoping by database and collection: give each repo its own
HYDRADB_COLLECTIONto isolate it, or point several projects at the same collection to share context. Tools acceptdatabaseandcollectionper call. - Per-item access lists:
hydradb_updatecan replace an item's access list, and ingested app records can carry ACLs (__private__,__public__or named principals). - Sign in with OAuth (no API key in your config) or use API-key headers for CI and servers. An OAuth connection can be confined to one database and collection.
- Optional Cypher graph tools and connector tools, each of which can be withheld (
HYDRADB_MCP_GRAPH_TOOLS=0,HYDRADB_MCP_CONNECTOR_TOOLS=0,HYDRADB_MCP_DATABASE_TOOLS=0). - Native plugins for Claude Code and Cursor that recall context before each prompt and save conversations automatically, so you are not relying on the model to remember to call a tool.
Pricing: open source and free to self-host. The managed Ship plan has a $25/month minimum with assisted graph creation at $0.70 per 1M tokens and storage at $0.50/GB-month; Scale starts at a $300/month minimum; Enterprise is custom (pricing).
Key strengths: one query over memories and documents; hybrid search by default; explicit scope on every tool; OAuth for teams; the same backend behind MCP, plugins and a CLI.
Where the fit breaks down: the default tool surface is large (39 tools in our run), which costs context in clients that load every tool schema; withhold the families you do not need. Memory and the Cypher graph are separate surfaces (hydradb_query cannot see graph data). And the hosted server needs a HydraDB account, which is overkill if you only want a personal notes file.
2. Official Knowledge Graph Memory server
Best for: a single developer who wants a local, inspectable memory file and nothing else.
Overview: the reference memory server from the MCP project (@modelcontextprotocol/server-memory) stores entities, relations and observations in a JSONL file.
Key features: nine tools (create_entities, create_relations, add_observations, three delete tools, read_graph, search_nodes, open_nodes); MEMORY_FILE_PATH to choose where the file lives; a lock file so several client processes can share one file on a local filesystem; optional caps (MEMORY_MAX_ENTITIES, MEMORY_MAX_RELATIONS, MEMORY_MAX_FILE_BYTES).
Pricing: free and open source.
Key strengths: no services, no API keys, plain JSONL you can diff and back up.
Where the fit breaks down: search is text matching, not semantic (see the empty result above). Every write rewrites the whole file; the README's own example is about 24 MB and roughly 0.4 seconds per write at 100,000 entities. There is no scoping argument and no auth, and the lock relies on a local filesystem, so it is not a team server. Also set MEMORY_FILE_PATH explicitly: the default location sits inside the npx cache and can be deleted on update.
3. Basic Memory
Best for: developers who want memory as Markdown notes that both they and the AI edit.
Overview: Basic Memory (AGPL-3.0) keeps knowledge as local Markdown files with observations and wikilinks, indexed for search.
Key features: hybrid full-text plus vector search with FastEmbed embeddings on SQLite or Postgres, optional cross-encoder reranking, project-scoped tools (11 of 12 in our run take project), optional cloud sync and a Teams workspace.
Pricing: free locally. Cloud is $19/month, Pro $99/month and Business $249/month per workspace (pricing).
Key strengths: human-readable memory you can put in git, real hybrid search, good project scoping.
Where the fit breaks down: AGPL-3.0 matters if you plan to embed or host it as part of a product. Notes-as-files is ideal for a person; for many agents writing structured facts at volume, a database-backed server is easier to govern.
4. mcp-memory-service
Best for: teams that want a self-hosted, Apache-2.0 memory service shared over HTTP with OAuth.
Overview: mcp-memory-service is a memory backend with MCP, REST, CLI and a web dashboard.
Key features: SQLite, Cloudflare or Hybrid (local reads with background cloud sync) backends; semantic search combined with BM25; tag-based scoped retrieval, including automatic agent:<id> tags from an X-Agent-ID header on the REST API; OAuth 2.0 for remote MCP clients; a knowledge graph with typed edges; a dashboard for browsing and managing memories.
Pricing: free and open source (Apache-2.0); you pay for whatever you host it on.
Key strengths: one service for every transport, local-first storage with optional sync, and permissive licensing.
Where the fit breaks down: you own operations, backups and upgrades. Separation is by tags rather than hard tenants, so plan your tag conventions for projects and people before everyone writes to the same store.
5. Graphiti MCP server (Zep)
Best for: temporal knowledge graphs where facts change over time and you want to ask what was true when.
Overview: the Graphiti MCP server exposes Graphiti (Apache-2.0), a framework for temporally aware knowledge graphs.
Key features: add_memory for episodes (text, JSON or messages), search_nodes and search_memory_facts with semantic and hybrid search, group_id to separate data, FalkorDB (default) or Neo4j backends, and multiple LLM and embedding providers for extraction.
Pricing: open source; you pay for the graph database and the LLM calls used to extract entities and facts.
Key strengths: the most explicit temporal model in this list, with provenance from episodes to the entities and facts they produced.
Where the fit breaks down: the README states plainly that the server is a reference implementation with no authentication or authorization and should not be used as a production deployment. Every write also triggers LLM extraction, which adds cost and latency compared with storing a note.
6. Cognee MCP
Best for: combining agent memory with a queryable code graph.
Overview: cognee-mcp runs Cognee's memory engine (Apache-2.0) as an MCP server over stdio, SSE or Streamable HTTP, locally or against Cognee Cloud.
Key features: a minimal memory API of remember, recall and forget, with an optional session_id for a fast session cache in front of permanent graph memory and datasets you can delete by name; code_search over an indexed code dataset with operations such as traverse, find_path and impact_analysis; cloud and API connection modes.
Pricing: open source. Cognee Cloud Standard is $0/month with 100M tokens included, then $0.10 per 1M tokens; Premium is $99/month and Business $499/month plus token usage (pricing).
Key strengths: a small memory tool surface plus code-structure questions ("what breaks if I change this function?") in the same server.
Where the fit breaks down: knowledge-graph building means an ingestion pipeline and LLM calls to configure, which is more moving parts than a notes store.
7. Mem0 MCP server
Best for: a hosted memory API with nothing to run and per-user or per-agent memory.
Overview: the Mem0 MCP server is hosted at https://mcp.mem0.ai; clients sign in through the browser or use a Platform API key.
Key features: 11 tools including add_memory, search_memories (semantic search with filters), update_memory, list_entities and list_events, scoped to users, agents, apps and runs. Mem0 also ships a Claude Code plugin.
Pricing: for the first 30 days, Mem0 covers model calls with 10,000 adds and 1,000 retrievals a month; after that you connect your own LLM key and limits rise to 50,000 adds and 10,000 retrievals a month at no charge from Mem0. Higher limits go through custom plans (pricing FAQ).
Key strengths: quick setup, structured entity scoping, an event log of memory operations.
Where the fit breaks down: the MCP server documented here is hosted, so your memories live in Mem0's platform. Each add runs LLM extraction, billed to your own key after the first 30 days.
8. Supermemory MCP
Best for: a hosted, OAuth-based memory that technical and non-technical teammates share through spaces.
Overview: Supermemory MCP runs at https://mcp.supermemory.ai/mcp; you sign in and choose which spaces a client may access. The repository is MIT-licensed.
Key features: search_memory, add_memory, forget_memory, list_memories and get_profile; spaces to separate projects; file uploads.
Pricing: Free ($5 of usage included), Pro $19/month, Max $100/month, Scale $399/month (pricing).
Key strengths: very low setup cost, OAuth instead of keys, spaces that map cleanly to teams.
Where the fit breaks down: search_memory reads one space at a time, and usage-based billing needs watching once agents write automatically.
Comparison table
| Server | Retrieval | Scoping | Auth / remote | License | Hosted price from |
|---|---|---|---|---|---|
| HydraDB | Hybrid + graph context | Database, collection, per-item ACL | OAuth or API key; remote, local or self-hosted | Apache-2.0 (MCP server) | $25/mo minimum |
| Official memory server | Text match | None | Local process only | MIT / Apache-2.0 | Free |
| Basic Memory | Hybrid FTS + vector | Project | Local; cloud optional | AGPL-3.0 | $19/mo |
| mcp-memory-service | Semantic + BM25 | Tags | OAuth 2.0 remote | Apache-2.0 | Self-hosted |
| Graphiti MCP | Semantic + hybrid, temporal | group_id |
None (reference implementation) | Apache-2.0 | Self-hosted |
| Cognee MCP | Knowledge graph | Dataset, session | Local or Cognee Cloud | Apache-2.0 | $0 + tokens |
| Mem0 MCP | Semantic | User, agent, app, run | OAuth or API key; hosted | Apache-2.0 (OSS core) | Free tier, BYOK |
| Supermemory MCP | Semantic | Space | OAuth; hosted | MIT | Free, $19/mo |
How to choose an MCP memory server
- Who reads the memory? One person on one machine: a local file or Markdown notes is fine. A team or several agents: pick a server with authentication and an explicit scope on every call.
- How will people ask? If questions will not reuse the exact words of the stored note, you need semantic or hybrid retrieval. Run the "which package manager" test above on your shortlist.
-
Do facts change? If "we moved from npm to pnpm" must override the old fact, look for temporal handling (Graphiti, HydraDB's
temporal_reasoningandrecency_bias) or a clear update/forget tool. - What does a write cost? LLM extraction on every add improves structure but costs tokens and latency. A plain note store is cheaper per write.
- How many tools land in context? Count them with the script. Big tool surfaces are fine if you can switch families off.
- Does the agent have to remember to call it? MCP tools are model-invoked. If you need recall on every prompt, use a client plugin or hook (HydraDB, Mem0 and Supermemory all ship Claude Code plugins) on top of the MCP server.
FAQ
What is the best MCP memory server for Claude Code?
For a team, a server with hybrid search, scoping and a Claude Code plugin for automatic recall; HydraDB, Mem0 and Supermemory all fit, and HydraDB adds document search and graph context in the same query. For one developer, the official memory server or Basic Memory.
Can Claude Code and Cursor share the same MCP memory?
Yes. Point both clients at the same server and scope. With a remote server (HydraDB, Mem0, Supermemory, or a self-hosted mcp-memory-service), both connect to one URL. With the official server, both can share one MEMORY_FILE_PATH on the same machine.
Is the official MCP memory server good enough?
For personal use, yes. Its limits are text-only search, whole-file rewrites as the graph grows, and no auth or scoping.
Do MCP memory servers do semantic search?
Most do. The official reference server does not; Basic Memory, mcp-memory-service and HydraDB combine keyword and vector search, and Mem0 and Supermemory offer semantic search.
Which MCP memory servers are open source?
The official server, Basic Memory (AGPL-3.0), mcp-memory-service, Graphiti, Cognee, Mem0's open source core, Supermemory's repository (MIT) and HydraDB's MCP server and plugins (Apache-2.0).
How do I keep project memory separate in a shared server?
Use the server's scope argument: a HydraDB collection per repo, a Basic Memory project, a Graphiti group_id, a Supermemory space, or Mem0 user/agent IDs. Set it in the client config so every call carries it, and confirm with the smoke-test script that the tools actually accept it.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.