Large Language ModelsGenerate imagesGenerate videos

Best Memory MCP Server for Claude Code in 2027: 5 Picks Compared

Claude Code starts every session with a blank slate, and a memory MCP server fixes that. This comparison ranks five options, from a one-line official server to a temporal graph, with install commands, trade-offs and the mistakes that waste context.

Best Memory MCP Server for Claude Code in 2027: 5 Picks Compared
Cristian Da Conceicao
Founder of Picasso IA

Every Claude Code session starts with a blank head. You spent an hour yesterday explaining why the billing service retries with idempotency tokens, and today Claude asks the same question again. A memory MCP server fixes that by giving Claude a place to write facts down and look them up later.

The short answer: Basic Memory is the best memory MCP server for Claude Code for most developers, the official Memory server is the fastest way to try the idea, and Mem0, Graphiti and claude-mem win in narrower cases. This comparison draws on each project's own documentation and repositories, checked in October 2026, and it spells out the trade-offs so you can pick one without installing all five.

💡 How this ranking was built: It comes from documented behavior (storage format, tools, setup steps, license), not from a benchmark run. Check the current version of any project before you standardize a team on it.

Why Claude Code Forgets Everything

Hand erasing a whiteboard until only faint marker lines remain

Each Claude Code session begins with a fresh context window. Whatever Claude worked out yesterday, the architecture, the odd test setup, your habit of writing small commits, is gone unless something carries it across. That is not a bug. It is how a context window works, and the fix has to live outside the model.

What Built-In Memory Already Does

Claude Code ships with two mechanisms. CLAUDE.md files hold instructions you write: build commands, naming rules, architecture notes. Auto memory holds notes Claude writes itself from your corrections and preferences. Both load at the start of every conversation, and auto memory loads only its first 200 lines or 25KB.

Cork board with sticky notes and index cards above a desk

Anthropic's documentation is clear that Claude treats both as context, not enforced configuration. If a rule must never be broken, a PreToolUse hook is the right tool, not a longer CLAUDE.md.

Where Built-In Memory Runs Out

For a small project, built-in memory is enough. It starts to hurt when the work grows:

  • Nothing is searchable. Claude reads the loaded lines from the top. It cannot query a decision from three weeks ago.
  • The size limit bites. Anything beyond the first 200 lines or 25KB of auto memory is not loaded at session start.
  • Scope is per repository. Facts about you, or about three related services, need extra files and extra discipline.
  • Relationships are invisible. "The checkout service calls the ledger service" is a sentence, not a link Claude can follow.

A memory MCP server adds tools Claude can call mid-session to store, search and update facts. That one change turns memory from a file you load into a database you query.

What Makes a Memory Server Good

Long library aisle with shelves of labeled archive boxes

Star counts and launch posts do not tell you whether a server will still be useful in March. Three practical criteria do.

Storage You Can Inspect

Sooner or later Claude stores something wrong. If the memory lives in Markdown, JSONL or SQLite, you open it and fix the line. If it sits behind an API you cannot browse, you are limited to whatever delete tools the server exposes.

Retrieval That Costs Few Tokens

Claude Code prints a warning when an MCP tool returns more than 10,000 tokens and caps output at 25,000 by default, a limit you can raise with MAX_MCP_OUTPUT_TOKENS. A server that dumps its whole graph on every call burns context fast. Prefer servers with search-first tools that return snippets instead of the entire store.

Setup and Upkeep Burden

Docker, a graph database, credentials for an LLM provider, a background worker: each one is another thing that can break on a Tuesday. The best memory server is the one you are still running in six months, so weigh upkeep as heavily as features.

CriterionWhy it mattersWhat to look for
Storage formatYou will edit wrong factsMarkdown, JSONL or SQLite you can open
RetrievalEvery call spends tokensSearch tools that return snippets
Setup effortTime to the first useful memoryOne command beats Docker plus a database
Data locationPrivacy of project detailsLocal disk or a hosted account, chosen on purpose
LicenseCompany policy and sharingRead it, especially for AGPL projects

The 5 Best Options, Ranked

Basic Memory: Markdown You Own

Open leather notebook with handwritten notes and a fountain pen

Basic Memory stores what Claude records as plain Markdown files on your disk. Each note holds observations (facts with category tags) and relations (wiki-style links to other notes), and together they form a graph Claude can traverse. Because the notes are ordinary files, any text editor opens them and a Git repository tracks every change.

The main tools are write_note, read_note, edit_note, search_notes and build_context, which follows memory:// links outward from a note to gather related context.

claude mcp add basic-memory -- uvx basic-memory mcp

The project's README also lists bm install claude-code, which registers a plugin through Claude Code's marketplace.

  • Strengths: human-readable storage, easy diffs and reviews, works with any MCP client.
  • Trade-offs: AGPL-3.0 license, which some companies restrict, and it needs Python tooling (uvx).
  • Verdict: the best overall pick, because you can always see and correct what Claude believes.

