The Problem: Every AI Agent Has Amnesia

You spend 45 minutes explaining your project structure, coding conventions, and architectural decisions to Claude Code. It produces excellent work. You close the session. The next day you open a new session, and it has forgotten everything. You start over.

This is the default experience with every AI coding assistant in 2026. Claude Code, Cursor, Windsurf, Cline -- they all share the same fundamental limitation. The context window is temporary. When the session ends, the memory is gone. Your agent does not know your name, your project, your preferences, or the decisions you made yesterday.

87%
of developers report re-explaining project context to AI assistants as their top frustration
15-20 min
average time lost per session re-establishing project context from scratch
6x
growth in MCP memory server downloads on npm between Q3 2025 and Q1 2026

MCP memory servers solve this. They give your AI agent a persistent brain that survives across sessions, remembers your project decisions, recalls your coding preferences, and learns from every interaction. The question is not whether you need one. The question is which one.

What Is an MCP Memory Server?

The Model Context Protocol (MCP) is a standard that lets AI assistants connect to external tools and data sources. An MCP memory server is a specific type of MCP server that provides persistent storage and retrieval of knowledge. Your AI agent can write memories to it and read them back later, even in a completely new session.

The concept is simple. The implementation varies significantly across servers. Some use knowledge graphs with entities and relations. Others use semantic search with TF-IDF or vector embeddings. Some require Docker, Python, and API keys. Others install with a single npm command. The differences matter because they determine how much friction stands between you and a working persistent memory for your agent.

Every server on this list works with Claude Code, Cursor, Windsurf, Cline, and any other MCP-compatible client. The integration is the same across all of them: you add a JSON configuration to your MCP settings, and the server's tools become available to your agent.

The 6 Best MCP Memory Servers Compared

Installation for Claude Code:

# One command. That's it.
claude mcp add memory -- npx mcp-smart-memory

Installation for Cursor / Windsurf / other MCP clients:

// Add to your MCP configuration JSON
{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["mcp-smart-memory"]
    }
  }
}

Smart Memory MCP is free and open source. Install it in 30 seconds and give your agent persistent memory.

Get Smart Memory MCP
🔬
2. Anthropic Knowledge Graph Memory Server

npm: @modelcontextprotocol/server-memory | Language: TypeScript | Storage: Local JSON

This is Anthropic's official reference implementation of a memory MCP server. It uses a knowledge graph model with three primitives: entities (nodes), relations (edges), and observations (facts about entities). It stores everything in a local JSON file and provides tools to create, search, and delete graph nodes.

The strength of this approach is structured relational data. If your agent needs to track how concepts connect to each other -- how a module depends on another, how a person relates to a project -- the graph model represents that cleanly. The weakness is that the agent needs to structure every memory as entities and relations, which adds cognitive overhead to every write operation.

Best for: Developers who want an official, well-maintained reference implementation from Anthropic with a relational data model.

Pros: Official Anthropic project. Well-documented. Zero external dependencies. Good for structured relational data.

Cons: No semantic search (string matching only). Agent must structure data as entities/relations, which increases prompting complexity. No similarity scoring. Minimal search capability compared to dedicated search-first servers.

# Install for Claude Code
claude mcp add memory -- npx @modelcontextprotocol/server-memory
💫
3. Mem0 OpenMemory MCP

Install: Docker + @openmemory/install | Language: Python | Storage: Local (Qdrant vector DB)

Mem0 OpenMemory is the most feature-rich option on this list. It provides a unified memory layer across all your MCP clients with a built-in web dashboard, semantic search powered by Qdrant vector embeddings, and tools for storing, querying, listing, and reinforcing memories. It also tracks which MCP client created each memory, giving you visibility into cross-tool context sharing.

The trade-off is setup complexity. OpenMemory requires Docker to run its infrastructure (Qdrant, the MCP server, and the dashboard), and it needs an OpenAI API key for generating embeddings. That means your memory content is sent to OpenAI for vectorization -- a deal-breaker for some developers working with sensitive codebases.

Best for: Teams that want a full-featured memory platform with a dashboard and are comfortable with Docker and OpenAI API costs.

Pros: Vector-based semantic search. Web dashboard for browsing memories. Cross-client memory sharing. Active development with strong community.

Cons: Requires Docker. Requires OpenAI API key (data sent to OpenAI). Heavier setup. Not fully local -- embeddings are computed via cloud API.

# Clone and run with Docker
git clone https://github.com/mem0ai/mem0.git
cd mem0/openmemory
# Add OPENAI_API_KEY to .env
make build && make up
🗃
4. mcp-memory-service (doobidoo)

Install: pip install mcp-memory-service | Language: Python | Storage: Local SQLite + ChromaDB

