ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

Cairn

โดย jasondostalรุ่น 0.21.2i★ –iรันบนเครื่อง
ชื่อใน registryio.github.jasondostal/cairn-mcp

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Persistent memory for AI agents and humans. Store, search, and discover patterns.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: ค้นข้อมูลและความจำของ AI
  • ต้องใส่ค่าเหล่านี้: CAIRN_DB_HOST, CAIRN_DB_PASS

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

ค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต

ต้องเตรียมก่อน

  • Dockerติดตั้ง Docker ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "cairn": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "CAIRN_DB_HOST",
        "-e",
        "CAIRN_DB_PASS",
        "-e",
        "CAIRN_TRANSPORT",
        "-e",
        "CAIRN_LLM_BACKEND",
        "ghcr.io/jasondostal/cairn-mcp:0.21.2"
      ],
      "env": {
        "CAIRN_DB_HOST": "ใส่ค่าของคุณ",
        "CAIRN_DB_PASS": "ใส่ค่าของคุณ",
        "CAIRN_TRANSPORT": "ใส่ค่าของคุณ",
        "CAIRN_LLM_BACKEND": "ใส่ค่าของคุณ"
      }
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add cairn --env CAIRN_DB_HOST='ใส่ค่าของคุณ' --env CAIRN_DB_PASS='ใส่ค่าของคุณ' --env CAIRN_TRANSPORT='ใส่ค่าของคุณ' --env CAIRN_LLM_BACKEND='ใส่ค่าของคุณ' -- docker run -i --rm -e CAIRN_DB_HOST -e CAIRN_DB_PASS -e CAIRN_TRANSPORT -e CAIRN_LLM_BACKEND ghcr.io/jasondostal/cairn-mcp:0.21.2

เติมค่าที่เว้นว่างไว้ก่อนรัน

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "cairn": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "CAIRN_DB_HOST",
        "-e",
        "CAIRN_DB_PASS",
        "-e",
        "CAIRN_TRANSPORT",
        "-e",
        "CAIRN_LLM_BACKEND",
        "ghcr.io/jasondostal/cairn-mcp:0.21.2"
      ],
      "env": {
        "CAIRN_DB_HOST": "ใส่ค่าของคุณ",
        "CAIRN_DB_PASS": "ใส่ค่าของคุณ",
        "CAIRN_TRANSPORT": "ใส่ค่าของคุณ",
        "CAIRN_LLM_BACKEND": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "cairn": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "CAIRN_DB_HOST",
        "-e",
        "CAIRN_DB_PASS",
        "-e",
        "CAIRN_TRANSPORT",
        "-e",
        "CAIRN_LLM_BACKEND",
        "ghcr.io/jasondostal/cairn-mcp:0.21.2"
      ],
      "env": {
        "CAIRN_DB_HOST": "ใส่ค่าของคุณ",
        "CAIRN_DB_PASS": "ใส่ค่าของคุณ",
        "CAIRN_TRANSPORT": "ใส่ค่าของคุณ",
        "CAIRN_LLM_BACKEND": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าที่ต้องใส่เอง

  • CAIRN_DB_HOST จำเป็น env
    PostgreSQL host (pgvector)
  • CAIRN_DB_PASS ความลับ จำเป็น env
    PostgreSQL password
  • CAIRN_TRANSPORT env
    Transport mode: stdio or http
  • CAIRN_LLM_BACKEND env
    LLM backend for enrichment: bedrock or ollama

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 8 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub jasondostal ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด ค้นข้อมูลและความจำของ AIi

  • ดาวมากกว่า 0% ของอีก 5676 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 3% ของอีก 5676 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 5676 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Cairn ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

ต้องใส่ค่าเหล่านี้: CAIRN_DB_HOST, CAIRN_DB_PASS

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.21.2) เข้า registry 9 เดือนที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Docker ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี Context7, Codebase Memory, Exa

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

Context7

โดย upstash

ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว

บนเครื่องหรือคลาวด์★ 64,224MITอัปเดต เมื่อวาน
ติดตั้ง

Codebase Memory

โดย DeusData

Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.

รันบนเครื่อง★ 48,148MITอัปเดต 21 วันที่ผ่านมา
ติดตั้ง

Exa

โดย exa-labs

Connect AI agents to Exa for web search, content fetching, and multi-step research.

รันบนคลาวด์★ 5,213MITอัปเดต 2 เดือนที่ผ่านมา
ติดตั้ง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

[!IMPORTANT]

Cairn is retired, and this repository is archived (read-only).

