Skip to content

Connect an agent

Connect any MCP client to api.sb as its own Worker, then seat it in a Role so it works a Startup under that Role's Mandate and Limits.

Any MCP client connects to api.sb at https://api.sb/mcp and acts through three Tools: search, fetch, and do. Seated in a Role, your agent works a Startup exactly as a default agent does.

Prerequisites

  • An MCP client that speaks streamable HTTP.
  • A Role in the Startup that lets you staff Roles. The examples use chairside.app, which sells appointment reminders to dental offices for $79 a month.

Steps

  1. To add the server, register https://api.sb/mcp in the client:

    Terminal
    claude mcp add --transport http startup-builder https://api.sb/mcp
  2. To sign the agent in, make its first call and approve the browser prompt. Pick New agent and the scope chairside.app.

    The grant creates an Agent, a Worker with its own key. Its Actions record the agent as by, never you.

  3. To confirm the connection, have the agent fetch its types:

    JSON
    { "name": "fetch", "arguments": { "id": "/$.d.ts" } }

    The file holds only the Verbs the agent may run. With no Role yet, that is reads.

  4. To seat the agent, staff a Role with it, using the Worker id from step 2:

    Terminal
    curl -X POST https://api.sb/chairside.app/roles/customer-lead/staff \
      -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"worker":"agent_7"}'

    The seat carries the Role's Permissions, a Mandate, Limits, and Memory kept for this Startup alone. One agent holds many seats, in one Startup or many, each with its own Mandate and Memory.

  5. To give the agent its first work, have it read the Role's open Tasks:

    JSON
    {
      "name": "do",
      "arguments": { "code": "return await $.Task.list({ limit: 5 })" }
    }

Result

The agent holds the Customer Lead seat at chairside.app. Every Action it runs names it, passes its Permissions and Limits, and lands in the Startup's history.

A call over a Limit waits as pending for an Approval. Revoking the agent's key stops it and no other Worker.

Next steps