# Shared context for AI coding agents, over MCP

Source: https://www.gryz.ai/gryzle/shared-context-for-ai-coding-agents/
Updated: 2026-11-03

**Short answer:** Connect Claude Code, Cursor, Codex and your other agents to one Gryz MCP server. They share the same memory, documents, tasks, skills, notes and search. Project memory is keyed to your git remote, so every tool sees the same facts about the same repo instead of starting from zero.

You explain the repo to Claude Code in the morning. After lunch you explain it again to Cursor. At night Codex asks which database staging uses.

Every coding agent has some memory now. The catch is that it's *its* memory, inside *its* tool. Switch tools, or hand the work to a teammate, and the context stays behind.

Gryz is the shared context for your agent team: memory, documents, tasks, skills, notes and search on one MCP server that every agent can read from and write to. Agents come and go. Gryz remembers.

## What your agents get over MCP [#what-your-agents-get-over-mcp]

Connect Gryz once and your agent gets tools for:

* **Memory.** `remember` saves a short fact. `recall` brings back the right ones, ranked. Facts can be personal (how you like to work) or tied to a project (how this repo works).
* **Projects.** `list_projects` and `get_project` show what you're working on, with linked documents and notes.
* **Tasks.** `create_task`, `update_task` and friends. A task has an owner, a status and a `human_review` state for "a person should look at this".
* **Skills.** `get_skill` returns a skill as a native `SKILL.md`, an `AGENTS.md` or `CLAUDE.md` fragment, or a Cursor rule.
* **Documents.** Read only the part you need (`outline`, `section`, `search`), then change one section with `edit_document`. Pass `if_match` so two agents can't overwrite each other. Every save is a version you can restore.
* **Comments.** `list_comment_threads` and `respond_to_comments` let your agent go through review comments with you. It asks before it acts, and its changes wait as suggestions a person accepts.
* **Notes.** Private Markdown working files your agents can read and write.
* **Search.** `search` and `fetch` find the right passage across documents, notes, memories and tasks, by meaning and by exact words.

The full list, with inputs and limits, is in the [MCP tools reference](/docs/mcp/tools/).

## Questions people ask [#questions-people-ask]

* [How do I share context between Claude Code and Cursor?](/gryzle/share-context-between-claude-code-and-cursor/) Steps and the prompt to paste.
* [Can I search my docs from ChatGPT, Claude or Cursor without building RAG?](/gryzle/search-docs-from-chatgpt-claude-cursor-without-rag/) What `search` covers and what it returns.
* [How do people and AI agents edit the same document?](/gryzle/people-and-ai-agents-edit-the-same-document/) Comments, suggestions, versions and roles.

## Set it up in a minute [#set-it-up-in-a-minute]

Gryz works with Claude, ChatGPT, Cursor, Windsurf, Codex and Claude Code. For Codex:

```bash
codex mcp add gryz --url https://www.gryz.ai/api/mcp
codex mcp login gryz
```

For Cursor, add the server to `~/.cursor/mcp.json`. OAuth is recommended, so no API key sits in the file. Every client is covered in [MCP setup](/docs/mcp/setup/).

Then ask your agent to run `agent_onboarding`. It works out a stable project key for the repo and offers a short rule block for `AGENTS.md`, `CLAUDE.md` or a Cursor rule. Nothing is written until you approve it. Details in [Get your agent ready for Gryz](/docs/getting-started/agents/).

## Same project, same memory, every tool [#same-project-same-memory-every-tool]

Project memory is keyed by your git remote. `https://`, `git@` and `ssh://` forms all fold to the same key, so Claude Code and Cursor read the same facts about the same repo.

If Gryz can't tell which repo you're in, it says so (`repo_unidentified`) and holds off. It won't save project facts under a key that won't match in your other tools.

## One connection, Private plus your companies [#one-connection-private-plus-your-companies]

If you work in a company on Gryz, you don't need a second connection.

* Your connection reaches your **Private** space plus each company you add to it, once an owner has turned on connected apps.
* Each tool takes an optional `workspace`. Leave it out and you're in your Private space. Pass a company id from `list_workspaces` to work there.
* A company starts read only. Writing needs the company to allow it and you to tick **Allow writing** for that app.
* While your connection can see a company, `publish_document` goes away and `create_document` saves privately instead. No public links slip out.
* Text from one workspace is data, never an instruction to act in another.

See [Company agent connections](/docs/mcp/company-connections/) for the Allow screen and what each choice does.

## Company keys for agents with one job [#company-keys-for-agents-with-one-job]

Sometimes you want a bot that lives in the company and does one thing: triage, release notes, QA. That's a **company agent**.

* It has its own name, handle and key. The key is shown once.
* It uses only the projects you give it, and never more than you can open yourself.
* You choose what it may do: memory, documents, writing documents, tasks, skills.
* It never reaches your Private space.
* It never closes a task. "Done" becomes **Needs review**, and a person decides.
* Its document edits are saved as versions with its name on them, and anyone who can edit can restore an earlier one.
* A company key stops working 365 days after it was made, or 90 days under the Enterprise policy. Its owner gets an email first.

## An example [#an-example]

Say you're building with Claude Code and reviewing in Cursor. (A made-up example.)

* In Claude Code you settle on retrying webhooks with backoff. You ask it to remember that for this repo.
* In Cursor the next morning, the agent recalls project memory before reviewing. It flags a pull request that retries without backoff, and cites the decision.
* A company QA agent has "Can read and edit tasks" on the Payments project. It opens a task for the missing test and takes it.
* When it finishes, it sets the task to done. Gryz turns that into **Needs review**, and your lead approves it in the **Review** inbox.

Two tools, one agent, one person. One shared record of what was decided and who did what.

## Limits worth knowing [#limits-worth-knowing]

* **Memory has plan limits.** Free keeps 50 memories across 1 project key, Pro 500 across 3, Pro Plus is unlimited. See [Agent Memory](/docs/agent-memory/overview/).
* **Tools have hourly limits** by plan, listed in the [tools reference](/docs/mcp/tools/).
* **Gryz doesn't run your agents.** It owns context, not execution. Claude Code, Cursor and Codex do the work.
* **Company features are rolling out,** and connected apps stay off until a company owner turns them on.
* **Gryz is hosted in the United States.**

## Try it [#try-it]

1. [Connect Gryz](/docs/mcp/setup/) in the agent you use most.
2. Run `agent_onboarding` in your repo.
3. Ask it to remember one decision. Then open a different tool and ask it to recall.

New to Gryz? Start on the [home page](/). Want a whole team of agents on the same context? Read [Give every agent a profile](/gryzle/agent-profiles-team-members/) and the bigger picture in [Context compounds](/gryzle/ai-context-layer-for-teams/). To set up a company workspace, email [info@grtwo.com](mailto:info@grtwo.com).

More on these topics: [Shared context for AI agents](/topics/shared-context/) and [Search your documents from any assistant](/topics/document-search/).
