
Cairn
Give Claude Code or Cursor a durable memory layer so sessions can store, search, and rediscover patterns instead of starting from zero.
Overview
Cairn MCP is a Build-phase MCP server that gives coding agents persistent PostgreSQL-backed memory to store, search, and rediscover patterns across sessions.
What is this MCP server?
- Store, semantic search, and pattern discovery for agents and humans
- PostgreSQL + pgvector backend with required CAIRN_DB_HOST and CAIRN_DB_PASS
- stdio or HTTP transport via CAIRN_TRANSPORT (default stdio)
- LLM enrichment via CAIRN_LLM_BACKEND: ollama (default) or bedrock
- OCI image ghcr.io/jasondostal/cairn-mcp:0.21.2 for registry-based install
- Server version 0.21.2
- 2 required database environment variables (host and password)
- Default transport stdio; optional HTTP via CAIRN_TRANSPORT
Community signal: 7 GitHub stars.
What problem does it solve?
Agents forget project context between chats, so you repeat the same explanations and lose hard-won patterns.
Who is it for?
Solo builders running long-horizon agent projects who already have or can host Postgres with pgvector.
Skip if: Teams that want zero-infra, file-only notes with no database or vector setup.
What do I get? / Deliverables
After you register Cairn, your agent can write and query durable memory so later tasks reuse stored patterns instead of reinventing them.
- MCP tools to store and search durable agent/human memory
- Pattern discovery over embedded memories in Postgres
- Configurable stdio or HTTP transport for local or shared deployments
Recommended MCP Servers
Journey fit
Agent-memory MCPs are cataloged on Build → agent-tooling because that is where solo builders wire persistent context into their coding agents, even though memory pays off in every later phase. Cairn is persistent vector-backed memory for agents and humans—not a one-off API hook—so agent-tooling is the canonical shelf.
How it compares
MCP memory backend with pgvector, not a markdown-only skill or ephemeral chat context.
Common Questions / FAQ
Who is Cairn MCP for?
It is for indie developers and small teams using Claude Code, Cursor, or Codex who need cross-session memory for agents and humans.
When should I use Cairn MCP?
Use it when a project spans many agent sessions and you want searchable, persistent patterns rather than one-off prompts.
How do I add Cairn MCP to my agent?
Register the stdio server (or HTTP with CAIRN_TRANSPORT), set CAIRN_DB_HOST and CAIRN_DB_PASS for PostgreSQL/pgvector, then point your MCP client at the published OCI or repo package.