# One Memory for Claude Code, Codex, Cursor and Gemini

> Most of us switch between two or three AI coding tools. Here is how to give all of them one memory, so what one learns the others know.

*2026-11-11T08:01:33Z*

**Short answer:** to get shared memory across your AI coding tools, point every tool at the same MCP memory server. With Zekra that is one install command per client (`zekra mcp:install claude-code`, `codex`, `cursor`, `gemini`, `claude-desktop`), all logged in to the same brain. A decision Claude Code saves is then recalled by Cursor or Codex in the next session.

## The problem

You plan in Claude Code, finish a refactor in Cursor and run a long task in Codex. Each tool has its own rules file and its own idea of the project. You end up explaining the same decisions three times, and the tools drift apart: one still thinks the API is on v1.

Rules files help, but each tool reads a different one (`CLAUDE.md`, `AGENTS.md`, `.cursor/rules`, `GEMINI.md`), and they hold rules, not the hundreds of facts a project collects.

## The shared memory setup (about five minutes)

1. **Create a brain** at [app.zekra.dev](https://app.zekra.dev/register), one per project or team, and mint a `cbt_` token.
2. **Install the CLI and log in once:**

```sh
curl -fsSL https://app.zekra.dev/install.sh | sh
zekra auth login --token cbt_...
```

3. **Connect each tool you use:**

```sh
zekra mcp:install claude-code
zekra mcp:install codex
zekra mcp:install cursor
zekra mcp:install gemini
```

Each command writes that client's MCP config. Restart the tool and the `memory_*` tools appear.

4. **Tell the agents to use it.** Add two lines to each rules file:

```md
Before answering questions about this project, call memory_recall.
When we make a decision or learn a durable fact, call memory_retain.
```

## Check that it works

In Claude Code: *"Remember that staging runs Postgres 16 and deploys from the release branch."* Then open Cursor in the same repo and ask: *"Which Postgres version does staging run?"* Cursor should call `memory_recall` and answer with the fact, citing when it was saved.

## Tips from daily use

- **One brain per project, one shared brain for you.** Project facts stay scoped; personal preferences ("I prefer pnpm") live in a personal brain every project can read.
- **Give each agent its own token.** Grants are per agent, so a CI bot can read without being able to write.
- **Let dedup do its job.** When a fact changes, just state the new one. Zekra's write step decides between ADD, UPDATE, INVALIDATE or NOOP, so the old fact is retired instead of contradicting the new one.
- **Keep secrets out.** Memory is read back into prompts. Store references ("the deploy key is in the vault as DEPLOY_KEY"), never values.
- **Teams:** share a brain with teammates so a newcomer's agent knows the project's decisions on day one.

## Related reading

- [What is an MCP memory server?](/en/blog/what-is-an-mcp-memory-server)
- [Giving Claude Code a memory that survives sessions](/en/blog/claude-code-memory-across-sessions-mcp)
- [Zekra vs mem0, Zep, Letta, Basic Memory and OpenMemory](/en/blog/ai-agent-memory-compared-mem0-zep-letta-basic-memory)

- **Watch:** [Zekra in 47 seconds](https://youtu.be/juky4ieH018)
- **Ask:** [Zekra Discord](https://discord.gg/99JBJd6FsR)
- **Support the launch:** [Zekra on Product Hunt](https://www.producthunt.com/posts/zekra)
- **Start free:** [app.zekra.dev](https://app.zekra.dev/register)

---

Source: https://zekra.dev/en/blog/shared-memory-claude-code-codex-cursor-gemini
