Cairn MCP server
io.github.luckyjackluo/cairn·v0.2.0·2 starsLocal-first file-organization tools for your AI agent: tag, query, and digest a folder. No cloud.
2 stars24 downloads/wk
Reviews
Write oneNobody has reviewed Cairn yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Cairn tools (21, 4 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
create_filewrite actionCreate a file under `path`. If `name` ends in .uni, wraps content as a .uni doc.
create_folderwrite actionCreate a new folder `name` under `path`.
delete_itemwrite actionDelete a file or folder (recursive for folders).
digest_workspaceReturn a token-efficient map of the workspace: one entry (title, date, tags, summary) per document, grouped by `folder`, `tag`, or a metadata field like `status`/`project`. Read this before loading individual files.
find_by_metaFind documents whose metadata matches all `filters` (exact, not fuzzy).
get_file_tagsReturn a document's tags — from a .uni's tags array or a text file's YAML frontmatter.
get_file_treeReturn the nested file/folder tree under a directory (default: whole workspace).
get_tag_treeReturn {tag: [file paths]} aggregated across the workspace.
grepSearch file contents for `pattern`; returns {path, line, text} matches.
import_documentConvert a docx/pdf/pptx/csv/xlsx/md/text file into an editable .uni doc.
import_folderImport every convertible (non-.uni) file under a folder into .uni docs.
list_dirList files and folders directly under a workspace-relative directory.
list_templatesList available document templates (built-ins + workspace .cairn/templates).
move_itemMove a file or folder into `target_dir`.
multi_editReplace a single, unique occurrence of `old_string` with `new_string` in a file.
read_detailRead a file. For .uni docs returns HTML content, flattened text, and tags; for text/.md files returns raw text plus any YAML frontmatter tags & metadata.
reindexBuild/refresh the embedding index (no-op if no embedder is configured).
rename_itemRename a file or folder in place (bare name, not a path).
search_filesFind files/folders whose name contains `query` (case-insensitive).
semantic_retrieveReturn the documents most relevant to `query`.
update_file_tagswrite actionReplace a document's tags — in a .uni's tags array or a text file's YAML frontmatter.
Public scan report
scanner v0.1.9 · 2026-09-25 · same rubric, same numbers if you re-run it
- Code scan3 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 59 days ago12/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Cairn compares
Against every graded AI and agents MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 88/100
- higher than 80% of 4,460 AI and agents servers
- Tools
- 21
- the typical AI and agents server has 6
- Tools that change things
- 19%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 2
- more than 65% of 2,711 AI and agents servers
- Downloads a week
- 24
- more than 10% of 1,538 AI and agents servers with a package
What its tools let an agent do: 13 read · 4 create · 3 change · 1 delete
Install Cairn in Claude Code, Cursor or VS Code
claude mcp add cairn -- uvx cairn-mcp-server
What the publisher says
From the Cairn repository's README, as published. We do not edit it. Read it on GitHub
Cairn
A local-first, open-source harness for organizing your files with an AI agent.
Point Claude Code, Codex, Cursor — any MCP client — at a folder, and your agent gains a full file-organization toolset: list, read, search, grep, edit, move, tag, import documents, and semantically retrieve. No account, no cloud, no UI required. Your files never leave your machine.
claude mcp add cairn -- uvx cairn-mcp-server --workspace ~/Documents/notesThen ask your agent to "organize this folder and tag everything" — it will, using tools that run locally over your own files.
A cairn is a stack of stones that marks a trail. This one keeps your files in
order and shows the way through them.
Quickstart (2 minutes)
If you use Claude Code, setup is one command — the only prerequisite is uv, which provides uvx:
# 1. Install uv if you don't have it (provides uvx)
curl -LsSf https://astral.sh/uv/install.sh | sh
# 2. Add Cairn to Claude Code, pointed at a folder you want organized
claude mcp add cairn -- uvx cairn-mcp-server --workspace ~/Documents/notesReopen Claude Code and ask:
"Organize this folder and tag everything."
Cairn's tools run locally over your files — reads happen freely, and any move/rename/edit asks for confirmation first. The first run auto-downloads the package (~5s); no clone, no build, no account.
[!TIP]
Point --workspace at a copy of some notes for your first run — Cairn can
move, rename, and edit files.
Using Codex? Same one-command flow (then run /mcp in a session to confirm):
codex mcp add cairn -- uvx cairn-mcp-server --workspace ~/Documents/notesUsing Cursor or another MCP client? Same package, JSON config:
{ "mcpServers": { "cairn": { "command": "uvx",
"args": ["cairn-mcp-server", "--workspace", "~/Documents/notes"] } } }~ is expanded by Cairn, so ~/Documents/notes works in the CLI and in config files alike.
Just want to poke at it, no agent?
uvx cairn-cli --workspace ~/Documents/notes treeWhy a harness
The agent-harness ecosystem converged on a clear pattern: the model and the agent loop are commodities supplied by the client (Claude Code, Codex, OpenCode). The durable value is the tools and the local data. So Cairn ships tools, not an agent — the client provides the loop, the approval prompts (driven by our tool annotations), and the chat. Cairn is just the local file-organization toolset that snaps into whatever harness you already use.
Architecture
Everything is a thin adapter over one standard-library core, so the faces can never drift.
core/ cairn-core — the engine (stdlib only): the .uni document format,
file operations, tags, retrieval; optional document ingestion
(docx/pdf/pptx/xlsx/md) and embeddings-based search.
mcp-server/ cairn-mcp-server — MCP server: 26 tools with read-only/destructive
annotations, resources, and prompts. ← the flagship
cli/ cairn-cli — scriptable CLI, a local HTTP API (`serve`),
and an `mcp` launcher.
web/ cairn-web — optional zero-build local web UI
(browse / edit / view / tag / search).Use it
In Claude Code / Codex / Cursor (primary):
claude mcp add cairn -- uvx cairn-mcp-server --workspace ~/Documents/notes
# with real-document import: uvx --with "cairn-core[convert]" cairn-mcp-server ...The server exposes read-only tools (list, read, search, grep, retrieve) that the client runs freely, and destructive tools (move, delete, edit) that it confirms first — driven by MCP tool annotations, so you get approval prompts with no UI of ours.
As a CLI:
uvx cairn-cli --workspace ~/Documents/notes tree
uvx cairn-cli --workspace ~/Documents/notes retrieve "budget planning"With the optional web UI:
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Cairn: common questions
- Is Cairn MCP server safe?
- Yes, by our scan: it is graded A (88/100). Read the Cairn safety report
- How do I install Cairn?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Cairn need an API key?
- No secret keys are declared. It reads 1 setting from the environment.
- Is Cairn maintained?
- The last commit was 98 days ago (2026-07-29). The latest release is v0.2.0.
- What can I use instead of Cairn?
- Servers from other publishers that do the same job: Basic Memory MCP server, FireCMS Cloud MCP server and HOL Guard MCP server.
- How does Cairn compare with other AI and agents MCP servers?
- safety score 88/100 (higher than 80% of 4,460 AI and agents servers); tools 21 (the typical AI and agents server has 6); tools that change things 19% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to Cairn
Same job from other publishers: the closest match first, then the best rated.
- Basic MemoryLocal-first knowledge management with bi-directional LLM sync via Markdown files.not reviewedWidely usedB
- FireCMS CloudManage FireCMS Cloud from an AI agent: Firestore data, collections, schemas and users.not reviewedEstablishedA
- HOL GuardLocal-first AI agent security evidence and approval workflows through HOL Guard's stdio MCP server.not reviewedEstablishedA
- Agent-Native ChatMinimal chat-first app with durable threads, actions, and the app-agent loopnot reviewedEstablishedA
- Alibaba Cloud DashScope — QwenAlibaba Cloud DashScope MCP: Qwen chat, embeddings, and model discovery on your own account.not reviewedEstablishedB