Cairn
Cairn
Cairn은 타입이 지정된 사실(fact)을 추가 전용(append-only)으로 저장하는 저장소입니다. 에이전트가 한 세션에서 사실을 주장(assert)하고, 다음 세션 시작 시 신선도(freshness) 판정과 함께 이를 회상(recall)합니다.
사실은 SQLite에 영속화됩니다. 데스크(desk)는 선택 사항입니다. 작업은 JSON과 MCP에서 이루어집니다.
설치
npx cairn init --project
npx cairn devinit --project는 .cairn/cairn.db를 생성하고, Cursor(.cursor/mcp.json)와 Pi(.mcp.json)를 연결합니다.
프로젝트 파일 없이 전역 설치:
npx cairn initRelated MCP server: identity-storage-mcp
명령어
명령어 | 용도 |
| 현재 저장소에 데이터베이스 + Cursor + Pi MCP 구성 |
| 포트 4721에서 데스크 및 API 실행 |
|
|
| 에이전트용 Stdio MCP 서버 |
| 현재 신념(beliefs)을 JSON으로 출력 |
에이전트 계약
POST /api/cairn으로 JSON을 보내거나 MCP 도구 cairn_recall 및 cairn_request를 호출하세요.
모든 쓰기에는 idempotencyKey가 포함됩니다. 충돌 후 동일한 키와 본문을 재생하면 Cairn은 중복 쓰기 없이 원래 결과를 반환합니다.
Recall은 각 신념에 대해 freshness와 assurance를 반환합니다. response.kind에 따라 분기하세요. 거부에는 error.remedy.kind가 포함됩니다.
주장(assert) 예시
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" }
}
}'하네스 플러그인
Cursor. cairn init --project 이후 .cursor/mcp.json에는 npx cairn mcp를 실행하는 cairn 서버가 포함됩니다.
Pi. 동일한 init이 Pi 및 기타 MCP 클라이언트용 .mcp.json을 작성합니다. Pi는 .mcp.json과 cursor 같은 호스트 임포트를 읽습니다.
데스크 및 캔버스
데스크(/)를 열면 신념 테이블과 Agent API 콘솔이 표시됩니다. 캔버스(/canvas)를 열면 각 에이전트 또는 세션이 기여한 사실과 함께 드래그 가능한 컨테이너로 표시됩니다.
에이전트는 말해진(told) 사실의 경우 provenance.by로, 관찰되거나 추론된(observed or inferred) 사실의 경우 provenance.session으로 그룹화됩니다. 포드를 드래그하여 보드를 정렬하세요. 레이아웃은 .cairn/canvas.json에 유지됩니다.
npm에서 게시 및 설치
npm publish
npx cairn init --project
npx cairn dev게시된 tarball에는 전체 데스크, 캔버스, API, CLI 및 MCP 서버가 포함됩니다. Node 20+가 필요합니다.
개발
npm install
npm test
npm run dev데이터베이스 경로는 해당 디렉터리가 존재하면 ./.cairn/cairn.db로, 그렇지 않으면 ~/.cairn/cairn.db로 결정됩니다. CAIRN_HOME 또는 CAIRN_DB_PATH로 재정의할 수 있습니다.
릴리스 트레일러 (Remotion)
X용 약 30초 분량의 제품 트레일러가 cairn-trailer/에 있습니다. 해당 폴더에서 npm run dev로 미리 보거나 렌더링하세요:
cd cairn-trailer
npx remotion render CairnTrailer out/cairn-v0.4-trailer.mp4제안된 게시물 문안은 cairn-trailer/x-post-draft.md를 참조하세요.
Cairn이 거부하는 것
자유 형식 JSON 값. 의미론적 검색. 사실의 제자리 편집. 요청 중간에 사람을 기다리는 것.
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