How to share memory between Cursor and Claude Code
Cursor and Claude Code are both good at writing code. Neither remembers what the other learned. Cursor keeps project rules in files you write yourself; Claude Code reads CLAUDE.md. When you switch tools halfway through a job, you re-explain the decisions, the gotchas, the half-done state — or you don't, and the second tool repeats the mistake.
The fix is to give both tools one shared memory outside either app, where decisions, project notes, and handoffs live for any connected AI to read and write. This guide sets that up in about two minutes.
Connect both tools to the same memory
The fastest way is the installer. It finds the AI apps on your computer and adds OwlMem to each one, merging into your existing config files instead of overwriting them, and backing up anything it changes:
npx -y owlmem install
Or add each one by hand. Both connect to the same address:
https://mcp.owlmem.com/mcp
Claude Code:
claude mcp add --transport http --scope user owlmem https://mcp.owlmem.com/mcp
Then start Claude Code, type /mcp, select owlmem, and choose Authenticate. Or install the OwlMem plugin, which also teaches Claude Code when to look things up and when to save what it learned:
/plugin marketplace add owlmemhq/owlmem-claude
/plugin install owlmem@owlmem
Cursor: add the server to ~/.cursor/mcp.json (for every project) or .cursor/mcp.json (for one project):
{
"mcpServers": {
"owlmem": { "url": "https://mcp.owlmem.com/mcp" }
}
}
Then open Cursor Settings → MCP. OwlMem shows Needs login — click it and approve in the browser.
Whichever way you connect, the first connection opens an OwlMem page: sign in with your email, name the AI, and click Allow. No keys to copy. Both AIs then show up in the console under Agents & tools → Agents, where you can switch either off at any time. The Free plan covers two AIs, forever, with no credit card required — exactly this setup.
Teach both AIs the habit
A shared memory only works if both tools actually use it. Add these lines to CLAUDE.md and to your Cursor project rules (the installer adds them to ~/.claude/CLAUDE.md for you; Cursor has no global rules file, so add them per project):
## Team memory (OwlMem)
- Before reading code or files, search OwlMem with kb_find (documents, files and memory at once); use kb_search only for an exact string such as a commit id, a path or an error message.
- When you learn something reusable — a fix, a gotcha, a decision — save it with kb_write under lessons/ or projects/<name>/. Search first and update the existing page instead of creating a duplicate.
- Store facts that change (prices, versions, status) with kb_retain and snapshot=true or an expiry, so they retire on their own.
- Never put passwords or API keys in documents or memory. Use the OwlMem vault.
The two tools share three verbs: kb_find searches everything at once — documents, files, and memory — by meaning and keywords; kb_write saves a page to the shared knowledge base; kb_retain stores a short fact. What one saves, the other can recall. See the full tool list in the docs.
Use it: record once, read anywhere
1. Record the project. In Claude Code, say: Record the project I'm working on in OwlMem, so my other AIs know it too. It saves the project background as a page. Later, in Cursor, ask: What do we know about this project? Cursor searches the shared memory instead of asking you.
2. Save decisions, not transcripts. When the two of you settle something — an approach, a rejected option, a fix that took an afternoon — have the AI save the conclusion with kb_write. Don't paste full chat histories into memory: a transcript contains wrong turns and possibly secrets, and it goes stale. The decision is what the next tool needs.
3. Hand work over with a note. When a job moves from one tool to the other, save a short handoff with kb_retain under <your name>-handoff-<project>:
- the goal and what's done;
- what was tried and rejected;
- tests run and exact failures;
- the next safe step.
The second tool reads the handoff and starts where the first stopped. There is a longer version of this pattern in Hand off a half-finished task from one AI agent to another.
Check it works
Ask Cursor something only Claude Code recorded — for example, What did we decide about auth tokens for this project? If it doesn't know, check both tools are connected (/mcp in Claude Code; Settings → MCP in Cursor), and that the fact was saved with kb_write or kb_retain, not just mentioned in a chat. Mentioning something does not save it; OwlMem never reads your chats.
When not to use OwlMem
- If you only ever use one of the two tools, its built-in memory —
CLAUDE.mdor Cursor rules — is enough. Shared memory pays off when two or more tools need the same facts. - If you want memory that writes itself by watching your chats, OwlMem is the wrong tool: it never eavesdrops, and your AIs save what matters in their own words.
- If you need a self-hosted memory store, OwlMem won't fit: it is a managed service, and data is stored on servers in Canada.
- If you are building your own AI product and need a memory SDK to embed in your code, compare the options on the compare page — an SDK such as Mem0 fits that job better.
FAQ
Does it sync my chat history between Cursor and Claude Code?
No. Nothing is copied from your chats. Only what an AI explicitly saves with kb_write or kb_retain is shared, and it is stored as written — no model rewrites it.
Do I need a paid plan for two tools?
No. The Free plan includes two AI agents forever, plus 200 MB of storage, 200 memory writes a month, and 20 vault items. Paid plans add more agents and limits; every plan gets every feature.
Can I share memory for one project only, not all of them?
On the Cursor side, yes: put the server entry in that project's .cursor/mcp.json instead of ~/.cursor/mcp.json. Claude Code's documented setup uses --scope user, which makes it available in every project — so the memory is shared across projects on the Claude Code side, and scoped per project only in Cursor.
What happens if I disconnect one of the tools?
It stops seeing new memory, and it can no longer save to the shared space. Everything it already saved stays there for the other tool to use.
Does it work with ChatGPT or Codex too?
Yes. Any client that supports remote MCP servers with OAuth can connect to the same address — ChatGPT through Settings → Apps & Connectors, Codex with codex mcp add owlmem --url https://mcp.owlmem.com/mcp. See Persistent memory across MCP clients.