Its successor is [rill](https://github.com/jasondostal/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.

Quick Start

1. Pull and run
curl -O https://raw.githubusercontent.com/jasondostal/cairn-mcp/main/docker-compose.yml

docker compose up -d

Four containers start:

  • cairn on port 8000 (MCP server + REST API)
  • cairn-ui on port 3000 (web dashboard)
  • cairn-db (PostgreSQL 16 + pgvector)
  • cairn-graph (Neo4j 5, knowledge graph)

Migrations run on first boot. Ready in about a minute.

2. Connect your IDE

Add this to your MCP config:

{

"mcpServers": { "cairn": { "type": "http", "url": "http://localhost:8000/mcp" } } }

Where that goes:

IDEConfig file
Claude Code.mcp.json in your project root
Cursor.cursor/mcp.json
Windsurf.windsurf/mcp.json
ClineMCP 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:

git clone https://github.com/jasondostal/cairn-mcp.git && ./cairn-mcp/scripts/setup.sh

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.

3. Use it

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:

ToolWhat it does
storeSave a memory with auto-enrichment. Supports event_at and valid_until for bi-temporal tracking
searchFind memories (vector + keyword + recency + tags). Temporal filters: as_of, event_after, event_before
recallGet full content for specific memory IDs
orientBoot a session with rules, recent activity, beliefs, and open work
rulesLoad behavioral guardrails (global or per-project)
beliefsDurable epistemic state — crystallize, challenge, retract knowledge with confidence tracking
work_itemsCreate, claim, and complete tasks with dependencies and gates
working_memoryCapture ephemeral thoughts — hypotheses, questions, tensions — with salience decay
projectsManage project docs (briefs, PRDs, plans)
code_queryStructural queries: dependents, impact, callers, callees, dead code, complexity, hotspots
arch_checkValidate architecture boundary rules against imports

The rest: modify, insights, think, status, consolidate, ingest.

What's in the box

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.

Supported languages (30)

CategoryLanguages
SystemsC, C++, Rust, Go, Zig
JVMJava, Scala, Kotlin, Groovy
.NETC#
ScriptingPython, Ruby, PHP, Lua, Bash
WebTypeScript/TSX, HTML, CSS
AppleSwift, Objective-C
ML/ScientificOCaml, MATLAB
Config & DataJSON, 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](docs/authentication.md).

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](docs/backup.md).

Do I need an LLM?

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:

BackendSetup
Ollama (default)Install Ollama, pull a model. Cairn connects to host.docker.internal:11434.
AWS BedrockSet CAIRN_LLM_BACKEND=bedrock, export AWS creds.
Google GeminiSet CAIRN_LLM_BACKEND=gemini, add CAIRN_GEMINI_API_KEY. Free tier available.
OpenAI-compatibleSet CAIRN_LLM_BACKEND=openai, add key. Works with OpenAI, Groq, Together, LM Studio, vLLM.

Configuration

All via environment variables. The ones that matter:

VariableDefaultWhat it does
CAIRN_PROFILE*(empty)*Preset: vector, enriched, knowledge, enterprise. Sets capability defaults.
CAIRN_LLM_BACKENDollamaLLM provider: ollama, bedrock, gemini, openai
CAIRN_DB_PASScairn-dev-passwordDatabase password. Change this for anything beyond local.
CAIRN_AUTH_ENABLEDfalseMulti-user authentication (JWT, PATs, OIDC/SSO)
CAIRN_AUTH_JWT_SECRET*(empty)*JWT signing secret (required when auth enabled)
CAIRN_OIDC_ENABLEDfalseOIDC/SSO integration (any OIDC-compliant provider)
CAIRN_MCP_OAUTH_ENABLEDfalseOAuth2 Authorization Server for remote MCP clients (Claude.ai, mobile)
CAIRN_GRAPH_BACKEND*(disabled)*Set to neo4j to enable knowledge graph
CAIRN_KNOWLEDGE_EXTRACTIONfalseEntity/statement extraction on store
CAIRN_EMBEDDING_BACKENDlocallocal (MiniLM, 384-dim) or bedrock (Titan V2, 1024-dim)
CAIRN_INGEST_DIR/data/ingestStaging directory for file-path ingestion of large documents
CAIRN_CODE_DIR/data/codeRoot directory for code intelligence indexing (mount codebases here)

Full reference is in docker-compose.yml. Every variable has a sensible default.

Authentication

Off by default. The fastest way to enable it is through the setup wizard:

./scripts/setup.sh          # includes auth as step 2

./scripts/setup-auth.sh # or run auth setup standalone

Three modes — no auth, local JWT, or OIDC/SSO. Generates secrets, validates your identity provider's discovery endpoint, writes .env. Provider-specific URL hints for Authentik, Keycloak, Auth0, Okta, and Azure AD. Both scripts support --dry-run and --non-interactive for CI.

First user to register becomes admin. Role-based access control enforces permissions across REST API, MCP HTTP, and the web UI. Personal Access Tokens for machine clients, groups with OIDC sync.

See the [Authentication Guide](docs/authentication.md) for the full reference covering all auth modes, OIDC provider configuration, and MCP client examples.

Security note: Cairn's auth system is functional and production-tested but

has not been independently audited. For network-exposed deployments, add TLS

termination and network-level access controls.

Remote MCP Access (Claude.ai, Mobile)

Connect Cairn to Claude.ai, the Claude mobile app, or any OAuth2-capable MCP client. Cairn acts as an OAuth2 Authorization Server, delegating user authentication to your existing OIDC identity provider.

Prerequisites: Auth enabled (CAIRN_AUTH_ENABLED=true), OIDC configured (CAIRN_OIDC_ENABLED=true), and a public URL set (CAIRN_PUBLIC_URL).

Enable it:

CAIRN_MCP_OAUTH_ENABLED=true

Connect from Claude.ai:

  1. Go to Claude.ai Settings > Integrations > Add custom MCP
  2. Enter your Cairn URL: https://your-cairn-domain.com/mcp
  3. Claude.ai discovers the OAuth2 endpoints automatically
  4. You'll be redirected to your identity provider to log in
  5. After login, Clau

ตัดมาแค่ช่วงต้น อ่านต่อใน repo

ถาม PopNx