Claude Code memory: built in, or a server?
CLAUDE.md holds your rules and auto memory holds Claude's own notes. When those two are enough, and when a memory server over MCP earns its place.
On this page
Claude Code auto memory vs CLAUDE.md is not a choice: you use both. CLAUDE.md is the file you write, with rules for how to work. Auto memory is the set of notes Claude writes for itself as you correct it. Together they are enough if you work in one tool, on one machine, with conventions that rarely change. A memory server earns its place when several agents need the same memory, when the notes outgrow what loads at the start, or when decisions need a history.
| CLAUDE.md | Auto memory | A memory server (Memorinth) | |
|---|---|---|---|
| Who writes it | You | Claude | Any connected agent, and you |
| Holds | Instructions and rules | Learnings and preferences | Memories, decisions, facts and your own notes |
| Lives in | Your repository, or ~/.claude |
~/.claude/projects/<project>/memory/ |
A folder of Markdown files you choose |
| Loaded | Whole, every session | First 200 lines or 25KB of MEMORY.md |
A briefing at the start, then searched |
| Scope | Project, user or organization | One repository, one machine | Every project, every connected agent |
| Other agents read it | Only as files they happen to open | No | Yes, over MCP |
| Install | None | None, on by default | A CLI and one setup command |
The first two columns are from Claude Code’s memory documentation, as of November 2026. The third is from Memorinth’s own code and docs. Claude Code memory: what it keeps, and where maps everything Claude Code remembers, and every guide on it.
What Claude Code’s built-in memory already does
Claude Code’s built-in memory is two systems, and both load at the start of every conversation.
CLAUDE.md is yours. You write instructions in it, and Claude Code reads the whole file. The documentation suggests keeping each one under 200 lines, because longer files use more context and are followed less well. A project’s CLAUDE.md is shared with your team through source control.
Auto memory is Claude’s. It saves notes about your role and preferences, the corrections you give, ongoing work, and where to find things outside the project. Each memory is a Markdown file, and MEMORY.md is the index. Only the first 200 lines or 25KB of that index load at the start, whichever comes first. The other files are read when Claude needs them. You can open, edit or delete any of it with /memory.
Claude Code can also read an AGENTS.md. By default it does so only when there is no CLAUDE.md in your working directory or above it, and it needs v2.1.277 or later. For what each of these files is for, see CLAUDE.md, MEMORY.md and AGENTS.md.
When built-in memory is enough
Built-in memory is enough when all three of these are true:
- You use Claude Code only. No Codex, Cursor or Gemini CLI session needs to know what Claude learned.
- You work on one machine. Or you’re happy for each machine to learn on its own.
- What matters is stable. Build commands, code style, a handful of preferences. It fits in a short
CLAUDE.mdand a short index.
If that’s you, don’t add a server. Built-in memory needs no install, runs no process, and is on already. Every extra tool is something to set up, update and trust. A memory server that only repeats what CLAUDE.md already says costs context and gives nothing back.
A good habit either way: when Claude keeps relearning the same rule, move it from auto memory into CLAUDE.md. Rules belong in the file that loads whole.
Does Claude Code memory work across machines?
Auto memory does not. The documentation says it is machine-local, and that its files are not shared across machines or cloud environments. All worktrees of one repository on the same machine share one memory folder.
CLAUDE.md does, when it’s the project file: it travels with the repository. Your user file in ~/.claude/CLAUDE.md stays where it is unless you sync it yourself.
You can move auto memory with the autoMemoryDirectory setting, so nothing stops you pointing it at a folder you sync. That is your own arrangement, not a feature.
A memory server doesn’t fix this by being a server. Memorinth has no sync between computers either. Its cortex is an ordinary folder, so you can keep it in git or in a synced folder, but nothing does that for you. If sync across devices is the main thing you want, look for a tool that offers it as a service.
When a memory server earns its place
A memory server is worth adding when one of these is true.
You run more than one agent. Auto memory belongs to Claude Code. An AGENTS.md can share your instructions between tools, but not what a session learned yesterday. With Memorinth, Claude Code, Codex, Cursor and Gemini CLI read and write one cortex, so what one learns the others know.
You work across many projects. Auto memory is kept per repository. A fix you found in one project isn’t there in the next. Memorinth uses one cortex for everything by default, with tags to keep projects apart.
The notes outgrow the index. Auto memory finds things through an index that must stay under its limit, and Claude opens the files it points to. That works well for dozens of notes. A memory server searches instead. Memorinth’s search_memory ranks by meaning as well as keywords, on a local model, and returns the matching passage. The memory can grow without the start of each session growing with it.
Decisions need a history. Auto memory can note a decision, as a plain note that Claude edits or drops later. Memorinth’s decisions are never edited. A new one supersedes the old, and both stay, so an agent knows what is current and why it changed. Facts carry a source and come up for a recheck after 180 days. Decisions and facts says why that matters.
Run both, or pick one
You can run both side by side. Keep CLAUDE.md in every case: it holds instructions, and a memory server holds knowledge. What goes where draws that line.
Auto memory and a memory server overlap more. Both store what Claude learns, so the same note can land in two places. If you add Memorinth and want one place for it, turn auto memory off with the toggle in /memory. If you’d rather keep auto memory for small preferences and the cortex for decisions and facts, that works too.
Try the server only if you need it
If the three conditions above describe you, stay with what’s built in. If not, Memorinth connects to Claude Code with two commands, after you install the CLI:
$ memorinth init
$ memorinth doctorinit makes the cortex and connects the agents you pick. doctor shows what’s connected. Give Claude Code a long-term memory walks through it, and Memorinth vs other agent memory compares Memorinth with other memory servers.