Agentcairn logo

Agentcairn

by ccf

Local-first shared memory for coding agents, using Markdown as the source of truth and DuckDB for hybrid retrieval.

Install Agentcairn

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "ccf-agentcairn": {
      "command": "uvx",
      "args": [
        "agentcairn"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 5 tools correctly ().

Overview

The ccf/agentcairn MCP server gives coding agents shared, local-first memory backed by a plain-Markdown vault and a rebuildable DuckDB retrieval index. It captures and redacts durable context, then combines BM25, semantic vector, and graph signals to recall relevant notes with project and validity metadata. Use it when multiple coding agents need one inspectable memory, especially across Claude Code, Codex, Cursor, or another MCP host. Install with uvx or through the supported Claude Code and Codex plugins.

Use cases

  • Share durable project context across Claude Code, Codex, and Cursor
  • Recall prior deployment decisions during a new coding session
  • Inspect and edit agent memory as Markdown in an Obsidian vault
  • Capture session context while redacting recognized credentials

Key features

  • Markdown vault as the canonical memory store
  • Rebuildable DuckDB retrieval cache
  • Hybrid BM25 and vector recall with graph context
  • Credential redaction and non-lossy history
  • Project-aware, time-aware retrieval
  • stdio MCP server for multiple coding-agent hosts

Tools5

What Agentcairn lets your agent do. Expand a tool for its parameters.

Verified live~567 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

27/27 checks healthy over the last 96d

What it can do

From the 5 tools this server returned when we ran it.

Read-only tools · 5
Network at startup2 connections
Files written at startup18

Observed 2026-11-10 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9d ago via OSV.dev · agentcairn (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars75Stargazers on the source repository.
Last commit8d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed5Callable tools this server registers over MCP.
Directory activity12 viewsConfig copies, upvotes, and views on AllMCPs.

How Agentcairn works

What ccf/agentcairn MCP server does

The ccf/agentcairn MCP server provides durable memory for coding agents. It stores canonical notes as Markdown files in a local vault, while DuckDB holds a disposable index for retrieval. The vault can be inspected and edited directly, including through the companion Obsidian integration, so the stored memory is not confined to a hosted service or an opaque database.

The server supports two central memory operations: recalling relevant context and remembering a durable fact. A successful remember operation writes the Markdown note and updates the index together, making the note available to a subsequent recall. Recall results include context such as project association, validity state, and a permalink.

How it works

AgentCairn can receive context through host integrations and transcript ingestion. Capture applies credential redaction, deduplication, importance gating, and distillation before automated plaintext writes. Host hooks improve immediate capture, while cairn sweep provides an out-of-band backstop for supported transcript stores.

On read, the server reconciles the vault with its DuckDB cache. Retrieval combines BM25 text search and semantic vectors using Reciprocal Rank Fusion, with optional reranking. If an embedding or reranking model fails, the system can fall back to BM25 and report diagnostics rather than using incompatible vectors.

The current project receives a default ranking boost, while cross-project memories remain available and labeled. Validity fields such as valid_from, valid_until, and superseded_by keep older evidence inspectable while favoring current information. Markdown wikilinks and optional cairn link neighbors provide deterministic graph context.

Setup and configuration

The ccf/agentcairn MCP server can run through uvx agentcairn; the documented default vault is ~/agentcairn, created on first use. Install uv first if uvx is unavailable. The server uses stdio, does not require a daemon or external database, and runs FastEmbed locally by default. The first local run may download and warm embedding or reranking models.

Claude Code and Codex have first-class plugin installation commands that bundle the MCP server, memory skill, and host-specific hooks. Cursor, VS Code with Copilot, Claude Desktop, and other supported hosts can be configured with cairn install or the portable MCP command. Installation previews detected hosts, backs up MCP configuration before changes, and preserves unrelated server entries.

No environment variables are required by the documented default setup. The vault is the durable store; the DuckDB index is rebuildable and can be deleted without deleting the Markdown files.

Tools and capabilities

The ccf/agentcairn MCP server exposes memory recall and durable remember operations for connected agents. Its surrounding capabilities include:

  • Store durable context as Markdown with provenance.
  • Recall using lexical, vector, and graph-related signals.
  • Redact recognized credentials before automated writes.
  • Preserve superseded and expired notes instead of silently deleting them.
  • Share one configured vault across supported coding agents.
  • Return project, validity, and permalink context with recalled results.
  • Reconcile a disposable DuckDB cache from the canonical files.

Supported integrations listed by the project include Claude Code, Codex, Cursor, OpenCode, Hermes Agent, Antigravity, VS Code with Copilot, and Claude Desktop. Other MCP hosts can use the portable stdio server, subject to host-specific integration behavior.

Limitations and notes

The server does not provide useful recall from an empty vault; a durable fact must be saved first. Automatic recall and capture vary by host. Claude Code and Codex provide documented ambient hooks, Cursor uses out-of-band sweep, and some hosts expose only the MCP server. The index is a cache rather than the source of truth, so direct Markdown edits are honored during reconciliation.

Model downloads may occur during the first local run. Retrieval quality depends on the available local models and can fall back to BM25 when model or provider operations fail. Automatic recall is project-scoped by default, although explicit cross-project results remain possible. The repository is licensed under Apache-2.0.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Agentcairn

ccf/agentcairn is an MCP server that connects coding agents to a local Markdown memory vault and a rebuildable DuckDB retrieval index. Its main tools support recalling relevant project context and remembering durable facts. It combines BM25, vector, and graph signals, preserves provenance, and can share one vault across supported MCP hosts.

Install it with `uvx agentcairn`, after installing `uv` if `uvx` is unavailable. Claude Code and Codex can use the documented plugin commands, while other supported hosts can use `cairn install` or the portable stdio MCP configuration.

Memory is stored by default in the local `~/agentcairn` Markdown vault. DuckDB is a derived retrieval cache rather than the source of truth, and deleting or rebuilding that cache does not delete the Markdown notes.

Yes, Cursor is a documented integration using MCP, a memory skill, and ingest. Its listed ambient memory support uses an out-of-band sweep rather than the same per-turn hooks documented for Claude Code.

Yes, both Claude Code and Codex have first-class plugin integrations. Claude Code receives per-turn recall and session capture, while Codex receives bundled MCP tools, SessionStart recall, SessionEnd capture, and a sweep backstop.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAgentcairn AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/ccf-agentcairn?style=directory)](https://allmcps.com/mcp/ccf-agentcairn)
HTML Embed
<a href="https://allmcps.com/mcp/ccf-agentcairn"><img src="https://allmcps.com/api/badge/ccf-agentcairn?style=directory" alt="Agentcairn on AllMCPs" /></a>