Claude Code and Cursor Shared Context: How to Set It Up
Claude Code and Cursor don't share memory. One AGENTS.md and one MCP context layer give them the same picture.

You use Claude Code in the terminal for some work and Cursor in the editor for the rest, and neither knows what you did in the other. Out of the box, they share nothing.
The verdict: put project rules in one AGENTS.md that both tools read, and use a personal context layer such as Unabyss for everything else, so Claude Code and Cursor load the same context over MCP. The rest of this guide covers what each tool remembers and how to set it up.
Do Claude Code and Cursor share context?
No. Each tool reads its own files and neither reads the other's memory.
Claude Code has two memory systems (Claude Code docs): CLAUDE.md files you write, and auto memory, notes Claude writes about your preferences, corrections and ongoing work. Auto memory is stored per repository on your machine in ~/.claude/projects/<project>/memory/, and the first 200 lines or 25KB load at the start of each session.
Cursor works from rules (Cursor docs): Project Rules in .cursor/rules as .mdc files, User Rules that apply everywhere, Team Rules on Team and Enterprise plans, and AGENTS.md. It used to have a Memories feature; Cursor removed it in version 2.1, in November 2025, and suggested exporting old memories into a rules file (Cursor forum, 2025).
So Claude Code's auto memory never reaches Cursor, and Cursor's rules never reach Claude Code unless they live in a file both read.
Can Claude Code and Cursor read the same rules file?
Yes: AGENTS.md. Cursor reads it natively, in the project root and in subdirectories. Claude Code reads it when the repo has no CLAUDE.md (from v2.1.277). If you keep a CLAUDE.md for Claude-specific instructions, import the shared file at the top:
# CLAUDE.md
@AGENTS.md
## Claude Code only
- Run the test suite before proposing a commit.
Now build commands, conventions and architecture notes live in one place, and both tools pick up a change on their next session. AGENTS.md is a widely shared format, used by more than 60,000 open-source projects (Linux Foundation, 2025), and Codex reads it as well. For what belongs in the file and what doesn't, see What Is CLAUDE.md?
How do you sync memory between Cursor and Claude Code?
You can't sync native memory, because only one side has any. Claude Code's auto memory is a folder of Markdown files on your laptop; Cursor has no equivalent to sync it to. You have two workable options:
- Promote durable learnings into
AGENTS.md. When Claude Code learns a convention worth keeping, move it into the shared file. Simple, and manual. - Give both tools a shared memory over MCP. Both are MCP clients, so a server that can store and return context works in either. What one tool saves, the other can read.
The first option suits repo conventions. The second suits everything that isn't about the repo.
Is there one knowledge backend you can connect to Claude Code and Cursor at the same time?
Yes. Any MCP server connects to both, and a context layer is the kind built for this job. Unabyss builds your context from the apps where it already lives (Gmail, Google Calendar, Notion, Slack, GitHub, Linear), keeps it current, and serves it to both tools from one source. Setup takes three steps:
- Connect your sources to Unabyss. The first one is ready in about 90 seconds, so your context starts from real work rather than a blank file.
- Add it to Claude Code:
claude mcp add --transport http unabyss https://mcp.unabyss.com/, then sign in from the session. - Add it to Cursor with the one-click install on Unabyss's connect page.
Then pick a save-back mode in Unabyss's global instructions: save only what matters, save everything, or save nothing. With saving on, an architecture decision you lock in Claude Code is there when you open Cursor an hour later. These are shared context, not merged sessions: the two tools still run independently, and what they share is the durable picture of you and your work.
How do you share product decisions with Claude Code or Cursor?
Write the decision down once, where your team already records it, and let both tools read it from there. A decision usually lands in a Linear issue, a Notion doc or a Slack thread. Pasting it into CLAUDE.md and .cursor/rules creates two copies to keep in sync; a context layer that reads Linear, Notion and Slack picks it up and serves it to both agents.
The same goes for the handoff from chat to editor. Plenty of developers reason through a design with Claude in the browser, then build it in Cursor, and that hop usually loses everything. Unabyss connects to Claude.ai as well, so the conversation where you made the call and the editor where you implement it read the same context. AI tools are already part of most developers' day: 84% use or plan to use them in their development process, up from 76% a year earlier, according to Stack Overflow's 2025 Developer Survey.
What should stay in CLAUDE.md and AGENTS.md?
Keep anything that belongs to the codebase: build and test commands, conventions, files not to touch, the reason behind an architecture choice. That context versions with the repo and should.
Move out anything about you: your role, the client, this week's priorities. A file can only say what was true when you wrote it. In an August 2026 Unabyss benchmark, a hand-written CLAUDE.md helped with follow-ups but barely moved cost, time or quality, while adding Unabyss cut cost by 36% and time by 38% and raised the quality of accepted output from 7.7 to 8.9 out of 10 (What Structured AI Context Is Worth).
Adding Codex as a third tool? The same pattern scales: How to Give Claude Code, Cursor and Codex the Same Context. Or see how Unabyss works.