This listing appears offline
Our automated checks couldnβt reach the source repository, so weβve removed it from search, browse, and the API β this page stays reachable at this direct link only. If this is your project, claim it to fix the link and restore visibility.
Claim this listingPersistent memory for AI agents and humans. Store, search, and discover patterns.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
[!IMPORTANT] Cairn is retired, and this repository is archived (read-only). Its successor is rill β a faster, leaner, MCP-native memory server written in Go that learned from everything Cairn got right (and the things it got wrong). Cairn was the first; rill is where the work continues. This repo stays up as a read-only archive β explore it, fork it, but new development lives in rill.
A self-hosted persistent memory platform for AI agents and humans. Store something once, find it later, across sessions, across projects. Four containers. docker compose up. Done.
Cairn is the memory brain. Your agent runtime handles execution β Cairn handles knowing. What decisions were made, what facts are known, what patterns emerge across projects.
It's built for the systems person. The curious. The t-shaped. The ones who need a memory that works the way they do, across everything, all at once.
Four containers start:
Migrations run on first boot. Ready in about a minute.
Add this to your MCP config:
Where that goes:
| IDE | Config file |
|---|---|
| Claude Code | .mcp.json in your project root |
| Cursor | .cursor/mcp.json |
| Windsurf | .windsurf/mcp.json |
| Cline | MCP settings panel in VS Code |
| Continue | .continue/config.yaml |
| PiClaw | .pi/mcp.json |
Or run the setup wizard β it walks you through everything: LLM backend, database, embeddings, auth, and IDE configuration:
Pick a tier (local dev, recommended, enterprise, or custom) and the wizard collects only what that tier needs. Supports --dry-run and --non-interactive for CI.
Tell your agent to remember something:
"Remember that we chose PostgreSQL for storage because it handles hybrid search without a separate vector DB."
Search for it later:
"What did we decide about the storage layer?"
That's it. 11 tools available. The ones you'll use most:
| Tool | What it does |
|---|---|
store | Save a memory with auto-enrichment. Supports event_at and valid_until for bi-temporal tracking |
search | Find memories (vector + keyword + recency + tags). Temporal filters: as_of, event_after, event_before |
recall | Get full content for specific memory IDs |
orient | Boot a session with rules, recent activity, beliefs, and open work |
rules | Load behavioral guardrails (global or per-project) |
beliefs | Durable epistemic state β crystallize, challenge, retract knowledge with confidence tracking |
work_items | Create, claim, and complete tasks with dependencies and gates |
working_memory | Capture ephemeral thoughts β hypotheses, questions, tensions β with salience decay |
projects | Manage project docs (briefs, PRDs, plans) |
code_query | Structural queries: dependents, impact, callers, callees, dead code, complexity, hotspots |
arch_check | Validate architecture boundary rules against imports |
The rest: modify, insights, think, status, consolidate, ingest.
Memory that persists across sessions. Your agent makes a decision at 2am. Next morning, different session, it finds that decision. That's the core. Bi-temporal tracking separates when something happened (event_at) from when you learned it (created_at). Memories that go unaccessed decay naturally; important ones are protected. Related memories get consolidated into higher-order insights automatically.
Beliefs. Durable epistemic state β knowledge held with confidence. Crystallize hypotheses into beliefs, challenge them with counter-evidence, retract them when wrong. Beliefs surface in session boot alongside rules and memories, giving agents a clear picture of what the organization knows and how confident it is.
Search that fuses signals. Vector similarity, recency, access frequency, keyword matching, and tag overlap blended via Reciprocal Rank Fusion. Filter by project, type, or time range. Temporal queries: "what did we know as of Tuesday?" via as_of, "what happened last week?" via event_after/event_before.
Knowledge graph. Entities and facts get extracted into a Neo4j graph that connects memories through shared people, places, projects, and concepts. Optional, but powerful when you're working across domains.
Thinking sequences. Structured deliberation β start with a goal, add thoughts (observations, hypotheses, analysis, alternatives), conclude. Both humans and agents contribute. The exploration itself becomes searchable memory.
Work management. Hierarchical work items with dependency tracking, gates that pause for human decisions, and activity logging. Experimental β evolving as we learn what works.
Web dashboard. Browse memories with OKLCH-colored toggle filters, score gradient bars, and shareable URL state. Explore the knowledge graph and entity relationships. View analytics, manage work items. Port 3000.
Memory growth by type, token usage tracking, and the full nav.
Code intelligence. A standalone worker indexes codebases with tree-sitter (30 languages) and builds a code graph in Neo4j. The server queries the graph without ever touching source files. Ask structural questions β "what depends on this file?", "who calls this function?", "what's the blast radius?" β and get answers from the code graph. Call graph extraction, cyclomatic complexity, dead code detection. Enforce architecture boundaries with YAML rules. Works across projects.
| Category | Languages |
|---|---|
| Systems | C, C++, Rust, Go, Zig |
| JVM | Java, Scala, Kotlin, Groovy |
| .NET | C# |
| Scripting | Python, Ruby, PHP, Lua, Bash |
| Web | TypeScript/TSX, HTML, CSS |
| Apple | Swift, Objective-C |
| ML/Scientific | OCaml, MATLAB |
| Config & Data | JSON, YAML, TOML, HCL (Terraform), Dockerfile, Makefile, SQL, Markdown |
Multi-user authentication and RBAC. Off by default, zero to enterprise in one command. ./scripts/setup.sh includes auth configuration, or run ./scripts/setup-auth.sh standalone. Auth mode selection (none / local JWT / OIDC SSO), JWT secret generation, OIDC provider validation. Personal Access Tokens for machine clients, stdio identity for MCP. Three roles, project-level scoping, first-user-becomes-admin. Groups with OIDC sync. See the Authentication Guide.
Disaster recovery. Cron-friendly scripts for PostgreSQL dump and Neo4j graph export with configurable retention. Tested restore procedures with migration safety checks. See the Backup Guide.
No. Store, search, recall, and rules work without one. You lose auto-enrichment (summaries, tags, importance scoring), knowledge extraction, and thinking.
If you want enrichment:
| Backend | Setup |
|---|---|
| Ollama (default) | Install Ollama, pull a model. Cairn connects to host.docker.internal:11434. |
| AWS Bedrock | Set CAIRN_LLM_BACKEND=bedrock, export AWS creds. |
| Google Gemini | Set CAIRN_LLM_BACKEND=gemini, add CAIRN_GEMINI_API_KEY. Free tier available. |
| OpenAI-compatible | Set CAIRN_LLM_BACKEND=openai, add key. Works with OpenAI, Groq, Together, LM Studio, vLLM. |
All via environment variables. The ones that matter:
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/cairn-3)<a href="https://allmcps.com/mcp/cairn-3"><img src="https://allmcps.com/api/badge/cairn-3?style=directory" alt="Cairn on AllMCPs" /></a>