This Python-based server offers AI-powered memory with ChromaDB for embeddings and SQLite for storage. It claims 5ms retrieval speed and features both natural memory triggers (85%+ accuracy) and rule-based context-provider patterns for guaranteed coverage. It supports tags, metadata, time-based recall, and similarity scoring.

The feature set is comprehensive: semantic search via embeddings, time-based recall (find memories from "last week"), tag management, individual deletion, and optional Cloudflare cloud sync for backup. It also has a companion dashboard project for visual memory browsing.

Best for: Python-centric developers who want embedding-based semantic search without Docker overhead.

Pros: Embedding-based semantic search. Fast retrieval (5ms claimed). Time-based recall. Optional cloud sync. Active development. Dashboard available.

Cons: Requires Python + pip. ChromaDB adds storage overhead. More complex setup than npm-based servers. Embedding model downloads required on first run.

# Install via pip
pip install mcp-memory-service
# Auto-configure for Claude Desktop
python -m mcp_memory_service.scripts.installation.install --quick
📖
5. Basic Memory

Install: pip install basic-memory or uvx basic-memory | Language: Python | Storage: Local Markdown + SQLite

Basic Memory takes a different approach: it stores knowledge as Markdown files organized into a local knowledge graph. Each note can have tags, observations, and links to other notes, creating a web of interconnected knowledge that both humans and AI can read. It integrates with Obsidian, making it a strong choice for developers who already use Obsidian for note-taking.

The key differentiator is human readability. Every memory is a plain Markdown file you can open, edit, and organize in any text editor or Obsidian vault. The AI writes to the same files you read. The SQLite index enables full-text search and entity traversal without parsing files at query time.

Best for: Obsidian users and developers who want human-readable knowledge files that double as AI memory.

Pros: Human-readable Markdown files. Obsidian integration. Knowledge graph traversal. Multi-project support. Full data ownership and transparency.

Cons: Requires Python. Setup is more involved than a single npm command. Search is index-based, not semantic similarity. Knowledge graph structure requires consistent formatting.

# Install via uvx (recommended)
uvx basic-memory
# Or via pip
pip install basic-memory
🏦
6. Memory Bank MCP

npm: @memory-bank/mcp | Language: TypeScript | Storage: Local Markdown files

Memory Bank MCP is inspired by Cline's memory bank concept. It stores project context in structured Markdown files: product context, active context, progress, decisions, and system patterns. Each response from the AI begins with a status indicator like [MEMORY BANK: ACTIVE] to show whether memory is loaded.

This is the most project-management-oriented server on the list. Rather than general-purpose memory, it is designed to maintain structured project documentation that the agent reads at the start of each session. It works best for maintaining project state across long-running development efforts.

Best for: Cline users and developers who want structured project documentation that the AI maintains automatically.

Pros: npm install, no Python. Structured project documentation. Status indicators. Mode-specific behavior with .clinerules files.

Cons: More project-management than general memory. No semantic search. Markdown file structure can become unwieldy for large projects. Less flexible for ad-hoc knowledge storage.

# Install via npx
npx @memory-bank/mcp

Side-by-Side Comparison Table

Feature Smart Memory MCP Anthropic KG Mem0 OpenMemory mcp-memory-service Basic Memory Memory Bank
Install time ~30 sec ~30 sec 10-20 min 2-5 min 2-5 min ~1 min
Language JavaScript TypeScript Python Python Python TypeScript
Install method npx npx Docker pip pip / uvx npx
Semantic search TF-IDF No Vector (Qdrant) Embeddings Index-based No
Requires API keys No No OpenAI key No No No
Requires Docker No No Yes No No No
Requires Python No No Yes Yes Yes No
100% local Yes Yes Mostly* Yes Yes Yes
Recency boost Yes No No Time-based recall No No
Pattern detection Yes (Pro) No No No No No
Web dashboard No No Yes Yes No No
Human-readable files JSON JSON Vector DB SQLite DB Markdown Markdown
Price Free / $29 Pro Free Free (+ API costs) Free Free Free

* Mem0 OpenMemory runs locally but sends data to OpenAI for embedding generation.

Which One Should You Use?

There is no single correct answer, but after testing all six, here is a practical decision framework.

Quick Decision Guide

  • Want it working in 30 seconds with zero friction? Use Smart Memory MCP. One command, no dependencies, TF-IDF search out of the box.
  • Need an official, Anthropic-maintained reference? Use the Knowledge Graph Memory Server. Reliable and well-documented, though limited in search.
  • Want the most powerful semantic search and have Docker? Use Mem0 OpenMemory. Full vector search with a web dashboard, but requires Docker and an OpenAI key.
  • Prefer Python and want embedding-based search without Docker? Use mcp-memory-service. ChromaDB embeddings, fast retrieval, pip install.
  • Use Obsidian and want human-readable memory files? Use Basic Memory. Your AI's memory is your Obsidian vault.
  • Coming from Cline and want structured project docs? Use Memory Bank MCP. Project-oriented memory with status indicators.

