cachly — memory for coding agents (MCP server)
Solve it once. From then on, your AI knows.
Every fix, decision and dead end becomes a lesson. Your AI finds it again when the same
problem comes back, in the next session, in another editor, or on a teammate's machine.
#1 on LoCoMo in the OmniMemEval comparison, 90.71 points
(results).
Works with Claude Code · Cursor · GitHub Copilot · Windsurf · Cline · Continue.dev · Zed ·
Codex CLI · Gemini CLI · JetBrains IDEs
Quick start · What it looks like ·
Pricing · FAQ · Reference · cachly.dev
Quick start
Claude Code — two lines, and the next session has a Brain (the store of your lessons):
/plugin marketplace add cachly-dev/cachly-mcp
/plugin install cachly-brain@cachly
The first time cachly needs a key, it opens your browser once: sign in with GitHub, Google or
e-mail, and your Brain is ready on EU servers. A new account starts on the Free plan and keeps
the same key if you upgrade later. Check it with
claude mcp list: you should see plugin:cachly-brain:cachly … ✔ Connected.
Cursor, Windsurf, VS Code, Cline, Continue.dev, Zed, Codex CLI, Gemini CLI — one command:
npx @cachly-dev/mcp-server@latest autopilot
autopilot finds your editors, writes the MCP config and the rule file for each, adds a
git hook that learns from your commits, and fills your Brain from your git history. You
sign in once in the browser with a device code. Restart your editor afterwards.
Already inside Claude, Cursor or Copilot? Paste this to your AI:
Set up cachly for this project. Run: npx @cachly-dev/mcp-server@latest autopilot
Follow the browser sign-in, then restart the editor.
In the IDE: the VS Code extension
creates your Brain on first start. The JetBrains plugin
brings it to IntelliJ IDEA, PyCharm, GoLand, WebStorm and Rider
(guide).
Already have a test Brain? Keep it with npx @cachly-dev/mcp-server@latest claim. You sign in
once, and the Brain moves into your account with all its lessons.
The plugin adds three Claude Code hooks:
| Hook |
What it does |
SessionStart |
Gives your AI a short briefing: the 5 most-reused lessons (on a new Brain: starter tips) |
UserPromptSubmit |
Puts the lessons that match your prompt next to it |
Stop |
Saves a lesson when the AI's last message clearly reports a fix. It skips messages that say something failed or is unclear. It saves quietly. |
Turn on auto-update once: /plugin → Marketplaces → cachly → Enable auto-update.
Claude Code leaves it off for marketplaces outside Anthropic's own. The MCP server updates
itself on every start; the hooks come with the plugin and update with it. If an update is
waiting, the first session_start of a session says so in one line.
Without a key, the first tool call opens your browser once to sign in (GitHub, Google or
e-mail). claude mcp list is the reliable check: claude plugin details
shows MCP servers (0) even while the server runs.
claim revokes every test key and stores a new key where your editor and hooks look for
it. The Brain restarts once, which takes about 20 seconds. The Free plan holds one Brain:
if you already have one, claim stops with a message and leaves both Brains as they are.
autopilot writes these rule files, so each editor's AI checks its memory before a task:
CLAUDE.md, AGENTS.md, .cursor/rules/cachly.mdc, .github/copilot-instructions.md,
.windsurfrules, .clinerules, and GEMINI.md, .junie/guidelines.md and
.continue/rules/cachly.md where you use Gemini CLI, Junie or Continue. Claude Code and
Gemini CLI also follow the server's own instructions; Cline, Continue and Zed rely on the
rule file. You can also add the server by hand (see Manual Setup).
Remote MCP (HTTP)
https://mcp.cachly.dev/mcp opens your own Brain. Nothing to install. Send your API key
(cky_..., create one at https://cachly.dev/setup-ai) in the Authorization header.
Claude Code
claude mcp add --transport http cachly https://mcp.cachly.dev/mcp --header "Authorization: Bearer <key>"
Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"cachly": {
"url": "https://mcp.cachly.dev/mcp",
"headers": { "Authorization": "Bearer <key>" }
}
}
}
VS Code (.vscode/mcp.json; the promptString input keeps the key out of the file)
{
"inputs": [{ "type": "promptString", "id": "cachly-key", "description": "cachly API key", "password": true }],
"servers": {
"cachly": {
"type": "http",
"url": "https://mcp.cachly.dev/mcp",
"headers": { "Authorization": "Bearer ${input:cachly-key}" }
}
}
}
- Several Brains in your account, or a key bound to one Brain? Add the header
X-Cachly-Instance: <instance id> (see https://cachly.dev/instances).
- The server never decides who may see a Brain: the cachly API checks your key on every new
connection (at least every 10 minutes). A revoked key stops working within 10 minutes.
- Only the core tools run remotely.
index_project, brain_from_git and autopilot read files on
your machine and run only in the local package (npx @cachly-dev/mcp-server@latest autopilot).
- Without the header the server lists the tools (for directory checks) and answers tool calls with
these steps.
What it looks like
Monday, your AI fixes a bug and keeps what worked (output shortened):
learn_from_attempts(topic="billing:invoice-rounding", outcome="success",
what_worked="ROUND HALF-EVEN IN invoice_total(): Math.round drifted by one cent on .5 values",
file_paths=["src/billing/invoice.ts"])
✅ Lesson stored: billing:invoice-rounding
Three weeks later, a new session, a different person, the same symptom:
smart_recall(query="invoice total is one cent off")
💡 billing:invoice-rounding · 👤 anna
ROUND HALF-EVEN IN invoice_total(): Math.round drifted by one cent on .5 values
▸ src/billing/invoice.ts
Your AI starts from the fix. With the hooks, this happens before you type: the matching
lessons are placed next to your prompt.
Some fixes come back. After a time/date or a dependency fix, learn_from_attempts adds
a relapse watch with counted numbers from 289 open-source projects. For example: 148 of
791 time/date fixes (19 %) were followed within 90 days by another time/date problem in
the same files, 4.4× as often as a random issue in the same project. Each hint links a
real pair of issues as an example.
Some fixes need a second file. When you store a security fix and none of the files you
name is a manifest or lock file, learn_from_attempts says so: across the same 289
projects, 1127 security fixes changed a dependency file more often than other fixes in the
same project, 59 % vs 25 % in the largest dataset.
Why developers and teams use it
- Your AI keeps what it learned. Lessons outlive the session, the editor and the
model. One Brain serves Claude Code, Cursor, Copilot, Codex and the others at the same
time.
- Your team learns each thing once.
invite teammate@example.com shares your Brain.
Every lesson carries the name of whoever learned it, and a reviewer can confirm it so
it ranks higher.
- A light footprint in the context window. Your editor lists 27 tool entries, about
8,000 tokens per request. All 124 MCP tools stay one call away through
cachly_tool.
- Your data stays in the EU and stays yours. Storage in Germany, embeddings computed
in the EU, and
export writes every lesson to Markdown and JSONL whenever you like.
The server is open source under Apache-2.0.
How it works
- A fix, a decision or a dead end is stored as a lesson: topic, what worked, what failed,
severity, file paths, commands and author.
- At the start of a session, your AI receives a briefing with the last session, open
failures and recent lessons.
- When you ask for something,
smart_recall looks up the lessons that match. It combines
keyword search (BM25), meaning-based search and the causal graph, in 11 languages.
- When an error appears,
causal_trace walks from the symptom to the cause and to the fix
that worked.
- Before a deploy,
brain_predict lists failure patterns from past incidents.
- A git hook and the CI templates add lessons from commits and from
red-to-green runs.
- Lessons are shared in the team. Each one carries the name of whoever learned it.
See it on your own project first: npx @cachly-dev/mcp-server@latest demo reads your
git history and prints the fixes, patterns and decisions your AI would know. It runs
entirely on your machine.
Our agreement with you. You can leave and take your data:
npx @cachly-dev/mcp-server@latest export writes every lesson to lessons.md (to read)
and lessons.jsonl (to reuse). Code excerpts are stored only when you call
index_project yourself, and then only on your own EU instance. Read
what leaves your machine before you
decide.
Pricing
| Plan |
Price |
People |
Storage |
| Free |
€0 |
1 |
25 MB, one Brain, 500 recalls a month |
| Solo |
€9.90/month |
1 |
200 MB |
| Team |
€49/month |
up to 5 |
900 MB |
| Business |
€199/month |
up to 20, with SSO |
7 GB |
Start on Free with a sign-in, without a credit card. Organisations are free; you pay per
Brain plan. The current limits are on
cachly.dev/pricing.
Guides
| Guide |
What you find there |
| Claude Code hooks: which event to use when |
SessionStart, UserPromptSubmit, PreToolUse, Stop and more, sorted by when they fire. What each one can block, add and change. |
| A UserPromptSubmit hook for Claude Code |
The stdin JSON, additionalContext, a working Node script and five traps to avoid. |
| The same hooks in VS Code and Copilot CLI, Codex CLI and Gemini CLI |
Which event takes context in each editor, and the exact file setup writes there. |
| Comparisons: Supermemory, Zep, claude-mem, Basic Memory, mem0, Letta |
Side by side, each row with its source and a visible date, including when the other product fits better. |
| EU-hosted MCP server: what leaves your machine |
Where data lands: storage in Germany, embeddings in the EU, the network edge, and a checklist. |
| Lessons learned for coding agents |
How to write a lesson your agent finds again: symptom, decisive fact first, what failed, files, a check. With examples and a LESSONS.md. |
| JetBrains plugin guide |
What the plugin does, and how Claude Code, Junie and JetBrains AI Assistant use the Brain. |
| Repo X-ray |
Enter a public GitHub repo. In a few seconds you see how many problems its team has solved, and which ones more than once. |
FAQ