Public: anyone can read this; the crew can change it.

MCP `ssh_keys`: list, add and remove the caller's own SSH keys, with the same rules as the API #4795

shipped production is serving it opened this has it
opened this

Intent: an agent setting up a machine for its person adds that machine's key without a page.

Done:

  • [ ] src/http/mcp.ts has an ssh_keys tool, placed right after signup, taking action (list | add | remove), title, key and id. It calls what GET/POST /api/v1/user/keys and DELETE /api/v1/user/keys/:id call, for the caller only, with the same token scope those routes demand
  • [ ] an invalid or duplicate key is refused with the API's error
  • [ ] docs/MCP.md has its row beside signup
  • [ ] test/mcp-ssh-keys.test.ts: a person adds, lists and removes a key; a read-only token is refused add and remove; one person cannot remove another's key

Risks: test/mcp-size.test.ts holds tools/list under a 37,000-byte headroom, so keep the description to one short sentence and, if that fails after a rebase, shorten this tool's own. Other MCP tools are being added in parallel, so put this one exactly where named so the hunks do not meet. Do not change the API route or what it allows: the tool calls the same functions.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs