Compare · checked against docs and GitHub, 4 October 2026 · GitHub re-checked 27 October 2026

Best memory tools for Claude Code

The best memory for Claude Code is usually the one already built in: CLAUDE.md for the rules you write and auto memory for what Claude learns, both loaded every session. Add claude-mem for automatic session capture, Basic Memory for Markdown files you own, or a hosted MCP server such as Mem0, Supermemory or BrainTube when memory has to follow you out of Claude Code. Below: what each of the eight tools does, how it installs, and its honest limits.

By Ilian Raykov, founder of BrainTube

What is the best memory tool for Claude Code?

Start with what is built in: CLAUDE.md for the rules you write, auto memory for what Claude learns. Add a tool when you need one of three things: search across a lot of session history (claude-mem), memory as plain Markdown files you own (Basic Memory), or memory that also works in Claude.ai, Cursor and other clients (a hosted MCP server such as Mem0, Supermemory or BrainTube). New to MCP? Read what MCP is and how MCP servers work.

Which Claude Code memory plugin should you install?

Three of the tools below install as Claude Code plugins: claude-mem (from the plugin marketplace) records your sessions automatically, Basic Memory keeps memory as Markdown files you own, and Mem0's plugin saves memories to its hosted service through lifecycle hooks. The rest connect as MCP servers with claude mcp add. If you are unsure, start with no plugin: CLAUDE.md and auto memory already load every session.

Quick picks

  • Best place to start: Claude Code’s own CLAUDE.md and auto memory.
  • Best automatic session capture: claude-mem.
  • Best for memory you own as local Markdown: Basic Memory.
  • Best minimal option: the official Knowledge Graph Memory server.
  • Best hosted memory for agents you build: Mem0 or Supermemory.
  • Best for a knowledge base of docs, videos and notes that Claude Code can search and write to: BrainTube.

Looking specifically to replace claude-mem, or setting up on Windows? See claude-mem alternatives.

Claude Code's built-in memory

Claude Code has two memory systems, and both load at the start of every session. CLAUDE.md files are written by you: a managed policy file, a user file in ~/.claude/CLAUDE.md, a project file (./CLAUDE.md or ./.claude/CLAUDE.md) and a local, gitignored CLAUDE.local.md, plus path-scoped rules in .claude/rules/. Anthropic recommends keeping each file under 200 lines, and /init writes a starter one.

Auto memory is written by Claude. It is on by default, stores notes in ~/.claude/projects/<project>/memory/ with a MEMORY.md index, and loads the first 200 lines or 25 KB of that index each session, reading topic files on demand. It is machine-local, so it does not follow you to another computer or a cloud session. The /memory command lists every file, toggles auto memory and opens the folder. Source: Claude Code memory docs.

1. claude-mem — automatic session capture

What it is: captures what your agent does during sessions, compresses it with AI and injects relevant context into future sessions. Install with npx claude-mem install, or from the Claude Code plugin marketplace. It runs a local worker with SQLite and Chroma for vector search, and also documents Codex, OpenCode and Gemini CLI. Apache-2.0, about 103,600 GitHub stars on 27 October 2026.

Honest limits: many moving parts (a background worker, a vector database, hooks), and Windows users have reported a long run of issues on GitHub, for example failed installs looping, console windows flashing and vector search degrading. The installer also offers an optional hosted observer with a 30-day trial. Source: github.com/thedotmack/claude-mem.

2. Basic Memory — Markdown files you own

What it is: local-first memory stored as plain Markdown that forms a knowledge graph through observations and wikilinks. Connect it to Claude Code with claude mcp add, or use its plugin. It also works with Claude Desktop, Codex, Cursor and VS Code. The local version is free (AGPL-3.0); Basic Memory Cloud is $15 a month.

Honest limits: the local install needs uv and the --prerelease=allow flag; without it, the project says, you silently get an older release. Source: github.com/basicmachines-co/basic-memory.

3. Official Knowledge Graph Memory server — the minimal option

What it is: the reference memory server from the Model Context Protocol project: entities, relations and observations stored in a local JSONL file. One command: npx -y @modelcontextprotocol/server-memory (on Windows, launch through cmd /c). Works in any MCP client that runs local servers.

