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 整合