Cairn
Cairn
Cairn ist ein Append-only-Speicher für typisierte Fakten. Ein Agent erfasst in einer Sitzung einen Fakt und ruft ihn zu Beginn der nächsten Sitzung mit einer Frische-Bewertung ab.
Fakten werden in SQLite dauerhaft gespeichert. Das Desk ist optional. Die Arbeit erfolgt über JSON und MCP.
Installation
npx cairn init --project
npx cairn devinit --project erstellt .cairn/cairn.db, konfiguriert Cursor (.cursor/mcp.json) und konfiguriert Pi (.mcp.json).
Globale Installation ohne Projektdatei:
npx cairn initRelated MCP server: identity-storage-mcp
Befehle
Befehl | Zweck |
| Datenbank und MCP-Konfiguration für Cursor und Pi im aktuellen Repository |
| Desk und API auf Port 4721 |
| Produktionsserver nach |
| Stdio-MCP-Server für Agents |
| Aktuelle Überzeugungen als JSON ausgeben |
Agentenvertrag
Sende JSON an POST /api/cairn oder rufe die MCP-Tools cairn_recall und cairn_request auf.
Jeder Schreibvorgang trägt einen idempotencyKey. Wenn nach einem Absturz derselbe Key und Body erneut gesendet werden, gibt Cairn das ursprüngliche Ergebnis zurück, ohne doppelt zu schreiben.
Der Abruf liefert für jede Überzeugung freshness und assurance. Verzweige anhand von response.kind. Ablehnungen enthalten error.remedy.kind.
Beispiel: Fakt erfassen
curl -s http://127.0.0.1:4721/api/cairn \
-H 'content-type: application/json' \
-d '{
"kind": "assert",
"idempotencyKey": "s-021-deploy",
"onConflict": "supersede",
"draft": {
"entity": "repo:acme/checkout",
"attribute": "deploy.command",
"value": { "kind": "text", "text": "bin/ship --env staging" },
"provenance": {
"kind": "observed",
"command": "cat Makefile && bin/ship --help",
"session": "s-021"
},
"validity": { "kind": "until-superseded" }
}
}'Harness-Plugins
Cursor. Nach cairn init --project enthält .cursor/mcp.json einen cairn-Server, der npx cairn mcp ausführt.
Pi. Dieselbe Initialisierung schreibt .mcp.json für Pi und andere MCP-Clients. Pi liest .mcp.json und Host-Importe wie cursor.
Desk und Canvas
Öffne Desk (/) für die Tabelle der Überzeugungen und die Agent-API-Konsole. Öffne Canvas (/canvas), um jeden Agenten oder jede Sitzung als verschiebbaren Container mit den Fakten zu sehen, die sie beigetragen haben.
Die Gruppierung erfolgt für mitgeteilte Fakten nach provenance.by und für beobachtete oder abgeleitete Fakten nach provenance.session. Ziehe die Karten, um das Board anzuordnen; das Layout wird in .cairn/canvas.json gespeichert.
Veröffentlichen und über npm installieren
npm publish
npx cairn init --project
npx cairn devDas veröffentlichte Tarball enthält Desk, Canvas, API, CLI und MCP-Server in vollem Umfang. Es ist Node 20+ erforderlich.
Entwicklung
npm install
npm test
npm run devDer Datenbankpfad wird zu ./.cairn/cairn.db aufgelöst, wenn dieses Verzeichnis existiert, andernfalls zu ~/.cairn/cairn.db. Überschreiben lässt sich das mit CAIRN_HOME oder CAIRN_DB_PATH.
Release-Trailer (Remotion)
Ein ca. 30 Sekunden dauernder Produkttrailer für X liegt in cairn-trailer/. Vorschau mit npm run dev in diesem Ordner – alternativ rendern:
cd cairn-trailer
npx remotion render CairnTrailer out/cairn-v0.4-trailer.mp4Siehe cairn-trailer/x-post-draft.md für einen Textvorschlag für den Post.
Was Cairn ablehnt
Beliebige JSON-Werte. Semantische Suche. Vorhandene Fakten direkt ändern. Mitten in einer Anfrage auf einen Menschen warten.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides a memory layer for personal agents, enabling MCP-compatible agents to store and query profile, factual, episodic, and procedural memory.MIT
- AlicenseAqualityBmaintenanceProvides persistent, inspectable memory storage for AI agents using SQLite. Agents can store, recall, and search memories across sessions via three MCP tools.3MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that gives agents persistent memory with namespaced facts, tags, full-text search, and TTL expiry, all running locally on SQLite with zero external dependencies.1MIT
- AlicenseNot gradedqualityFmaintenanceLocal-first, auditable memory for AI agents. Provides durable context for MCP hosts with SQLite storage, CLI, and MCP tools for memory management.2Apache 2.0
Related MCP Connectors
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Cross-vendor AI memory over MCP. One semantic store, readable and writeable from every MCP client.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/QuarkOS/Cairn'
If you have feedback or need assistance with the MCP directory API, please join our Discord server