Guide

The best memory MCP servers for Claude Code, compared

Claude Code forgets everything between sessions unless something remembers for it. Here are the memory MCP servers people actually use, what each stores, how it gets written, and which one fits the kind of memory you need.

Checked October 31, 2026 against each project’s README and license. We make Cachejay, one of the options; we’ve tried to describe the others as their own docs do.

Start with what’s built in

Before adding a server, use what Claude Code already has. CLAUDE.md holds rules it should always follow (build commands, conventions, what not to touch), and auto memory keeps notes it learns between sessions. For rules, a well-kept CLAUDE.md is more predictable than any server. See how to make Claude Code remember.

A memory server earns its place when you need something those files don’t do: searchable history, memory shared across Claude, Cursor and Codex, or context from outside the repository.

The options at a glance

ServerWhat it storesWho writes itLicense, costBest for
Knowledge Graph Memory (reference server)Entities, relations and facts in one local JSONL fileThe agent, when told toMIT, freeSmall personal facts; trying MCP memory for the first time
Basic MemoryMarkdown notes on your disk, linked into a graphYou and the agentAGPL-3.0, free; optional paid cloudNotes you also want to read and edit yourself
Mem0 / OpenMemoryFacts extracted from conversations, stored with embeddingsAn LLM extracts themApache-2.0, self-host; paid platformDevelopers building memory into their own agents
BeadsAn issue tracker in your repo, made for agentsThe agent, as tasksMIT, freeLong coding tasks that span many sessions
CachejayWhat you saw, said and decided on your Mac, filed by projectCaptured automaticallyPaid, 14-day trialContext from outside the repo: calls, docs, chats, other agents

The biggest difference is the third column. Most memory servers only know what the agent decides to write down. That works for facts the agent learns while coding, and misses everything that happened somewhere else.

Knowledge Graph Memory (the reference server)

The reference memory server from the MCP project stores entities (a person, a project), relations between them (“works_at”) and observations (one fact each) in a single local JSONL file. The agent creates and searches them with tools like create_entities and add_observations.

  • Good: one command to install, no account, the file is yours.
  • Watch for: it only knows what the agent chose to save, and search is plain text over the graph. You’ll want a line in CLAUDE.md telling Claude when to save and look things up.

Basic Memory

Basic Memory keeps knowledge as Markdown files on your disk that both you and the agent read and write, with links between notes forming a graph. It works with Claude, Codex, Cursor and other MCP clients, and has an optional paid cloud for syncing and teams.

  • Good: plain files you can open in any editor or Obsidian; easy to fix a wrong note by hand.
  • Watch for: AGPL-3.0 license; like the graph server, it holds what gets written into it.

Mem0 and OpenMemory

Mem0 is a memory layer for AI apps: an LLM pulls facts out of conversations and stores them for later retrieval. It’s open source under Apache-2.0 with a hosted platform, and is mostly used by developers adding memory to agents they build.

  • Good: automatic extraction, so you don’t have to tell it what to save; strong ecosystem.
  • Watch for: extraction needs a model and an API key, and more setup than the local options if all you want is memory in Claude Code.

Beads

Beads is “a memory upgrade for your coding agent”: an issue tracker that lives in your repo, so an agent can file, link and pick up tasks across sessions instead of losing its plan when the context fills.

  • Good: fits long coding work; the memory travels with the repo.
  • Watch for: it remembers work items, not general facts or anything outside the code.

Cachejay

Cachejay is the one on this list that doesn’t wait to be told. It runs on your Mac and records what you see and say: pages and docs you read, calls (transcribed on device), and your Claude Code and Codex sessions, filed by project and kept current. Claude Code reads it over MCP with tools such as search_memory, project_brief and recent_activity.

  • Good: brings in context from outside the repo (the call where the API change was agreed, the doc a teammate sent) and shares it with every agent you use.
  • Watch for: macOS only; a paid plan after a 14-day trial; it captures a lot, so read the privacy page. Password fields are never captured, and Pause Remembering in the menu bar stops capture.

How to choose

  • Rules and conventions: CLAUDE.md. No server needed.
  • Facts Claude learns while working: Knowledge Graph Memory (simplest) or Basic Memory (if you want to read the notes).
  • Multi-session coding plans: Beads.
  • Memory inside an agent you’re building: Mem0.
  • What happened outside the editor: Cachejay.

These combine. A common setup is CLAUDE.md for rules, Beads for tasks, and one memory server for everything else. Before trusting any of them, ask a real question and check the answer, as in what is an MCP memory server.

Adding one to Claude Code

# a local server, available in every project
claude mcp add memory --scope user -- npx -y @modelcontextprotocol/server-memory

# check it's connected, inside Claude Code
/mcp

Then add one line to CLAUDE.md saying when to use it, for example: “Before asking me about past decisions, search memory.” Without that, Claude often forgets the server is there. Cachejay’s setup is on the Claude page.

Questions

What is the best memory MCP server for Claude Code?

It depends on what you want remembered. For project rules, CLAUDE.md beats any server. For facts the agent should save as it works, the reference Knowledge Graph Memory server or Basic Memory are free and local. For tasks that span sessions, Beads. For context from outside the repo, such as calls, browser tabs and decisions in chat, a capture tool like Cachejay.

How do I add a memory MCP server to Claude Code?

Run claude mcp add with the server’s command, for example: claude mcp add memory --scope user -- npx -y @modelcontextprotocol/server-memory. --scope user makes it available in every project. Then run /mcp inside Claude Code to check it’s connected.

Does Claude Code have memory built in?

Yes. It reads CLAUDE.md files at startup, and can keep its own auto memory notes between sessions. A memory server adds things those don’t cover: searchable history, facts shared across tools, or context from outside the repo.

Do memory MCP servers use more tokens?

Only what the agent retrieves goes into the context, plus the server’s tool descriptions. A server that returns long, unfocused results costs more tokens than one that returns a few precise hits, so test retrieval on a real question before relying on it.

Stop explaining your day to ChatGPT

Install it, connect the apps you use, and get on with your work. Free for 14 days, no card.