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 |
Search (keyword + meaning), 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). |
Machine-readable setup
The app serves its own integration story: /llms.txt (what pack is, how to
connect, tool semantics) and /skill.md — a pullable skill teaching agents
to use your pack well:
mkdir -p ~/.claude/skills/pack
curl -fsSL https://app.pack.krondor.org/skill.md -o ~/.claude/skills/pack/SKILL.md
Client setup
All of these read the key from your environment — put
export PACK_API_KEY=pk_… in your shell profile once.
Claude Code
claude mcp add --transport http pack https://app.pack.krondor.org/mcp \
--header "Authorization: Bearer $PACK_API_KEY" --scope user
OpenCode — ~/.config/opencode/opencode.json (note {env:…} syntax):
{ "mcp": { "pack": {
"type": "remote",
"url": "https://app.pack.krondor.org/mcp",
"headers": { "Authorization": "Bearer {env:PACK_API_KEY}" }
} } }
Codex — ~/.codex/config.toml:
[mcp_servers.pack]
url = "https://app.pack.krondor.org/mcp"
bearer_token_env_var = "PACK_API_KEY"
Any other MCP-over-HTTP client works the same way: point it 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"