Official Memory Server: Zero Setup

Person adjusting pins on a wall of index cards connected by red string

@modelcontextprotocol/server-memory comes from the Model Context Protocol project itself. It keeps a local knowledge graph of entities, relations and observations, and exposes nine tools: create_entities, create_relations, add_observations, delete_entities, delete_observations, delete_relations, read_graph, search_nodes and open_nodes.

Installation is one line, with one habit worth adding. Point MEMORY_FILE_PATH at a separate file for each project, or every project writes into the same graph.

claude mcp add --env MEMORY_FILE_PATH=/home/you/shop/memory.jsonl --transport stdio memory -- npx -y @modelcontextprotocol/server-memory

Its own README calls it a basic implementation of persistent memory, and that is fair. Use search_nodes and open_nodes for lookups, because read_graph returns the whole graph and gets expensive as it grows.

  • Strengths: nothing to sign up for, nothing to host, a file you can read.
  • Trade-offs: minimal tooling, and the structure depends on how well Claude names entities.
  • Verdict: the best first experiment, and a perfectly good long-term store for small projects.

Mem0: Hosted and Hands-Off

Bright data hall aisle between rows of black server racks

Mem0 runs a hosted MCP server at https://mcp.mem0.ai/mcp. The first time your agent calls one of its tools, the client opens a browser window and asks you to authorize your Mem0 account. There is no Docker, no database and no local file to manage.

The server exposes eleven operations, including add_memory, search_memories, get_memories, update_memory and delete_memory, plus entity and event tools for users, agents and runs.

claude mcp add --transport http mem0 https://mcp.mem0.ai/mcp

Mem0's documentation also shows an npx mcp-add one-liner for Claude Code if you prefer it.

  • Strengths: zero infrastructure, memory that follows you across machines, semantic search.
  • Trade-offs: project facts live in a third-party account, so check the terms before saving anything under an NDA.
  • Self-hosted option: a community project named mem0-mcp-selfhosted runs against Qdrant, Neo4j and Ollama. Mem0 does not maintain it, so read its repository before you rely on it.

Graphiti: Memory That Tracks Time

Wooden table with dated paper ledgers, a desk calendar and a pocket watch

Graphiti, from Zep, builds temporally aware knowledge graphs. Facts carry time, so "we used Postgres" and "we moved to Cloud SQL in March" can both exist without one overwriting the other. That matters when your project history is full of decisions that were later replaced.

Its MCP server needs Python 3.10 or newer and Docker. It defaults to FalkorDB bundled in a single container, with Neo4j 5.26 or newer recommended for production. It also calls an LLM to extract entities from what you store: OpenAI is the default, and Anthropic, Gemini, Groq, Azure OpenAI and Ollama are supported.

The server listens on http://localhost:8000/mcp/ and offers tools such as add_memory, search_nodes, search_memory_facts and get_episodes.

docker compose up
claude mcp add --transport http graphiti-memory http://localhost:8000/mcp/
  • Strengths: answers "what was true then?", handles facts that change, scales to large histories.
  • Trade-offs: the heaviest setup in this list, and every stored episode spends LLM calls.
  • Verdict: worth it for architecture decisions, contracts and customer settings that change over time. Overkill for a side project.

claude-mem: Automatic Capture

Stenographer hands resting on a stenotype machine with paper tape

claude-mem is a plugin rather than a plain MCP server, and that is its edge. Lifecycle hooks (SessionStart, UserPromptSubmit, PostToolUse, Stop and SessionEnd) watch what Claude does. A local worker compresses those observations into SQLite with full-text search, and a Chroma vector store adds semantic search. Relevant context is injected when the next session starts, so Claude never has to decide to remember. Search tools (search, timeline and get_observations) are exposed over MCP for deeper lookups.

Install it from inside Claude Code:

/plugin marketplace add thedotmack/claude-mem
/plugin install claude-mem
  • Strengths: zero habit change, a local web viewer, Apache 2.0 license, and <private> tags to exclude sensitive content.
  • Trade-offs: compression runs in the background, and the README does not say which model does it, so watch your usage. Automatic capture also records more than you would choose by hand.
  • Verdict: the right choice if you keep forgetting to tell Claude to remember.

Side-by-Side Comparison

Here is how the five options line up on the criteria that matter day to day.

OptionStorageSetup effortData locationBest for
Basic MemoryMarkdown filesOne command with uvxLocal diskMost developers
Official Memory serverJSONL graphOne npx commandLocal diskA fast first trial
Mem0 hostedMem0 cloudURL plus browser sign-inMem0 accountNo-infrastructure setups
Graphiti MCPFalkorDB or Neo4j graphDocker plus LLM credentialsYour machine or serverFacts that change over time
claude-memSQLite plus ChromaPlugin installLocal diskAutomatic capture

