Cairntir
Works as an MCP server with Codeium's Windsurf IDE, providing memory across sessions.
Enables automatic cross-referencing of GitHub issue mentions with memory drawers via a daemon.
Enables automatic cross-referencing of Linear issue mentions with memory drawers via a daemon.
Allows exporting and importing memory drawers to Obsidian vaults for manual editing and integration.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CairntirWhat decisions and blockers from the previous session should I know?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cairntir
Persistent, local-first memory for AI coding agents. Claude Code, Codex, Cursor, Qwen Code, and other MCP clients share one searchable project history.
Cairntir stores decisions, facts, unfinished work, and outcomes as verbatim drawers in a SQLite database you own. A budgeted handoff restores complete drawers across sessions; semantic and file-anchored recall find deeper evidence.
Current release: 1.11.0. See the release evidence and changelog. Published downloads are on PyPI and GitHub Releases.
Install
pip install --upgrade cairntir
cairntir setupPython 3.11+ is required. Setup initializes the store and configures supported hosts it detects. Restart your agent afterward.
cairntir version
cairntir doctorFor one host or project, use cairntir init --host codex; add --user for
user-scope configuration. Cursor's global User Rule requires a manual paste;
setup prints the rule and reports that step.
Follow the getting-started guide for configuration, verification, recovery, and troubleshooting.
Related MCP server: Memryzed
Use
Ask your agent to remember a decision in your project's wing, then start the
next task with cairntir_handoff(wing="myproject"). A wing is a project, a
room is a topic, and a drawer is one verbatim memory.
cairntir handoff myproject
cairntir handoff myproject --task "repair cache invalidation" --budget 8192
cairntir recall "why did we choose Postgres?" --wing myproject
cairntir recall-for-change src/auth.py
cairntir recover --host codex --wing myproject
cairntir cost myprojectHandoff returns whole drawers or names those omitted by its character budget. It includes recent default-layer writes, open predictions, and optional code anchors. Settlements append observed outcomes without rewriting predictions.
Portable evidence preserves source identities and relationships across stores. Evaluated procedures require holdout evidence and local approval; scoped sharing limits access with owner-issued grants.
Host support
Surface | Support |
Setup | Claude Code, Cline, Codex CLI, Copilot CLI, Cursor, Gemini CLI, OpenCode, Qwen Code |
Transcript recovery | Claude Code, Codex, Qwen Code |
Other MCP clients | Configure the |
Cursor transcripts | Unsupported; an explicit receipt explains the limitation |
Transcript recovery is opt-in, separately budgeted, read-only, and untrusted.
It reads bounded host-owned transcript tails; it cannot recover text the host
never persisted. Saving a recovered request requires explicit selection with
cairntir recover ... --write N. Memory is not automatically made
authoritative merely because it appeared in a transcript or imported file.
Data and safety
The authoritative store is local SQLite with sqlite-vec. Embeddings run
locally; first use may download the embedding model. Optional update checks
contact PyPI, and explicitly selected LLM adapters can contact their provider.
Cairntir is not a sandbox for the agent using it.
Portable JSONL verifies content hashes and optionally HMAC signatures through the Python API. The CLI imports as untrusted and does not verify signatures. Version 1 cannot safely import source-local history references; use a database backup for linked history. Export/import also enforce the format's external-URL restriction. See data handling for backup and trust boundaries.
Build and integrate
The MCP server exposes 21 tools over stdio. Stable Python protocols support custom backends; see the integration guide.
src/cairntir/
├── memory/ # SQLite storage, embeddings, retrieval
├── mcp/ # stdio server and backend
├── reason/ # prediction, experiment, observation
├── recipes/ # composable workflows
└── cli.py # cairntir setup | init | handoff | recover | recall | replay | hotfix | doctor | export | import
tests/ # unit, integration, contract, property, evaluation
docs/ # guides, architecture, recipes, release evidenceContributing documents the locked development environment and required checks. Tests enforce at least 80% coverage of the measured surface; transport entrypoints are excluded and tested separately. The LongMemEval subset is a regression gate, not a general benchmark claim.
Documentation
Recipes: CodeGlass, Decision Replay, Signal Reader, Bounded Hotfix, and Finalization Mode
Cairntir (CAIRN-teer) combines a cairn, a waypoint of stacked stones, with a seeing-stone. Maintained by Patrick McGuire. MIT licensed.
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
- mcpOAuthai.butlerbrain
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Private persistent memory for Claude, ChatGPT & Gemini via MCP - semantic search, zero-code setup.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA local, persistent memory system for AI coding assistants that stores decisions, patterns, and session context via MCP tools. It enables cross-session memory management using SQLite and optional vector search without external dependencies or cloud storage.50 npm64MIT
- FlicenseNot gradedqualityCmaintenanceLocal-first cross-agent memory for AI coding agents. Persistent, shared memory over MCP — what you tell one agent can be recalled by another — with all data stored in a single local SQLite file, no cloud and no API keys.-
- AlicenseAqualityBmaintenanceLocal-first memory for Claude Code and any MCP client: hybrid vector + keyword search and a bi-temporal knowledge graph in one SQLite file. Local embeddings, no API key, $0/token.51206 npm1PolyForm Noncommercial 1.0.0
- AlicenseNot gradedqualityBmaintenancePersistent memory for AI coding agents that stores and recalls preferences, decisions, and conventions via semantic similarity, with zero cloud dependencies and plug-and-play MCP integration for Claude Code.Apache 2.0