Integration · Anthropic

Persistent memory for Claude Code

Install the cachly plugin with two commands. Each session then starts with a briefing from your project's memory, matching lessons arrive before each prompt, and a turn that solved a problem is stored as a lesson.

Set it up

  1. In Claude Code, run these two commands one after the other:

    /plugin marketplace add cachly-dev/cachly-mcp
    /plugin install cachly-brain@cachly
  2. Start a new session. The first time, cachly opens your browser once to sign in.

  3. Check the connection in a terminal. You should see the cachly server as connected:

    claude mcp list
  4. Open /plugin and turn on auto-update for the cachly marketplace. Claude Code leaves it off for marketplaces from third parties.

What happens automatically

Session start
A short briefing: the most useful lessons of this project.
Every prompt
Lessons that match the prompt are added to the context before Claude starts.
End of a turn
A turn that clearly solved a problem is stored as a lesson.
Before a file edit
Only with the project setup (autopilot): lessons about that file.

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

Files cachly writes

(none with the plugin)
The plugin brings its own hooks. Your project stays untouched.
.mcp.json, CLAUDE.md, .claude/settings.json
Only if you set up with autopilot instead of the plugin: server entry, instructions and hooks for the project.

Limits

  • The plugin has no hook before file edits, to keep every edit fast. The project setup with autopilot adds one.
  • Claude Code updates plugins from third-party marketplaces only when auto-update is on. Turn it on once.

Frequently asked questions

Does cachly survive /compact in Claude Code?

Yes. Lessons are stored in cachly, not in the chat. After /compact or in a new session, the briefing and the per-prompt lessons bring them back.

Do I need the plugin, or is the MCP server enough?

The MCP server alone gives Claude the cachly tools: claude mcp add -s user cachly -- npx -y @cachly-dev/mcp-server@latest. The automatic briefing and the lessons before each prompt come from hooks, which the plugin or autopilot installs.

How is this different from CLAUDE.md?

CLAUDE.md holds rules you write yourself and is loaded into every session. cachly holds lessons the assistant stores after a fix, and adds only the ones that match the current prompt.

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 Claude Code