Compare · checked against docs and GitHub, 4 October 2026

Best memory tools for Claude Code

Claude Code starts every session with your CLAUDE.md files and its own auto memory. That covers more than most people expect. Here is what it does, and the eight tools worth adding when you need search across more history, memory you own as files, or memory that follows you out of Claude Code.

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).

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.

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 96,000 GitHub stars on 4 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 14-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, including bulk_ingest, which saves up to 50 items in one call. export_claude_md turns your library into a CLAUDE.md-compatible context file. The same endpoint works in Claude.ai, Cursor and other MCP clients. Free plan with MCP included (30 credits 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; usage is credit-metered; the server code is source-available under the Elastic License 2.0, not open source. Claude Code + bulk_ingest walkthrough · Connect guide.

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

ToolLocal or hostedLicenceWorks outside Claude Code
Claude Code built-inlocal files—No (machine-local)
claude-memlocal worker (optional hosted observer)Apache-2.0Codex, OpenCode, Gemini CLI
Basic Memorylocal, or Cloud $15/moAGPL-3.0Claude Desktop, Cursor, VS Code, Codex
Knowledge Graph Memory serverlocalMITany MCP client running local servers
Mem0hosted or self-hostedApache-2.0Cursor, Codex, Windsurf, VS Code
Supermemoryhosted or self-hostedMITClaude Desktop, Cursor
mcp-memory-serviceself-hostedApache-2.0many clients; remote use needs your own HTTPS endpoint
Graphitilocal (Docker)Apache-2.0any MCP client
BrainTubehostedElastic-2.0 (source-available)Claude.ai, Cursor, Gemini CLI and other MCP clients

Checked against each project's docs and GitHub repository on 4 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.

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 bulk_ingest saves up to 50 items in one call. Recall's MCP server is currently read-only.
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 14-day trial, which you can skip.

Save once. Query anywhere.

For every AI you'll ever use.

Start free

Keep reading