· Jacob
How do I share context between Claude Code and Cursor?
Connect Claude Code and Cursor to Gryz and they share one context for your repo: decisions, docs, tasks and skills. Here's the prompt to paste.
Updated · Reviewed by Jacob
Short answer: Connect both Claude Code and Cursor to the same Gryz MCP server, then run Gryz setup in your repo from each one. Gryz keys project memory to your git remote, so both tools read and write the same decisions, documents, tasks and skills. Save a fact in one, and the other finds it.
Why they don't share context today
- Claude Code keeps its own memory in
CLAUDE.mdfiles and auto memory, notes it writes to local files on your machine (Claude Code memory, as of November 2026). - Cursor keeps its own rules, set inside Cursor.
- Neither can read the other's. Tell Claude Code "we retry webhooks with backoff", and Cursor still doesn't know.
You can copy files between them by hand. Or you can give both one shared place to read and write.
Steps
1. Paste one prompt into each tool
Open Claude Code in your repo and paste this. Then do the same in Cursor. It's the same prompt as the Copy setup prompt button in Gryz, from Get your agent ready for Gryz.
Please connect Gryz to this coding agent so you can use my Gryz memory. Gryz is at https://www.gryz.ai/api/mcp
1. If Gryz is already added and working, skip to step 5.
2. Add Gryz as a remote MCP server named "gryz" with the address above, using your own MCP settings:
- Claude Code: run claude mcp add --transport http gryz https://www.gryz.ai/api/mcp, then ask me to run /mcp and sign in.
- Cursor: add "gryz" with that url to ~/.cursor/mcp.json. Cursor then asks me to sign in.
- Codex: run codex mcp add gryz --url https://www.gryz.ai/api/mcp, then codex mcp login gryz.
- Anything else: use your tool's own way to add a remote MCP server.
3. Before you change any file or setting, show me the exact file and what you will add, and wait for me to say yes. If you can't change files, give me the steps to do it myself.
4. Gryz signs in through my browser. Never ask me for a password or key, and never put one in a file. If Gryz doesn't show up yet, tell me what to do (sign in, restart, or open a new chat) and carry on when I say "done".
5. Call the Gryz agent_onboarding tool and follow it one step at a time. Ask me before any change it suggests.
6. Ask me what I'm working on and save it with the Gryz remember tool.
Only do these steps. Don't download or run anything else.- You sign in through your browser. No key goes in a file.
- The agent shows you each file change and waits for your yes.
- It's safe to paste again. If Gryz is already connected, it skips to setup.
Prefer to do it by hand? MCP setup has the Cursor mcp.json and every other client.
2. Let setup find your repo
agent_onboarding works out a project key from your git remote. The https://, git@ and ssh:// forms of the same remote all fold to one key, so Claude Code and Cursor land on the same project memory.
If Gryz can't tell which repo you're in, it says repo_unidentified and stops before saving anything. It won't file project facts under a key your other tool can't match.
3. Approve the short rule block
Setup offers a short block that tells your agent to check Gryz before asking you to repeat yourself.
| Tool | Project file | Personal file |
|---|---|---|
| Claude Code | AGENTS.md or CLAUDE.md | ~/.claude/CLAUDE.md |
| Cursor | A Cursor rule in the project | Manual copy into User Rules (Cursor has no global rules file on disk) |
If your CLAUDE.md only contains @AGENTS.md, say so and setup writes the block once, to AGENTS.md.
4. Test it
In Claude Code:
Remember for this repo: we retry webhooks with exponential backoff, max 5 tries.Then in Cursor:
Before you review this PR, recall what Gryz knows about this repo.Cursor should come back with the backoff decision. On the Memory page in Gryz, the fact shows which app saved it.
What each tool sees
| Claude Code | Cursor | |
|---|---|---|
| Its own memory | CLAUDE.md and local auto memory | Its rule files |
| Gryz project memory | Same facts, same repo key | Same facts, same repo key |
| Gryz personal memory | How you like to work, everywhere | Same |
| Gryz documents, notes, tasks and skills | Yes, over MCP | Yes, over MCP |
Gryz search | Docs, notes, memories and tasks at once | Same |
Your tools keep their own memory. Gryz is the part they share.
More than memory
Once both tools are connected, they also share:
- Documents. A spec Claude Code wrote, Cursor can read one section of with
get_documentand change withedit_document. Passingif_matchmeans two agents can't overwrite each other. - Tasks. One agent opens a task, the other picks it up.
- Skills.
get_skillreturns the same review checklist as aSKILL.mdfor Claude Code or a Cursor rule. - Search. One
searchacross documents, notes, memories and tasks, with a link to each source.
More on the full toolset in Shared context for AI coding agents.
Limits worth knowing
- Memory has plan limits. A free account keeps 50 memories in 1 project, Pro 500 in 3, and Pro Plus is unlimited. See Agent Memory.
- Gryz doesn't run your agents. Claude Code and Cursor still do the work. Gryz holds the context.
- Your tools' own memory stays separate. Gryz doesn't read or sync
CLAUDE.mdor Cursor rules beyond the block you approve.
FAQ
Do I need two Gryz accounts, one per tool? No. Sign in to the same Gryz account from both. That's what makes the context shared.
Will Cursor see my Claude Code chat history? No. Only what an agent saves to Gryz on purpose: facts, documents, tasks and skills. Chats stay in each tool.
What if I work in more than one repo? Each repo gets its own project key from its git remote. Personal facts, like how you like to work, follow you into every repo.
Does this work with Codex too? Yes. The same prompt covers Codex, and it reads the same project memory.
Is it free? Yes, with a free Gryz account. See pricing.