Remote OpenClaw Blog
Best Memory and RAG MCP Servers in 2026
8 min read ·
Cognee is the best memory and RAG MCP server in 2026: the topoteretes/cognee project holds 22,009 GitHub stars as of July 2026, the most in the Remote OpenClaw directory's 1,121-server Vector and Memory category, and it builds a combined knowledge graph plus vector store from your documents and chat history so an agent can recall facts across sessions. Memory and retrieval are two related jobs, though, so the seven picks below split cleanly: some give an agent persistent memory, and others give it a vector database for retrieval-augmented generation (RAG). Each is ranked by GitHub stars with a verified install command.
Memory vs RAG: How We Ranked These
Memory MCP servers give an AI agent persistent recall across sessions, while RAG MCP servers give it a vector database to store and semantically search embeddings for retrieval-augmented generation. The two overlap, because most memory systems use a vector store under the hood, but the job differs: memory is about remembering what happened, and RAG is about retrieving relevant documents on demand. This list ranks both by GitHub stars in the Remote OpenClaw Vector and Memory category, verified on July 4, 2026.
One honesty note on stars. For projects like Cognee, the star count belongs to the whole framework, not only its MCP server, so we flag those inline rather than pretending a full memory platform's stars all voted for its MCP endpoint. For a documentation-focused retrieval tool that complements these, see our Context7 MCP guide.
The 7 Best Memory and RAG MCP Servers in 2026
These seven servers cover knowledge-graph memory, Markdown memory, vector RAG, graph RAG, hosted memory, and a keyless reference option. Install commands were verified against each repository's README in July 2026.
1. Cognee - knowledge graph plus vector memory
Cognee (22,009 stars, counted for the whole project) turns documents and conversations into a knowledge graph layered over a vector store, so an agent retrieves structured, connected facts instead of loose text snippets. Its MCP server lives in the repo and runs via Docker, and it needs an LLM API key for embeddings. Directory page: topoteretes/cognee.
docker pull cognee/cognee-mcp:main
docker run -e TRANSPORT_MODE=http --env-file ./.env -p 8000:8000 --rm -it cognee/cognee-mcp:main
2. Basic Memory - keyless Markdown memory
Basic Memory (3,305 stars) stores an agent's memory as plain Markdown files on your disk, with observations and wikilink relations forming a local knowledge graph that both you and the agent can read and edit. It needs no API key and keeps all data on your machine. Directory page: basicmachines-co/basic-memory.
claude mcp add basic-memory -- uvx basic-memory mcp
3. Qdrant MCP - the RAG vector store
The official Qdrant MCP (1,442 stars) stores and semantically searches embeddings in Qdrant, making it the go-to server when you want an agent to build and query a RAG index. It takes a Qdrant URL, a collection name, and an embedding model as environment variables. Directory page: qdrant/mcp-server-qdrant.
claude mcp add qdrant -e QDRANT_URL="http://localhost:6333" -e COLLECTION_NAME="my-collection" -e EMBEDDING_MODEL="sentence-transformers/all-MiniLM-L6-v2" -- uvx mcp-server-qdrant
4. Neo4j MCP - graph RAG and graph memory
Neo4j MCP (971 stars) ships two servers: one translates natural language into Cypher queries against a graph database, and one stores agent memory as an explicit knowledge graph of entities and relationships. Graph RAG shines when relationships between facts matter as much as the facts. Directory page: neo4j-contrib/mcp-neo4j.
claude mcp add neo4j-memory -- uvx mcp-neo4j-memory
5. mem0 - hosted long-term memory
mem0 (656 stars) provides a hosted memory layer that stores, searches, and manages memories scoped by user, agent, or session, which suits multi-user products that need durable per-user recall. It requires a MEM0_API_KEY from the mem0 platform. Directory page: mem0ai/mem0-mcp.
claude mcp add mem0 -e MEM0_API_KEY="your-key" -- uvx mem0-mcp-server
6. Chroma MCP - the easiest local RAG store
Chroma MCP (570 stars) runs the Chroma vector database in ephemeral, persistent, HTTP, or cloud mode, so you can prototype a RAG index in memory and later point the same server at a persistent store or Chroma Cloud. Directory page: chroma-core/chroma-mcp.
claude mcp add chroma -- uvx chroma-mcp
7. Memory reference server - keyless knowledge graph
Anthropic's memory reference server stores a simple knowledge graph of entities, relations, and observations in a local JSON file, with no API key and no external database. It is the fastest way to give an agent basic persistent memory. Directory page: modelcontextprotocol/server-memory.
claude mcp add memory -- npx -y @modelcontextprotocol/server-memory
Comparison Table: Best Memory and RAG MCP Servers at a Glance
The table below compares all seven picks on job, stars, and key requirements, with star counts current as of July 4, 2026.
| Rank | Server | Best for | Stars (Jul 2026) | API key | Runs |
|---|---|---|---|---|---|
| 1 | Cognee | Knowledge-graph memory | 22,009 (project) | LLM key for embeddings | Local or Docker |
| 2 | Basic Memory | Keyless Markdown memory | 3,305 | No | Local |
| 3 | Qdrant MCP | RAG vector store | 1,442 | No (self-host) | Local |
| 4 | Neo4j MCP | Graph RAG | 971 | No (self-host) | Local |
| 5 | mem0 | Hosted per-user memory | 656 | Yes (MEM0_API_KEY) | Local |
| 6 | Chroma MCP | Easy local RAG | 570 | No (local mode) | Local |
| 7 | Memory reference server | Keyless quick start | Monorepo | No | Local |
How to Choose a Memory MCP Server
Choose by whether you need memory or retrieval, and by how much you value privacy. If you want an agent to remember facts across sessions with zero setup and zero keys, Basic Memory or the memory reference server are the safest starting points, and both keep data entirely on your machine. If you want to retrieve documents by meaning for RAG, install a vector store like Qdrant or Chroma and index your corpus into it.
Cognee sits above both categories because it does the graph and vector work for you, at the cost of an LLM API key and more moving parts. Neo4j is the pick when relationships between facts carry real meaning, and mem0 is the pick when you are shipping a product that needs isolated per-user memory. For keyless options across the whole catalog, see our best free MCP servers guide, and the full cross-category ranking lives in Best MCP Servers in 2026.
Limitations and Tradeoffs
Agent memory is a data-retention decision, not just a feature. Anything an agent writes to memory persists and can resurface in later prompts, so avoid storing secrets, and prefer local-first tools like Basic Memory when the content is sensitive. Hosted memory such as mem0 sends data to a vendor, which is fine for some products and disqualifying for others.
Stars measure popularity, not retrieval quality. Cognee's 22,009 stars belong to the whole framework, not its MCP endpoint alone, and RAG quality depends far more on your embedding model, chunking, and index settings than on a repository's star count. Treat every server as untrusted code, review the source, and read our MCP security guide before wiring one into production.
Related Guides
- Context7 MCP Server: Live Docs for Any Library
- Best Free MCP Servers in 2026: No API Key Needed
- Best MCP Servers for Claude Code in 2026
- Best MCP Servers in 2026: The Complete Ranked List
Go deeper
The operator playbooks
Production-ready PDF guides for OpenClaw and Hermes Agent — $19.99 each.
Skills for this topic
Browse all skills →Frequently Asked Questions
What is the best memory MCP server in 2026?
Cognee is the best memory MCP server in 2026, with 22,009 GitHub stars as of July 2026 across the project, because it combines a knowledge graph and vector memory so agents recall connected facts rather than loose text. For a keyless, fully private option, Basic Memory is the best choice, and for pure RAG retrieval, Qdrant MCP leads.
What is the difference between a memory MCP server and a RAG MCP server?
A memory MCP server gives an agent persistent recall of what happened across sessions, while a RAG MCP server gives it a vector database to store and semantically search documents for retrieval-augmented generation. They overlap because memory systems often use a vector store, but Basic Memory is a memory tool and Qdrant MCP is a RAG tool. Both live in
Which memory MCP server needs no API key?
Basic Memory and the memory reference server both need no API key. Basic Memory stores everything as local Markdown files, and the reference server stores a knowledge graph in a local JSON file, so both are free and keep all data on your machine. Self-hosted Qdrant and Chroma also run without a key.
Do memory MCP servers work with Claude Code?
Yes. Every server in this list installs into Claude Code with claude mcp add , for example claude mcp add basic-memory -- uvx basic-memory mcp . Once connected, the agent gains memory or retrieval tools it can call during a task. Our Claude Code MCP guide covers scopes and environment variables.
Is Cognee or mem0 better for agent memory?
Cognee is better when you want a self-hosted knowledge graph plus vector memory and can supply an LLM key for embeddings, while mem0 is better when you want a hosted, managed memory layer with per-user isolation for a product. Cognee keeps data on your infrastructure; mem0 sends it to the mem0 platform.





