Cursor memory

Persistent project memory for Cursor.

Cursor knows your codebase better than almost anything else. It still starts every chat not knowing why the codebase is the way it is. Here's how to close that gap with one entry in mcp.json.

Cursor knows the code. It doesn't know the history.

Codebase indexing is genuinely good, and it makes the missing piece easy to overlook. Cursor can tell you what every function does. It cannot tell you that the retry logic in that function looks redundant because a previous version removed it and caused an outage.

That distinction — between what the code is and why it is that way — is the whole gap. Indexing solves the first perfectly and cannot touch the second, because the answer was never in the repository. It was in a conversation that has since been closed.

Rules files vs project memory

Cursor's rules are the natural first place to put project knowledge, and they work until they don't. Rules are applied to requests, in full, so they must stay short and general. Accumulated findings are neither.

Cursor rulesProject memory
HoldsHow to write code in this repoWhat has been learned about this project
AppliedAutomatically, in fullOn demand, the relevant slice only
Size ceilingLow — it costs context every timeNone — retrieval cost doesn't grow with the store
Written byYou, by handThe agent, while it works
Shared with other toolsNoYes, any MCP client

Keep both. Rules stay short and enforce conventions; memory absorbs everything that accumulates.

Setting it up

Add one entry to your mcp.json:

{
  "mcpServers": {
    "knownbase": {
      "url": "https://knownbase.dev/mcp"
    }
  }
}

No headers needed — Cursor opens a browser on first use so you can sign in and pick a workspace. If you'd rather use a static key, generate one in Settings → Workspace & MCP and add "headers": { "Authorization": "Bearer kb_..." }. Full walkthrough on the Cursor integration page.

Then add a short rule so the agent knows when to use it:

Project memory is available via the `knownbase` MCP server.

Search it (`search_notes`) before starting work on an unfamiliar area.
Save (`upsert_note`) decisions, root causes, constraints and rejected
approaches — anything durable that isn't visible in the code itself.

What this looks like day to day

Start a taskAgent searches project memory for prior decisions on that area.
Work with contextIt already knows what was tried, what's constrained and why.
FinishIt writes back anything durable the task uncovered.

The compounding effect is the point. The first week the store is nearly empty and adds little. By the second month it's answering questions you'd otherwise have answered by hand, three times each.

Sharing with your other tools

Most people don't use only Cursor. An editor agent for inline work, a terminal agent for large refactors, sometimes a web client for planning. Without a shared store each one is permanently new to the project; with one, a finding written from Cursor is retrievable from Claude Code, Codex, or a teammate's setup.

Keep reading

FAQ

Why does Cursor forget my project context?

Cursor indexes your codebase and applies your rules files, so it always knows what the code looks like. What it doesn't retain is what a chat worked out — the reason behind a design, the cause of a bug, an approach that was tried and abandoned. Each new chat is a new context, and that reasoning was only ever in the previous one.

Do Cursor rules count as memory?

They're instructions, not memory. Rules files are applied to every relevant request, which makes them ideal for conventions and constraints you want enforced and poor for accumulated knowledge — they'd have to grow without limit and be loaded in full every time. Keep rules for how to write code here; put findings somewhere searchable.

How do I add persistent memory to Cursor?

Add an MCP memory server to mcp.json. For Knownbase that's a single entry with the URL https://knownbase.dev/mcp; Cursor opens a browser to sign in on first use. After that the agent has search_notes, get_note and upsert_note available in Composer and chat.

Will memory written in Cursor be visible in Claude Code?

Yes, when both point at the same workspace. The store lives outside every tool, so notes written from Cursor are searchable from Claude Code, Codex, ChatGPT or a teammate's agent.

Does it work in Composer and agent mode?

Yes — MCP tools are available wherever Cursor's agent can call tools. In practice the useful pattern is a search at the start of a task and a write at the end of one.

Is my code sent anywhere?

Only what the agent explicitly writes as a note. Knownbase does not index your repository and has no access to it; it stores the notes your agent sends. Notes are workspace-isolated, never used to train models, and exportable or deletable at any time.

Give Cursor memory that outlives the chat

One entry in mcp.json, shared with every other MCP client you use. Free plan, no card required.

Create free workspace