For most developers, the deciding factor is installation friction. If you just want persistent memory working immediately with the least possible setup, Smart Memory MCP is the clear choice. A single npm command, no Python, no Docker, no API keys, no database engines. The TF-IDF search is genuinely good for the typical memory use case: finding project decisions, coding conventions, and preferences that the agent stored in earlier sessions.

If you need the most powerful search and are willing to pay the setup cost, Mem0 OpenMemory or mcp-memory-service deliver embedding-based semantic search that handles more nuanced queries. The trade-off is installation complexity and, in Mem0's case, data leaving your machine for embedding computation.

If your priority is data transparency and human readability, Basic Memory wins. Every memory is a Markdown file you can open in your editor. The downside is that it requires Python and the search is less sophisticated than TF-IDF or embedding-based approaches.

A Note on Search Quality

The servers on this list use four different approaches to finding relevant memories:

For most developer workflows -- recalling project decisions, coding conventions, architecture notes, and personal preferences -- TF-IDF provides excellent results without the complexity of embeddings. Vector embeddings become important when you have large knowledge bases with subtle semantic distinctions, which is uncommon for individual developer memory use cases.

Give Your AI Agent a Memory That Lasts

Smart Memory MCP installs in one command and gives your agent persistent memory with TF-IDF semantic search. Free, open source, zero dependencies.

Get Smart Memory MCP

Free tier: 3 core tools, unlimited entries, 100% local. No signup required.

Frequently Asked Questions

What is an MCP memory server?

An MCP memory server is a Model Context Protocol server that gives AI agents persistent memory across sessions. Without one, your AI assistant forgets everything every time you close the chat. An MCP memory server stores knowledge -- facts, preferences, project context, decisions -- and lets the agent recall it in future sessions using search or semantic retrieval. It works with any MCP-compatible client including Claude Code, Cursor, Windsurf, and Cline.

Which MCP memory server is best for Claude Code?

Smart Memory MCP (mcp-smart-memory) is the best option for Claude Code. It installs with a single command (claude mcp add memory -- npx mcp-smart-memory), requires zero configuration, stores data locally as JSON files, and provides TF-IDF semantic search with recency boosting. No Python, no Docker, no API keys. For developers who prefer a knowledge-graph approach, Anthropic's official @modelcontextprotocol/server-memory is a solid alternative, though it lacks semantic search.

Do MCP memory servers send my data to the cloud?

It depends on the server. Smart Memory MCP, Basic Memory, Memory Bank MCP, and the official Anthropic server-memory all store data locally on your machine with zero cloud dependency. Mem0 OpenMemory runs locally but requires an OpenAI API key for embeddings, which means your data is sent to OpenAI for vectorization. The mcp-memory-service stores data locally by default but offers optional Cloudflare cloud sync. Always check the documentation to understand where your data goes before storing sensitive project context.

Can I use MCP memory servers with Cursor, Windsurf, and other editors?

Yes. Any MCP memory server works with any MCP-compatible client. This includes Claude Code, Cursor, Windsurf, Cline, VS Code with Copilot, JetBrains IDEs, and more. The configuration is typically a JSON block in your editor's MCP settings that specifies the server command. For Smart Memory MCP, add {"mcpServers": {"memory": {"command": "npx", "args": ["mcp-smart-memory"]}}} to your MCP config.

What is the difference between a knowledge graph memory server and a semantic search memory server?

A knowledge graph memory server (like Anthropic's server-memory or Basic Memory) stores information as entities, relations, and observations in a structured graph. It excels at mapping relationships between concepts but requires the agent to structure data precisely. A semantic search memory server (like Smart Memory MCP or mcp-memory-service) stores memories as entries and retrieves them using similarity matching. It is more flexible for unstructured knowledge and generally easier for agents to use, since they can store free-form text and still find it later through natural language queries.

How do I install an MCP memory server?

The simplest option is Smart Memory MCP: claude mcp add memory -- npx mcp-smart-memory for Claude Code. The official Anthropic server uses npx @modelcontextprotocol/server-memory. Python-based servers like mcp-memory-service and Basic Memory install via pip install. Mem0 OpenMemory requires cloning a Git repository and running Docker. Most servers need no API keys or external services, with the exception of Mem0 which requires an OpenAI key for embeddings.