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

MCP `origins`: list the caller's connected origins and their repositories, and sync one, with the same rules as the API #4811

shipped production is serving it opened this has it
opened this

Intent: a person moving work onto the forge sees, from their harness, what is connected and which repositories wait to come over. This sits beside #4163's migrate.

Done:

  • [ ] src/http/mcp.ts has an origins tool, placed right after outsiders, taking action (list | repos | sync) and id. It calls what GET /api/v1/user/origins, GET /api/v1/user/origins/:id/repos and POST /api/v1/user/origins/:id/sync call, for the caller only
  • [ ] no answer or error carries an origin's token
  • [ ] docs/MCP.md has its row beside outsiders
  • [ ] test/mcp-origins.test.ts: a person with a faked origin lists it and its repositories and starts a sync (no network: fake the origin the way the API's origins tests do); another person cannot read it; an unknown id is not found

Risks: test/mcp-size.test.ts holds tools/list under a 37,000-byte headroom, so keep the description to one short sentence. 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 routes: the tool calls the same functions.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs