Cairn
MCP server that backs up and syncs Claude Code conversations across accounts, and lets Claude search your complete history via natural language.
README
<div align="center">
<img src="docs/hero.svg" alt="Cairn — your Claude Code conversations, on every account" width="100%">
<br><br>
Cairn
Your Claude Code conversations, on every account.<br> Saved before Claude deletes them, and shared with every account you sign into.
<br>
🇬🇧 English · 🇫🇷 Français · 🇹🇷 Türkçe · 🇦🇿 Azərbaycanca
</div>
<br>
🎯 Why
You signed into a different Claude account and your conversations vanished.
They are not gone. They are on your disk, exactly where they were. Claude keeps a separate list for each account, and after you sign in somewhere else it is reading the wrong list.
There is a second problem, quieter and worse: Claude Code deletes conversations after 30 days. By default, without telling you. Most people find out when something they wanted is already gone.
Cairn fixes both, then gets out of the way.
🚀 Install
🪟 Windows — no terminal needed
| 1 | ⬇ Download Cairn.cmd — your browser may ask whether to keep the file. Keep it. |
| 2 | Double-click it. |
| 3 | Press 1, wait a few seconds. |
| 4 | Quit Claude completely, then open it again. |
Done. Your conversations are back in the sidebar.
Run it once more and press 3 to turn on automatic sync, so this was the
last time you had to do anything.
🍎 macOS / 🐧 Linux
npx github:veax-project/claude-cairn
Same screen, same steps.
<br>
⚠️ Then quit and reopen Claude
Claude reads its list of conversations once, at startup. Cairn can add to that list, but Claude will not notice until the next launch. This is the #1 reason people think it did not work.
📦 It needs Node.js
Most developers already have it. If you do not, the window tells you so and points you there — install the version marked LTS, then run it again.
✨ What it does
- 💾 Saves them. Every conversation is copied somewhere Claude does not delete from. That copy is yours, and nothing removes it.
- 🔄 Shares them. Every account on your computer gets every conversation — in both directions. Start something on one account, switch to another, it is there. Go back, and the work you did in between is there too.
- 👁️ Watches. Turn on automatic sync and both happen every ten minutes, starting with your computer. You never think about it again.
- 🔎 Lets Claude search it. From any account, including one you made five minutes ago.
- ↩️ Undoes itself. One command removes exactly what it wrote, and nothing else.
🔌 Let Claude search your own history
npx github:veax-project/claude-cairn install-mcp
Restart Claude, then ask it things like:
search my old conversations for how we fixed the auth bug
<div align="center"> <img src="docs/accounts.svg" alt="The accounts screen" width="820"> </div>
This works on any account, including a brand-new one. That is the whole point: the connection belongs to your computer, not to an account.
🧯 Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| 😐 Nothing came back | Claude was already open | Quit it completely and reopen — it only reads the list at startup |
| 🪟 The window closed instantly | Node.js is missing | Install it from nodejs.org, pick LTS, run the file again |
| 🤷 A conversation is still missing | It belonged to a different project | The sidebar is filtered by project — open that project's folder |
| 🔢 Accounts show as codes | Nothing on your disk says who they were | Press 4 and name them; new accounts name themselves |
| 😱 It made things worse | — | undo puts everything back exactly as it was |
| 🍎 Nothing at all on a Mac | Never tested there | Tell us what happened — that is the only way it gets fixed |
🛡️ Where your data goes
Nowhere. Cairn copies files from one folder on your computer to another folder on your computer.
- 🚫 Zero dependencies. The
dependenciesblock inpackage.jsonis empty. - 🚫 Zero network calls. No telemetry, no update check, no analytics. Turn off your wifi and every command still works — the easiest way to check for yourself.
- 🔌 The MCP server talks to Claude over standard input and output. It opens no socket.
- 🗑️ Nothing is ever deleted from your backup. Not even by Cairn.
- ↩️
undoremoves only what it wrote, recognised by size and timestamp — anything Claude has touched since is left alone.
<details> <summary><b>📄 See exactly what you are installing</b></summary>
<br>
Around 3000 lines of plain JavaScript, no build step, no bundler. Eleven files
in src/, and you can read any of them.
The launcher is a 90-line .cmd that checks for Node, downloads the release
archive, and runs it. It is pure ASCII and does nothing else.
</details>
📋 Commands
| Command | What it does |
|---|---|
cairn |
Opens the screen at the top of this page |
cairn sync |
Save everything, then give every account everything |
cairn autostart on |
Keep doing that, every 10 minutes, from startup |
cairn status |
What is here, what is hidden, what is at risk |
cairn undo |
Remove exactly what the last sync wrote |
cairn search <words> |
Search across every account |
cairn install-mcp |
Let Claude search the archive itself |
cairn export |
Write every conversation out as Markdown |
cairn pack |
Bundle conversations into one file to attach to a chat |
Your backup lives in ~/ClaudeCairn. Move it with --vault <folder> or the
CAIRN_VAULT environment variable.
🔬 How it works
<details> <summary><b>You do not need this to use Cairn — but a tool that touches your conversations should be able to explain itself</b></summary>
<br>
Claude Code keeps two separate things, in two separate places:
~/.claude/projects/<project>/<id>.jsonl
the conversation itself
deleted once it is older than cleanupPeriodDays — 30 by default
<appData>/Claude/claude-code-sessions/<account>/<org>/local_*.json
the sidebar entry that lists it
one folder per account, which is why switching hides everything
Cairn copies the first somewhere safe, and writes the second under every account it finds. Conversations are only ever appended to, so a file that has not grown is skipped. Nothing is ever removed from the backup — a conversation Claude has already deleted stays, because that copy is now the only one in existence.
Claude checks each sidebar entry against a strict shape before it will list it, and silently drops anything that does not match. Cairn builds them from the shape observed in real files: timestamps as numbers rather than text, no extra fields, and none of the placeholder values that occasionally appear in transcripts.
The search index is SQLite full-text search, using the copy that ships inside Node. That is why there are no dependencies.
</details>
⚠️ Beta
A first release. Verified end to end on Windows: 23 conversations that had been invisible for weeks came back into the sidebar after a restart, and every entry Cairn wrote was accepted.
21 automated tests, including one that replays the interface onto a simulated terminal at seven window sizes to catch layout faults.
| ✅ Proven | Windows |
| ❓ Never run | macOS, Linux — the code is written and reviewed, nothing more |
| ❌ Impossible | Conversations Claude deleted before your first backup. Nothing brings those back. |
| ❌ Out of scope | Regular claude.ai chats. Those live on Anthropic's servers and cannot be moved between accounts — a limit of the product, not of this tool. |
Open an issue — especially if you are on a Mac.
<div align="center">
GPL-3.0 · Built because switching accounts should not cost you your work.
</div>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。