pypi cairn-mcpstdioMITupdated 2mo ago
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.
¿Qué puedes hacer con Cairn?
Cairn
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 sameBaseHTTPRequestHandlerruns three ways: the Vercel function, the local dev server, and the tests.lib/data.py— every SQL statement, each one scoped byuser_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 bybuild_assets.py; re-run it after editingstatic/.
Local development
You need a Postgres to point at. A throwaway one in Docker works:
docker run -d --name cairn_pg -e POSTGRES_PASSWORD=pw -e POSTGRES_DB=cairn -p 5432:5432 postgres:16-alpine
python3 -m venv .venv && .venv/bin/pip install 'psycopg[binary]'
export DATABASE_URL="postgres://postgres:pw@127.0.0.1:5432/cairn"
.venv/bin/python dev.py --init # create the schema, then serve on :8765
Tests run against that same database:
.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.
Instalación
Añade Cairn a tu cliente. Elige el que uses.
claude mcp add cairn-mcp -- uvx cairn-mcpcodex mcp add cairn-mcp -- uvx cairn-mcpamp mcp add cairn-mcp -- uvx cairn-mcp{
"mcpServers": {
"cairn-mcp": {
"command": "uvx",
"args": [
"cairn-mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"cairn-mcp": {
"command": "uvx",
"args": [
"cairn-mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"cairn-mcp","command":"uvx","args":["cairn-mcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"cairn-mcp": {
"command": "uvx",
"args": [
"cairn-mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"cairn-mcp": {
"command": "uvx",
"args": [
"cairn-mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"cairn-mcp": {
"command": "uvx",
"args": [
"cairn-mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"cairn-mcp": {
"type": "local",
"command": "uvx",
"args": [
"cairn-mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"cairn-mcp": {
"command": {
"path": "uvx",
"args": [
"cairn-mcp"
]
}
}
}
}Add to your Zed `settings.json`.
uvx cairn-mcpRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
Puntuación
39 / 100
Incompleta
- Documentación22/25
- Mantenimiento16/25
- Confianza13/20
- Capacidad0/15
- Instalación12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 70 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Historial de versiones
| Versiones | Publicada |
|---|---|
| 0.1.2Última | 21 jun 2026 |
| 0.1.1 | 21 jun 2026 |