Agents (MCP + CLI)

Pack exposes your corpus to external agents via the Model Context Protocol, and to your terminal via the pack CLI. Same operations, same auth.

Endpoint

POST /mcp — JSON-RPC 2.0, protocol 2025-06-18. Standard methods: initialize, tools/list, tools/call.

Auth

Mint an API key at Settings → API keys and send it as Authorization: Bearer <key>. From the CLI, pack auth login runs a device-authorization flow in the browser and saves a key for you.

Keys can carry a profile — a tag bundle stamped onto everything the key writes (see Tags).

Tools

Tool What it does
whoami The authenticated caller’s identity.
fs_ls List a directory’s children (paths, kinds, tags).
fs_cat Read a document.
fs_stat Metadata only — kind, size, tags + inherited tags, lock state.
fs_find_by_tags Find documents whose effective tags overlap yours.
fs_write Create or overwrite a document.
fs_edit Replace a unique substring in a document.
fs_rm Delete a document or folder.
fs_lock / fs_unlock Freeze a document against writes, edits, and deletion.
search_documents Semantic search, optionally tag-filtered (all/any).
list_tags List tag definitions.
get_tags A node’s own + inherited tags.
set_tags Replace a document or folder’s tag set (read with get_tags first to merge).

Claude Desktop / Cursor

Point any MCP-over-HTTP client at https://<your-pack>/mcp with the bearer key — no bridge needed.

The CLI

The CLI ships as a prebuilt pack binary per platform. Public downloads are coming soon. Once installed:

pack auth login          # device flow, saves an API key
pack auth whoami
pack fs ls /notes
pack fs cat /notes/hello.md
pack fs write /notes/idea.md "…markdown…"
pack tags list
pack search "async cancellation"