Integration · Anysphere

Persistent memory for Cursor

One command sets cachly up for Cursor. Each chat starts with a briefing from your project's memory, and lessons that match your request reach the agent with its first tool call.

Set it up

  1. In your project folder, run:

    npx @cachly-dev/mcp-server@latest autopilot
  2. Sign in once in the browser when asked, then restart Cursor.

  3. If autopilot did not find Cursor, set it up directly:

    npx @cachly-dev/mcp-server@latest init --editor cursor

What happens automatically

Chat start
A short briefing: the most useful lessons of this project.
Every request
cachly picks the lessons that match and hands them over with the agent's first tool call.

On top of that, Cursor can call the cachly tools itself, for example smart_recall before a task and learn_from_attempts after a fix.

Files cachly writes

.cursor/mcp.json
Connects the cachly MCP server.
.cursor/rules/cachly.mdc
A rule with alwaysApply that tells the agent when to use its memory.
.cursor/hooks.json, .cursor/hooks/
The hooks for the briefing and the lessons per request.

Limits

  • Cursor's hooks cannot add text to a prompt. cachly delivers the matching lessons with the first tool call of a turn, so a turn without any tool call gets none.
  • Cursor has no hook at the end of a turn. The agent stores lessons through the cachly MCP tool.

Frequently asked questions

Cursor removed Memories. Does cachly replace them?

Partly. Cursor's replacement for Memories is Rules, which you write and maintain yourself. cachly stores lessons the agent writes after a fix and brings back only the ones that match the current request.

Why do lessons arrive with the first tool call and not with the prompt?

Cursor's beforeSubmitPrompt hook can allow or block a prompt but cannot add context to it. Context can only be added at session start and after a tool call, so cachly uses those two moments.

Where is my memory stored?

On cachly servers in Nuremberg, Germany. Your project files hold no key; the key comes from your environment or from ~/.cachly/credentials.json on your machine.

Can my other coding tools use the same memory?

Yes. A lesson stored from one tool is available in every other tool connected to the same Brain, and to teammates who share it. Claude Code, Cursor, GitHub Copilot, JetBrains, Codex CLI and Gemini CLI all read from one Brain.

More about cachly and Cursor