Skip to main content
MCP server CX Codex

kairn — Claude Code MCP server: what it does, how to install

A local knowledge engine for AI agents. It stores connected facts and routes useful context into new sessions.

Open on GitHub

What kairn does

kairn keeps agent knowledge in a local graph with typed links, source tracking, and FTS5 full-text search. Its context router starts with compact summaries and expands into details when the task calls for them. Stored experiences fade over time, while frequently used ones can become lasting knowledge.

The MCP server exposes 22 tools, including kn_judge for relationship decisions and kn_doctor for read-only health checks. Each workspace uses its own SQLite store. Team deployments can use JWT authentication and the owner, maintainer, contributor, and reader roles.

The PyPI route requires Python: run pip install kairn-ai, then register the server with claude mcp add kairn -- kairn serve --init ~/brain. Claude Desktop users can instead open the .mcpb bundle, which avoids a separate Python setup.

What it helps with

  • carry decisions across agent sessions
  • model dependencies as connected graph nodes
  • retrieve context by topic and relevance
  • keep workspace data isolated
  • inspect the health of a local knowledge store

Example prompts for the agent

  • Recall decisions and dependencies related to authentication.
  • Check the health of this workspace’s knowledge store.

How to install kairn

Install

The MCP registry has no launch command for it: see the repository README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about kairn

How do I install kairn in Claude Code?

Run pip install kairn-ai, then register the server with claude mcp add kairn -- kairn serve --init ~/brain. The first start creates the workspace and database.

What does kairn do?

It gives an AI agent a local knowledge graph, relationship search through FTS5, and staged context retrieval. Older experiences fade while frequently used knowledge can be retained.

Does kairn require Python?

Python is required for the PyPI installation route. Claude Desktop can use the .mcpb bundle without a separate Python setup.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor