# cachly — AI Brain for coding assistants > cachly gives AI coding assistants (Claude Code, Cursor, GitHub Copilot, Windsurf, Cline, Zed) a persistent memory that survives across sessions. The Brain stores lessons, past fixes, architecture decisions, and session context — and recalls them in under 10 ms. ## Product cachly is an MCP (Model Context Protocol) server + managed Brain backend. When installed, the AI coding assistant automatically: - Starts a session on editor connect (no manual call needed as of v0.10.9) - Loads the previous session summary, open tasks, and top lessons - Stores what it learns via `learn_from_attempts()` after every fix or deploy - Recalls past solutions via `recall_best_solution()` and `smart_recall()` **Key facts:** - 126 MCP tools (session management, memory, search, causal graph, prediction) - Sessions fire automatically on `ListTools` (editor connection) - Lessons persist across machines, editors, and engineers - Causal Knowledge Graph with Bayesian confidence scores - VS Code extension with offline queue (lessons saved without network) - Free tier, EU servers (Germany), GDPR-native - npm: `@cachly-dev/mcp-server` — 11,953 downloads in first 23 days ## Quick start ```bash npx @cachly-dev/mcp-server@latest autopilot ``` Or add to `.mcp.json`: ```json { "mcpServers": { "cachly": { "command": "npx", "args": ["-y", "@cachly-dev/mcp-server@latest"], "env": { "CACHLY_JWT": "your-api-key", "CACHLY_BRAIN_INSTANCE_ID": "your-instance-uuid" } } } } ``` ## Core MCP tools - `session_start` — 🤖 Auto (fires on editor connect). Returns previous session summary, open tasks, top lessons. - `session_end` — 🤖 Auto (fires on editor disconnect). Generates session summary from git log. - `learn_from_attempts` — ⭐ Most important. Store what worked/failed after every fix or deploy. - `recall_best_solution` — ⭐ Before any non-trivial task. Returns best known approach with confidence. - `smart_recall` — Semantic search over all stored lessons by meaning. - `remember_context` — Store arbitrary key-value state (file summaries, config, progress). - `recall_context` — Retrieve stored context. Supports glob patterns (`file:*`). - `session_handoff` — Store open tasks before switching editors or windows. - `brain_predict` — Predict likely failures for a given context. Pre-load mitigations. - `ckg_inspect` — Query the Causal Knowledge Graph directly (typed edges, confidence scores). - `index_project` — 🤖 Auto (once per 24h). Index the codebase for context-aware session starts. - `brain_search` — BM25+ full-text search over all brain data. ## Supported editors - Claude Code (Anthropic) - Cursor - GitHub Copilot (VS Code) - Windsurf (Codeium) - Cline - Zed - Any MCP-compatible editor ## Key concept: learn → recall loop ``` 1. AI fixes a bug → calls learn_from_attempts(topic="fix:...", outcome="success", what_worked="...") 2. Next session → session_start returns top lessons automatically 3. Before similar task → recall_best_solution("fix:...") returns fix in <10ms 4. Brain predicts failures → brain_predict(context="deploying X") returns mitigations ``` ## Pricing - Free: 1 Brain instance, 500 lessons, 1,000 recalls/day - Speed (€79/mo): 3 instances, 5,000 lessons, unlimited recalls - Business (€199/mo): 10 instances, unlimited lessons, team sharing, priority support ## Links - Homepage: https://cachly.dev - Sign up (free): https://cachly.dev/sign-up - MCP docs: https://cachly.dev/docs/mcp - Recall benchmark (methodology + results): https://cachly.dev/docs/benchmark - Agents docs: https://cachly.dev/docs/agents - IDE plugins: https://cachly.dev/docs/ide-plugins - Blog: https://cachly.dev/blog - npm: https://www.npmjs.com/package/@cachly-dev/mcp-server - GitHub: https://github.com/cachly-dev/cachly - API docs: https://cachly.dev/docs/api ## About cachly is built in Germany. Servers in Nuremberg, Germany (EU). GDPR-native — no tracking cookies, no PII in memory, full data portability (GDPR Art. 20), right to erasure (GDPR Art. 17).