Honest limits: basic by its own description, with no semantic search described, and local only. Source: modelcontextprotocol/servers.

4. Mem0 — hosted memory with a Claude Code plugin

What it is: an open-source memory layer (Apache-2.0) with a hosted MCP server documented for Claude Code, Cursor, Codex, Windsurf and VS Code, plus a Claude Code plugin that captures memories through lifecycle hooks. Self-hosting is also possible.

Honest limits: needs a Mem0 Platform account; the free tier caps retrievals at 1,000 a month. The older OpenMemory app was removed in July 2026. Sources: Mem0 MCP, pricing.

5. Supermemory — hosted MCP with OAuth

What it is: a memory API with a hosted MCP server that signs in with OAuth and can both search and add memories; MIT-licensed, with self-hosting options. Free plan with $5 of credits a month.

Honest limits: credit-metered, and the older standalone MCP repository is deprecated, so follow the current docs. Sources: MCP docs, pricing.

6. mcp-memory-service — self-hosted, many backends

What it is: self-hosted persistent memory with a knowledge graph, a REST API and local embeddings, installed with pip and added to Claude Code with claude mcp add. Backends include SQLite, Cloudflare and Milvus. Apache-2.0.

Honest limits: to use it from claude.ai or ChatGPT you have to host it yourself on a public HTTPS endpoint with OAuth. Source: github.com/doobidoo/mcp-memory-service.

7. Graphiti — temporal knowledge graphs

What it is: Zep's open-source engine for real-time knowledge graphs, with an MCP server you run through Docker Compose. Apache-2.0.

Honest limits: the heaviest setup here: a graph database plus an LLM API key for ingestion. Source: getzep/graphiti MCP server.

8. BrainTube — a knowledge base Claude Code can search and write to

