You searched for this because you saw a price. Fair enough. But the honest first answer is that you may not need either option, and no vendor is going to open with that.
Claude Code has memory built in, on by default, and it costs nothing. Whether you need more than that is a real question with a real answer, and it depends on one thing that has nothing to do with features.
Check what you already have
Claude Code ships auto memory and it is on by default. It writes notes to itself as you work and loads them at the start of every session. Nobody selling a memory product will lead with this, and one of them says the opposite outright: Mem0's own Claude Code page opens with "Your agent forgets everything between sessions." That was true once. It is not true now.
What you actually get for free, and the limits are worth knowing precisely:
- Memory lives at
~/.claude/projects/<project>/memory/, with aMEMORY.mdindex and topic files beside it. - The first 200 lines of
MEMORY.md, or the first 25KB, whichever comes first, load at the start of every session. Content past that is not loaded at all. - Topic files do not load at startup. Claude reads them on demand when it needs them.
- It is machine-local and per-repository. All worktrees of one repo share a memory directory, which matters if you run several sessions in parallel.
- Claude does not save something every session. It decides what is worth keeping.
So the free baseline is real but narrow: local, per-repo, index-capped, and selective. If you have been running Claude Code for a month and never opened that folder, open it before you spend anything. My setup guide for built-in memory covers getting more out of it.
Everything below reduces to one question: does your memory need to leave the machine? Sync across devices, a team sharing recall, a hosted dashboard - those are the things you cannot get for free, and they are the only things you cannot get for free.
What Mem0 actually gives you
Mem0 is a hosted memory layer with a real Claude Code integration, and it is worth describing accurately rather than dismissively.
The plugin installs from a marketplace in two commands and brings three things: an MCP server with nine memory tools (if the difference between a server, a skill and a hook is not obvious, that map is here), lifecycle hooks that capture at session start, user prompt, tool execution and session end, and a Mem0 SDK skill. The hooks are the part that matters. They mean capture happens without you asking for it, which is genuine work you would otherwise wire yourself.
It requires a Mem0 account and an API key beginning m0-, exported in your shell profile. Your memories live in Mem0's cloud.
Pricing from their own page:
| Plan | Price | Add requests | Retrieval requests | Projects |
|---|---|---|---|---|
| Hobby | Free | 10,000 / month | 1,000 / month | 1 |
| Starter | $19 / month | 50,000 / month | 5,000 / month | 1 |
| Pro | $249 / month | 500,000 / month | 50,000 / month | Unlimited |
| Enterprise | Custom | Unlimited | Unlimited | Unlimited |
The number to look at is retrievals, not adds. A retrieval happens when Claude pulls context, which on an active day is many times an hour. Context budget is the real constraint here either way, and I have written about what fills it. 1,000 a month on the free tier is roughly 33 a day. Mem0 also publishes an open-source edition separate from the Platform, so "Mem0" is not automatically the paid thing.
What the open-source route is
Kairn is MIT licensed and describes itself as a context-aware knowledge engine: a knowledge graph with context routing that decides what to load and how much. Storage is SQLite with FTS5, per workspace, in a local database.
The properties that matter for this comparison, from its own README:
- No API key and no account. There is no service to sign up for.
- Local. The database is a file in your workspace.
- Offline. Its import commands are described as running at "$0 - no LLM calls, no network calls".
- An MCP server.
kairn serveexposes it to Claude Code the same way any MCP server connects.
I am writing this in a session with Kairn connected as an MCP server, so the tools are in front of me rather than something I read about. That is also the honest limit of my testing: one machine, one user.
This lives in primeline-ai/evolving-lite - the self-evolving Claude Code plugin. Free, MIT, no build step.
The comparison
Feature matrices are usually written by the person who wins them. This one has four rows where the free option loses, and they are the rows most likely to matter to you.
| Kairn | Mem0 Platform | |
|---|---|---|
| Licence and price | MIT, free | Free tier, then $19 to $249 a month |
| Account required | None | Mem0 account plus m0- API key |
| Where memories live | Local SQLite file in your workspace | Mem0's cloud |
| Works offline | Yes | No |
| Monthly quota | None | 1,000 retrievals free, 5,000 at $19 |
| Sync across machines | No | Yes |
| Team or shared memory | No | Projects, unlimited on Pro |
| Support | None. Issues on GitHub | Email, Slack on higher tiers |
| Automatic capture | You wire the hooks yourself | Lifecycle hooks included |
| Install | pip install kairn-ai | claude plugin marketplace add then install |
| Claude Code integration | MCP server | MCP server, hooks and a skill |
Where the free one loses
Taking the bold rows seriously, because a comparison that admits nothing is an advertisement.
No sync. Kairn's database is a file on one machine. Work on a laptop and a desktop and you have two unrelated memories. Mem0's cloud is the answer to exactly this, and there is no clever workaround that is not just "sync a SQLite file yourself and handle the conflicts".
No team. If three people should share what the assistant learned, a local file cannot do it. This is the same limitation wearing a different hat, and it is the strongest reason to pay.
No support. A GitHub issue is not an SLA. If your work depends on memory being up, you are the on-call.
Capture is not automatic out of the box. This is the one people underestimate. Mem0's lifecycle hooks mean things get remembered without you thinking about it. With Kairn alone, retrieval and storage are tools Claude can call, and whether it calls them reliably is on your configuration. Closing that gap is what my own hook layer does, and it is real work: primeline-ai/evolving-lite wires capture into session lifecycle events so it happens without being asked. That combination is the honest like-for-like, not Kairn on its own.
Which one should you pick?
Solo, one machine, and privacy matters: the open-source route wins outright and it is not close. Nothing leaves your machine, there is no quota to hit, and the licence is MIT.
Two machines or two people: pay. I would rather say that than pretend a local SQLite file syncs.
Regulated data, or a client contract that forbids sending source context to a third party: the local option is not merely cheaper, it may be the only one you are allowed to use. Check before you assume.
Installing the open-source one
Three commands, then register it with Claude Code:
pip install kairn-ai
kairn init ~/brain
claude mcp add kairn -- kairn serve ~/brain
kairn init creates the workspace and its local database. claude mcp add is the documented way to register an MCP server, and the -- separates the server command from the flags Claude Code parses. Confirm it connected with claude mcp list.
If you go looking for install guidance for Claude Code plugins generally, you will find pluginDirectories in settings.json recommended in several places. It does nothing. Unknown settings keys are ignored, so you get no plugin and no error. Anything that must load as a plugin belongs in ~/.claude/skills/ with a .claude-plugin/plugin.json, or behind claude --plugin-dir. My plugin build guide lists the routes that work and the two that do not.
For the hooks layer that makes capture automatic, primeline-ai/evolving-lite clones into your skills directory and loads on the next session. It is the piece that turns "memory exists" into "memory happens without asking".
Honest scope
I maintain Kairn, so treat the recommendation accordingly and weigh the matrix rather than the conclusion. Every row in it is checkable: Mem0's prices and quotas come from their pricing page and their Claude Code integration docs, both read on 2026-08-16; Kairn's licence, storage and offline claims come from its own README.
What I have not done: run Mem0. I have not tested its retrieval quality, its hooks, or whether 1,000 free retrievals a month is generous or tight in practice. This compares what each is documented to do and what each costs, not which one recalls better. If you want that comparison, nobody should write it who maintains one of them.
Prices change. The numbers here are from one reading on one day, and the free-tier quota in particular is the sort of thing vendors adjust quietly.



