Memory for Claude Code, Codex and Cursor: 7 tools compared (November 2026)
This weekend I asked Claude and ChatGPT eight questions developers ask about memory for coding agents, like "What is the best memory MCP server for Claude Code?" and "How can I make Cursor remember lessons and mistakes a
This weekend I asked Claude and ChatGPT eight questions developers ask about memory for coding agents, like "What is the best memory MCP server for Claude Code?" and "How can I make Cursor remember lessons and mistakes across sessions?". Across the 16 answers, the tools named most were Basic Memory (9 times), Mem0 (7), Cognee (6), Supermemory (6) and claude-mem (4).
I build one of the others, hippo, which came up once, so read the hippo section with that in mind. For everything else I went to each project's own README and docs on 22 November 2026 and wrote down what they say, with links, so you can check me.
The short version
| Tool | Where memories live | Hosted account | How memories get saved | Model call to save | Repo licence | Repo stars |
|---|---|---|---|---|---|---|
| claude-mem | SQLite in ~/.claude-mem, though the Cursor install defaults to their hosted CMEM Pro |
Optional | Hooks pass tool calls to an observer agent that writes notes | Yes, the observer model | Apache-2.0 | 119k |
| Mem0 (hosted MCP) | Your Mem0 account | Required | The agent calls add_memory
|
Not stated for the hosted MCP, the library makes one LLM call per add | Apache-2.0 | 69k |
| Cognee | Local by default, Cognee Cloud optional | Optional | Plugins capture prompts and tool traces, plus a remember call |
Local models with no key, provider calls with one | Apache-2.0 | 33k |
| Supermemory | Their hosted service by default in the Claude Code plugin, or local in ~/.supermemory
|
Optional | Plugin auto-capture, plus an MCP memory tool |
Yes, fact extraction, which can run on Ollama locally | MIT | 32k |
| Basic Memory | Markdown files on your disk | Optional, for cloud sync | The agent writes notes through tools like bm_write
|
No extraction LLM stated, embeddings for search run locally by default | AGPL-3.0 | 4.7k |
| MCP memory server | One local JSONL file | None documented | The model calls create_entities and add_observations
|
Not stated | MIT, in a repo moving to Apache-2.0 | part of the official servers repo |
| hippo | SQLite in your repo, plus markdown copies | None | Hooks in Claude Code and Codex, MCP tools in Cursor | No, on the default path | MIT | 794 |
claude-mem
claude-mem "runs a second agent beside it that takes notes while it works". Hooks hand each tool call to a local worker, an observer model turns that activity into short observations, and it writes a summary when the session ends. Everything sits in SQLite at ~/.claude-mem/claude-mem.db with Chroma on top for semantic search, and cloud sync is opt-in. The observer can run on Ollama, LM Studio or any OpenAI-compatible endpoint. The Cursor install uses CMEM Pro, their hosted service, unless you pick another provider, and the install guide lists Codex CLI as a supported host. It's the most starred tool here by a long way.
Mem0
Mem0 runs a hosted MCP server. In their words "nothing runs on your machine", and the memories "live in your Mem0 account, not on your computer", so you need a Mem0 Platform account. The MCP docs cover Claude Code, Codex (through ~/.codex/config.toml) and Cursor, and the agent decides for itself when to call add_memory. The open-source library can run on your own infrastructure, and it uses OpenAI's gpt-5-mini and text-embedding-3-small by default.
Cognee
Cognee turns what you give it into a knowledge graph. Its Claude Code and Codex plugins capture prompts and tool traces automatically and recall what's relevant on every turn. Cursor connects through their MCP server. It runs locally for free with no API key, using a local GLiNER model to extract the graph and a local embedding model, and once you set a provider key, processing makes calls to that provider.
Supermemory
Supermemory's Claude Code plugin auto-captures "conversations and important tool usage", and an MCP memory tool lets the agent save things itself. The plugin talks to their hosted service with an API key by default, and it also works against a local supermemory that keeps everything in ~/.supermemory. Run locally, it extracts facts with the model you choose, which can be OpenAI, Anthropic, Gemini, Groq or a local Ollama model, embeddings run locally by default, and URL ingestion still goes through a hosted reader. There are plugins for Claude Code, Codex and Cursor, and the Codex one shares memory with Claude Code, Cursor and OpenCode.
Basic Memory
Basic Memory keeps "Markdown files that both you and your AI can read, write, and search", plain text on your disk with a local SQLite index. The agent writes notes through tools like bm_write, and the Claude Code plugin adds a briefing at session start and a checkpoint before compaction, with capture as an opt-in. Changed notes get embedded for search, locally with fastembed by default or through an OpenAI-compatible API. It has setup guides for Claude Code, Codex and Cursor, cloud sync is optional, and it's the only AGPL-3.0 tool on this list.
The official MCP memory server
The reference server in modelcontextprotocol/servers is "a basic implementation of persistent memory using a local knowledge graph", kept in one JSONL file. The model calls tools like create_entities and add_observations, and you shape what it saves through the prompt. Its README covers Claude Desktop and VS Code.
hippo (the one I build)
hippo keeps one SQLite store per repo, plus a global one in ~/.hippo/, and writes markdown copies of its memories so you can grep them, commit them and review a rule in a pull request. There's no account, and storing a memory makes no model call on the default path. Some optional features do call a model, such as the fact extraction hippo sleep runs when ANTHROPIC_API_KEY is set, which you can turn off.
hippo init adds its instructions to the CLAUDE.md or AGENTS.md you already have. Claude Code gets 9 hooks, so your pinned rules load at session start, each prompt gets up to 5 memories that share its words, your task is saved before compaction and failed tool calls get stored. Codex gets two hooks that it runs once you trust them in /hooks, and session capture there is opt-in. Cursor reads the AGENTS.md block and gets 13 memory tools once you add hippo mcp to its MCP config, and MCP alone doesn't capture sessions. After a bad answer, hippo outcome --bad weakens the memories from the last recall, and hippo supersede swaps an old fact for a new one while keeping the old one on record.
On numbers, in our own pre-registered test on 29 repositories, Claude Code was corrected once by a script and then, 2 to 4 tasks later, given a chance to make the same mistake. With hippo installed it repeated the mistake 11 times in 100, against 21 with its built-in memory alone, at the same cost. That test ran on Claude Code only, so there's no measured result for Codex or Cursor yet. The gain was also the same with lesson capture switched off, so it shows that installing hippo helps but not that the stored lessons are the reason, and the test code and run records aren't public. The write-up has the full numbers. It's also a small project next to the others, 794 stars against claude-mem's 119k. hippo-memory.com/shared-memory shows what each agent gets.
How I'd choose
If you mostly use Claude Code and want capture to happen by itself, compare claude-mem and Cognee's plugin. claude-mem runs an observer model, which can be local, and Cognee runs local models until you set a provider key. If you'd rather someone else runs the memory, Mem0's hosted MCP keeps it in your Mem0 account. Basic Memory suits you if you want Markdown notes that you and your agent both write and edit. The official server is a small local knowledge graph you steer with your prompt. If you use two or three agents on one repo, Supermemory and hippo both share one memory between them. Supermemory extracts facts with a model and runs hosted or local, while hippo keeps a local SQLite store with no model call on its default save path, and what each captures by itself depends on the agent.
If I've got something wrong about your tool, tell me and I'll fix the post.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.