What it is: BrainTube is ours, so read this entry as labelled. It is a hosted MCP server (https://mcp.brain-tube.com/mcp, nothing to install) over the docs, videos, podcasts, articles and notes you save. Claude Code can search it and write to it with tools such as add_note, ingest_content and bulk_ingest, which saves up to 50 items in one call. export_claude_md turns your library into a CLAUDE.md-compatible context file. Tested with Claude and ChatGPT; any client that speaks MCP streamable-HTTP, such as Claude.ai or Cursor, uses the same endpoint. Free plan with MCP included (30 credits a month, plus 1,000 free MCP searches a month); paid from $9 a month.

Honest limits: it is a library of what you choose to save, not automatic session capture like claude-mem; AI actions are credit-metered, though MCP searches have a free monthly allowance; the server code is source-available under the Elastic License 2.0, not open source. Connect guide.

Memory beyond Claude Code

Everything Claude Code remembers stays on one machine and in one client. If you also work in Claude.ai, ChatGPT or Cursor, the choice is less about plugins and more about which kind of memory you need: see the three kinds of AI memory tools and how to choose, and how to give your AI persistent memory across every tool you use. For the Claude apps specifically, Claude memory alternatives covers what the built-in memory does and what to add, and the MCP setup guide shows the per-client steps.

Also worth knowing: Serena, a coding toolkit for Claude Code, includes a simple memory system as a side feature. Letta Code is a separate agent harness rather than a Claude Code add-on, so it is not listed.

Side by side

ToolHow it installsLocal or hostedFree to startLicenceWorks outside Claude Code
Claude Code built-innothing to install (/memory, /init)local filesYes—No (machine-local)
claude-memnpx claude-mem install, or the plugin marketplacelocal worker (optional hosted observer)Yes (open source)Apache-2.0Codex, OpenCode, Gemini CLI
Basic Memoryplugin, or claude mcp add (needs uv)local, or Cloud $15/moYes (local)AGPL-3.0Claude Desktop, Cursor, VS Code, Codex
Knowledge Graph Memory servernpx -y @modelcontextprotocol/server-memorylocalYes (open source)MITany MCP client running local servers
Mem0plugin (lifecycle hooks) or hosted MCP; account neededhosted or self-hostedFree tier, 1,000 retrievals/moApache-2.0Cursor, Codex, Windsurf, VS Code
Supermemoryhosted MCP, OAuth sign-inhosted or self-hostedFree plan, $5 credits/moMITClaude Desktop, Cursor
mcp-memory-servicepip, then claude mcp addself-hostedYes (open source)Apache-2.0many clients; remote use needs your own HTTPS endpoint
GraphitiDocker Compose plus an LLM API keylocal (Docker)Yes (open source; LLM calls billed by your provider)Apache-2.0any MCP client
BrainTubeclaude mcp add with the hosted URLhostedFree plan, 1,000 MCP searches/moElastic-2.0 (source-available)Claude.ai, ChatGPT, Cursor and other MCP clients

Checked against each project's docs and GitHub repository on 4 October 2026; licences and activity re-checked on GitHub on 27 October 2026.

How we checked

Every claim above was read from the project's own documentation or GitHub repository on 4 October 2026 and is linked where it appears. Where a project did not document something, we left it out rather than guess. BrainTube is our product; its entry lists its limits too.

Related comparisons

Frequently asked

Does Claude Code have memory built in?
Yes. CLAUDE.md files hold the instructions you write at managed, user, project and local level, and auto memory stores what Claude learns in ~/.claude/projects/<project>/memory/. Both load at the start of every session.
Where does Claude Code store its memory?
Your CLAUDE.md files live in ~/.claude/CLAUDE.md, in the project (./CLAUDE.md or ./.claude/CLAUDE.md) and in a local CLAUDE.local.md. Auto memory lives in ~/.claude/projects/<project>/memory/, with a MEMORY.md index. Run /memory to see and open them.
Is Claude Code's memory shared across machines?
Auto memory is not: Anthropic documents it as machine-local, not shared across machines or cloud environments. CLAUDE.md files travel only if you commit them to the repository. For memory that follows you everywhere, use a hosted MCP memory server.
What is the best Claude Code memory tool on Windows?
Start with the built-in CLAUDE.md and auto memory, which need nothing extra. If you add a tool, hosted MCP servers such as Mem0, Supermemory or BrainTube avoid installing background workers locally; claude-mem's GitHub has a history of Windows-specific issues.
Can Claude Code save to my knowledge base?
Yes, if the memory server is read-write. Mem0, Supermemory and BrainTube expose tools for adding memories or content (BrainTube's include add_note, ingest_content and bulk_ingest, which saves up to 50 items per call). Recall's MCP server is read-only as of 4 October 2026, with write access announced as coming.
What is the best memory plugin for Claude Code?
For automatic session capture, claude-mem, installed from the Claude Code plugin marketplace or with npx claude-mem install. For memory you own as Markdown files, Basic Memory's plugin. For hosted memory that captures through lifecycle hooks, Mem0's Claude Code plugin. Try the built-in CLAUDE.md and auto memory first: they need no plugin at all.
Does Claude Code's memory carry over to Claude.ai or Claude Desktop?
No. CLAUDE.md and auto memory are files Claude Code reads on your machine; the Claude apps don't read them. For one memory in both, connect the same hosted MCP memory server to each, such as BrainTube or Supermemory.
How do I add a memory MCP server to Claude Code?
Use claude mcp add. For a local server, pass its start command, for example npx -y @modelcontextprotocol/server-memory (on Windows, launch it through cmd /c). For a hosted server, add it over HTTP with its URL, for example claude mcp add --transport http braintube https://mcp.brain-tube.com/mcp. claude-mem, Basic Memory and Mem0 also install as plugins from the Claude Code plugin marketplace.
Which Claude Code memory tools are free?
The built-in CLAUDE.md and auto memory cost nothing. claude-mem, the Knowledge Graph Memory server, mcp-memory-service and Graphiti are open source and free to self-host (Graphiti needs an LLM API key for ingestion). Basic Memory is free locally, with a $15 a month cloud plan. Mem0, Supermemory and BrainTube have free plans with monthly limits.
Is claude-mem free?
claude-mem is open source under Apache-2.0 and runs locally. Its installer also offers an optional hosted observer with a free 30-day trial, which you can skip.

Video notes on this topic

All video notes

Save once. Query anywhere.

Your YouTube library, in the AI tools you already use.

Start free

Keep reading