Which one fits your situation:

  • You want memory you can read and edit: Basic Memory.
  • You want to test the idea in a minute: the official Memory server.
  • You do not want to run anything: Mem0 hosted.
  • Your facts change and history matters: Graphiti.
  • You forget to ask Claude to remember: claude-mem.

💡 Combine carefully: Mem0 and Graphiti both expose an add_memory tool. Run two such servers together and Claude has to guess where each fact belongs. Pick one primary store and keep CLAUDE.md for rules.

How to Install Each One

Developer typing on a laptop at a cafe table in the evening

Claude Code adds servers with claude mcp add. For stdio servers, the double dash (--) separates Claude's options from the server command, and everything after it passes through untouched. Three scopes decide where a server loads:

ScopeLoads inShared with teamStored in
Local (default)Current project onlyNo~/.claude.json
ProjectCurrent project onlyYes, through version control.mcp.json
UserAll your projectsNo~/.claude.json

Use user scope for personal preferences you want everywhere. Use project scope for conventions the whole team should recall, and keep credentials out of a committed .mcp.json.

Stdio Servers: Basic and Official

Add --scope user to either command if you want the server available in every project.

# Basic Memory, available in every project
claude mcp add --scope user basic-memory -- uvx basic-memory mcp

# Official Memory server, one file per project
claude mcp add --env MEMORY_FILE_PATH=/home/you/shop/memory.jsonl --transport stdio memory -- npx -y @modelcontextprotocol/server-memory

HTTP Servers: Mem0 and Graphiti

HTTP servers use --transport http and a URL. Mem0 asks you to sign in through the browser on first use. Graphiti needs its container running before Claude connects.

# Mem0 hosted
claude mcp add --transport http mem0 https://mcp.mem0.ai/mcp

# Graphiti on localhost
claude mcp add --transport http graphiti-memory http://localhost:8000/mcp/

The Plugin Route: claude-mem

Run the two /plugin commands from the claude-mem section inside a session. After any install, run claude mcp list or type /mcp in a session to confirm the server connected. If a server shows as failed, run its command by hand in a terminal. A missing uvx, npx or Docker install is a common cause.

Mistakes That Waste Your Context

  1. Storing everything. Memory is for decisions, conventions and gotchas, not transcripts. A graph full of "ran the tests" notes makes real facts harder to find and every search more expensive.
  2. Sharing one memory across projects. The official server writes to a single file unless MEMORY_FILE_PATH says otherwise, so the shop's facts leak into the blog's session.
  3. Skipping the instruction. A server only helps when Claude calls it. Without a rule in CLAUDE.md, Claude may never search.
  4. Saving secrets. Tokens, passwords and customer data do not belong in memory. Local files are readable by anything on the machine, and hosted memory leaves the machine entirely.
  5. Trusting memory blindly. A note records what was true when it was written. Ask Claude to verify a remembered file path or flag before acting on it.

A Setup That Works in Practice

Layer the Tools

Give each layer one job:

  • CLAUDE.md holds short rules and the commands you run every day.
  • One memory MCP server holds facts that grow over time: decisions, gotchas, who owns what.
  • Hooks enforce anything that must never be skipped, because memory is context and not enforcement.

Add a few lines to CLAUDE.md so Claude actually uses the server:

## Memory
- At the start of a task, search memory for the project name and the files involved.
- After a decision, store it with the reason and today's date.
- Never store credentials, tokens or customer data.

Review Once a Week

Open the store, delete the wrong notes and merge duplicates. With Basic Memory that is a text editor and a Git diff. With a JSONL file it is a search and a careful edit. Start with one server, and add a second only when you can name the gap the first one leaves.

Try PicassoIA for Your Own Visuals

Memory servers make Claude a better teammate. PicassoIA handles the visuals that ship with your work: article headers, product shots, documentation images and short clips, all generated from a text prompt.

PicassoIA also hosts the Claude family for chat and code review. Try Claude Sonnet 5 for coding tasks, Claude Fable 5 for complex coding work, or Claude Opus 4.7 when you want long reasoning, all straight from the browser.

If you build with agents, PicassoIA exposes image and video generation through a Replicate-style API at api.picassoia.com/v1 and through an MCP connection. The models available there are PicassoIA Image, PicassoIA Image Editor Pro, PicassoIA Video and Seedance 2.5 Lite, with up to five predictions running at once per account. Check the API page for current plan requirements before you wire it in.

Ready to make your own images? Open the PicassoIA model library, pick a model, and generate your first image today. Write one prompt, change one detail, and compare the results. It is the same habit that makes a memory server worth running: small, repeatable steps that add up.

Share this article