Kairn
Local knowledge graph with recall and decay that gives AI agents long-term memory
Kairn is an open-source MCP server for knowledge and memory. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, Self-hosted, macOS
- Runs
- Locally
- Version
- 0.3.2
- Listing updated
Similar MCP servers
Install
In Claude Desktop → Settings → Extensions
https://github.com/primeline-ai/kairn/releases/download/v0.3.2/kairn-0.3.2.mcpbDownload the bundle and open it with Claude Desktop, or drag it onto Settings → Extensions and click Install. This server is only published as a Claude Desktop bundle.
Using several servers? Build one config file with the MCP config generator.
Configuration
KAIRN_WORKSPACEDirectory holding the Kairn database. Everything Kairn stores stays inside it and never leaves this machine. Defaults to ~/.kairn.
About Kairn
Instead of storing flat notes, Kairn keeps typed relationships such as depends-on, resolves and causes between nodes, with provenance and full-text search. A context router loads a relevant subgraph from keywords, starting with summaries and drilling into detail only when needed, so the assistant gets focused context rather than everything.
Experiences decay over time under a biological-style model, and ones that are accessed often are promoted to permanent knowledge. Storing a high-confidence fact creates both a graph node and a decaying experience. The README warns that relevance scores mean different things by result type (match, match_recency, recency, similarity), so they should not be sorted together.
Data lives in an isolated SQLite store per workspace, by default in ~/.kairn, and the README says it never leaves your machine. Install with pip, as a one-click .mcpb bundle for Claude Desktop, or with a one-line command for Claude Code or Codex. Team deployments add JWT auth and owner, maintainer, contributor and reader roles. The project is pre-1.0 and interfaces may change.
Tools this server provides (6)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 6 names don't say.
From the server's own tool labels and tool names; not verified by us.
- kn_learn
- Store a fact as a graph node and a decaying experience
- kn_recall
- Recall stored nodes and experiences by topic
- kn_judge
- Five-verb relationship judgments
- kn_doctor
- Read-only health diagnostics
- kn_memories
- List experiences
- kn_prune
- Prune old experiences
What it does
- Knowledge graph
- Typed relationships between nodes with provenance and full-text search.
- Context router
- Loads relevant subgraphs by keyword, summaries first.
- Experience decay
- Old experiences fade while frequently used ones become permanent.
- Per-workspace isolation
- Each workspace is its own SQLite store on your machine.
- Role-based access
- JWT auth with owner, maintainer, contributor and reader roles for teams.
- One-click bundle
- An .mcpb file installs it in Claude Desktop without Python setup.
Good for
- Remember design decisions and recall them in later sessions
- Give a coding assistant persistent project context
- Link causes, fixes and dependencies as a graph
- Run a private memory store for a team with roles
Pricing
Open source
Local-first and free to run
Kairn FAQ
Where is my data stored?
In a local SQLite workspace, by default ~/.kairn, and the README says it stays on your machine.
How many tools are there?
22 MCP tools.
Is Kairn production-ready?
The README labels it pre-1.0 with interfaces that may change.
How do I add Kairn to Claude Code?
Run `claude mcp add kairn -- kairn serve --init ~/brain`.
Is Kairn free?
Yes. Kairn is open source, so you can use and self-host it for free.
What are the best alternatives to Kairn?
The closest alternatives to Kairn are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and Myco: Agent-First Cognitive Substrate.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.



