Cairn

io.github.cybort360由 GitHub 账号 cybort360 发布v0.1.2更新于 Oct 24, 2026

Log Claude Code work sessions, file edits, and tasks to your Cairn account.

发布方自己的服务:Cairn.ink Memory

已验证STDIO仅桌面效率与工作流开发者工具

概览

AI 生成的概览

把 Claude Code 的工作会话、文件编辑和任务记录到 Cairn 账户,让助手能够登记活动与项目笔记。

可以做什么
  • 记录工作活动:把编码会话、文件编辑和任务写入用户的 Cairn 账户。
  • 跟踪任务与笔记:记录从待办到完成的任务状态变化以及项目笔记。
  • 回顾历史:Cairn 网页应用把内容集中存放,并提供每日与每周汇总。
  • 该服务器向助手提供一组 cairn 工具;配套的 Claude Code 钩子会自动记录会话和文件编辑。
适用场景
适合希望自动留下 Claude Code 在项目上做了什么的记录,或希望助手把任务、笔记和会话摘要归档到个人工作追踪工具并生成每日、每周汇总的场景。
运行要求
通过 stdio 在本地运行,用 uvx 从 PyPI 安装(需要 PATH 中有 uv)。需要 Cairn 账户和 API 令牌,通过 CAIRN_TOKEN 提供或保存到 ~/.cairn_token,并需要访问 Cairn API 的网络;CAIRN_API_URL 可覆盖默认生产地址。
安装前请注意
需要账户 API 令牌,令牌存放在环境变量或磁盘上的令牌文件中。助手记录的内容会经 HTTPS 发送到 Cairn 服务并存入该账户,因此会话和文件编辑细节会离开本机。可选的钩子会在没有逐次确认的情况下自动记录会话和文件编辑。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Cairn,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Cairn

[PyPI] [MCP Registry] [License: MIT]

A work tracker that remembers what you did. It captures your coding sessions, the files you touch, tasks moving from pending to done, and project notes, then keeps them in one place with daily and weekly rollups. The name is the pile of stones that marks a trail.

Cairn runs as a multi-tenant web app on Vercel with a Neon Postgres database. Each account signs up, logs in, and only ever sees its own data.

How it's built

The whole server is the Python standard library plus one dependency (psycopg). No framework.

  • api/index.py — the Vercel serverless entrypoint. Vercel's Python runtime treats it as a catch-all, so every request lands here.
  • lib/handler.py — routing. The same BaseHTTPRequestHandler runs three ways: the Vercel function, the local dev server, and the tests.
  • lib/data.py — every SQL statement, each one scoped by user_id.
  • lib/db.py — Neon connection (pooled endpoint) plus small query helpers.
  • lib/auth.py — PBKDF2 password hashing, sessions, and token resolution.
  • lib/limits.py — signup/login rate limiting and per-account quota caps, both backed by Postgres.
  • lib/assets.py — the single-page app and favicon, embedded as base64 so they ship inside the function bundle. Generated by build_assets.py; re-run it after editing static/.

Local development

You need a Postgres to point at. A throwaway one in Docker works:

bash
docker run -d --name cairn_pg -e POSTGRES_PASSWORD=pw -e POSTGRES_DB=cairn -p 5432:5432 postgres:16-alpinepython3 -m venv .venv && .venv/bin/pip install 'psycopg[binary]'export DATABASE_URL="postgres://postgres:[email protected]:5432/cairn".venv/bin/python dev.py --init    # create the schema, then serve on :8765

Tests run against that same database:

bash
.venv/bin/python tests/smoke.py        # core CRUD + isolation.venv/bin/python tests/test_limits.py  # rate limiting + quotas.venv/bin/python tests/test_sp3.py     # file activity + filtered lists

Deployment

Pushing to main deploys to production through the Vercel GitHub integration. DATABASE_URL and the other Neon variables come from the Vercel ↔ Neon integration; the app reads the pooled connection string. Schema changes go on with initdb.py against the direct (unpooled) URL.

The agent side

The agent/ folder is the MCP server and two Claude Code hooks that run on your machine. They talk to this API over HTTPS using your account's token, so anything Claude Code does flows into your Cairn account. The server gives Claude a set of cairn tools; the hooks log sessions and file edits on their own.

On Claude Code the quickest install is the plugin — this repo doubles as a plugin marketplace (.claude-plugin/marketplace.json):

/plugin marketplace add https://github.com/cybort360/cairn/plugin install cairn@cairn

That wires up the MCP server and both hooks; you just save your token to ~/.cairn_token (it needs uv on your PATH). The manual route — clone, venv, claude mcp add — is in agent/README.md. The web app deploy ignores agent/; it's client-side only.

Design notes

Each sub-project that built Cairn has a spec under docs/superpowers/specs/: the cloud core, the auth hardening, and the local agent cutover. Read those if you want the reasoning behind a decision rather than just the code.

来源:README.md,提交 4982159

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Cairn 集成