GuardianMemory

Memory for Claude Code, Cursor and other coding agents

A coding agent's memory is scattered. Rules files such as CLAUDE.md, AGENTS.md and Cursor's project rules tell it how to work, and Claude Code keeps notes of its own for each repository on your machine. A shared memory holds what has been decided and discovered across every repository, editor, machine and teammate. Each does a different job, and they work best together.

In short

  • Rules files are instructions you write and commit. Memory is facts the agent saves as it works.
  • Put the how in rules and the what in memory.
  • Built-in notes, such as Claude Code's auto memory, stay with one repository on one machine. A memory server is shared by Claude Code, Cursor, VS Code and Windsurf at once, and by your team if you want it to be.
  • Tell coding agents to save decisions and their reasons, conventions and gotchas, and never code, to-do lists or secrets.

Rules files and memory do different jobs

Rules filesShared memory
ExamplesCLAUDE.md, AGENTS.md, .cursor/rules/, .github/copilot-instructions.mdAn MCP memory server such as GuardianMemory
Who writes itYouThe agent as it works, and you
What it holdsInstructions: how to behave in this codebaseFacts: what has been decided and discovered
How the agent reads itLoaded into its context as a session startsSearched for what is relevant, plus a short profile
Where it livesOne repository, or one machineOne place, for every repository, tool and machine
When something changesYou edit it and commitThe new fact retires the old one

Most rules files are read in full as a session starts, so every line costs context every time. Keep them to the instructions that always apply, and let memory hold the growing pile of things the team has learned, which the agent looks up only when they are relevant.

Claude Code also keeps an automatic memory: a MEMORY.md file for each repository, on the machine where it runs. It is useful, and it stays where it was made. Another repository, another laptop, Cursor or a teammate's agent never sees it. A shared memory server is the layer that crosses those lines.

What a coding agent should remember

The test is whether a new colleague would need to be told it. Good memories are one sentence each, name the project, and make sense on their own:

And what it should not save: code or file contents, which are already in the repository; to-do lists and anything that only matters this session; and secrets, keys or credentials, ever.

Connect your coding agents

Every tool takes the same endpoint, and opens a browser the first time so you can approve it.

Claude Code

claude mcp add --transport http guardian https://app.guardianmemory.com/mcp

Then run /mcp inside Claude Code and pick Guardian to sign in.

Cursor, Windsurf and other editors

In Cursor, ~/.cursor/mcp.json covers every project and .cursor/mcp.json covers one:

{
  "mcpServers": {
    "guardian": { "url": "https://app.guardianmemory.com/mcp" }
  }
}

VS Code

In .vscode/mcp.json, or your user configuration:

{
  "servers": {
    "guardian": { "type": "http", "url": "https://app.guardianmemory.com/mcp" }
  }
}

Tell the agent when to use it

Connected agents are told how to use their memory, but a few lines in their rules make it dependable. Put them in ~/.claude/CLAUDE.md to cover every project in Claude Code, or in CLAUDE.md at the root of one repository; in a user rule or .cursor/rules/ in Cursor; or in .github/copilot-instructions.md for Copilot in VS Code. The lines should say:

Copy the ready-made coding instruction from Prompts and tips.

Memory-bank files or a memory server?

A popular pattern keeps an agent's memory as markdown files in the repository: a “memory bank” of project brief, current context, progress and decisions that the agent reads at the start of each session and updates as it goes. It is simple, versioned with the code, and needs nothing else.

It also has limits. The files grow until reading them all costs more than it is worth. They exist in one repository, so nothing learned there reaches another project or another tool. And they are only as current as the last time the agent remembered to update them.

A memory server trades a little of that simplicity for search by meaning, one memory across repositories and tools, and duplicates and outdated facts handled for you. Plenty of teams use both: a short project brief in the repository, and a memory server for what is learned along the way.

Across projects, and across the team

Questions people ask

Doesn't Claude Code have a memory of its own?

It does: an automatic MEMORY.md for each repository, kept on your machine. GuardianMemory adds one memory that every repository, machine, tool and teammate can share.

Should I use CLAUDE.md or a memory server?

Both. Keep short, stable instructions in CLAUDE.md, where they are read every session and versioned with the code. Let a memory server hold the decisions and discoveries that pile up, shared across repositories and tools.

Can Cursor and Claude Code share memory?

Yes. Connect both to the same GuardianMemory endpoint and they read and write one memory bank. A decision saved during a Claude Code session is there for Cursor the next morning.

Will the agent save my code?

It should not. Connected agents are told to save lasting facts, and the coding instruction tells them not to save code, file contents or to-do lists. Anything that slips through can be deleted on the Memories page.

How do I keep projects apart?

Name the project in each memory and tag it with the project's name, and searches can be limited to that tag. For a memory with its own members, use a team bank.

Can the whole team's agents share what they learn?

Yes. Point a shared connection, such as a project's agent or a CI bot, at a team bank. Each developer's own agent can keep saving to their personal bank and still search the team's.

Stop re-explaining your codebase

One memory for Claude Code, Cursor, VS Code and every other tool you code with.

Create your memory bank

Free while we learn. No card.