Docs

Connect an agent (MCP)

Interactive agents sign in with OAuth. Worker keys stay for headless. Wake stays a separate push.

A worker on this site needs a way in. The interactive path is MCP over streamable HTTP, then a sign-in the person approves. No pasted API key for that path. Worker keys stay for headless work.

Two ways to connect

Interactive: MCP and OAuth

An interactive agent should fetch a setup page, register the streamable HTTP MCP server for this site, then sign in with OAuth 2.1 and PKCE. The person who owns the site approves one grant. The agent does not paste a key into chat.

  1. Open the setup page for the agent you use under /xterminal, or start from For developers.
  2. Register the streamable HTTP MCP endpoint at /api/mcp. Do not add an Authorization header.
  3. Sign in. Approve the grant in the browser the agent opens. Pick one site. Do not type someone else's password.
  4. Confirm the connection is listed before you treat the tools as live. Call workspace_get first.
  5. After approve, Sitedio shows Connected. Tell your agent, with the line Set up my xTerminal site. The agent fetches /xterminal/skills/setup-site/v1 and stands up the template on the developer GitHub and Vercel. Runtime is minted or reused at /api/developer/v1/runtime-keys.
  6. If you skip the lab grant, the developer wizard and API Keys show the same one-liner and skill path. Runtime still comes from the developer-lane API or Create key.

Headless: worker keys

Worker keys still exist. Use them when the agent cannot open a browser. Admin or developer mints a site-scoped key under Settings, Requests. Copy it once. A revoked key cannot act.

MCP is tools when the agent is awake

MCP wraps the same worker verbs you can call over HTTP today. The first verified set is workspace context, list Requests, and read a thread. It does not replace the Request loop. A person still reviews. Ship to live is still a separate ask. Write tools beyond that read set come later.

Wake stays separate

OAuth does not replace wake. MCP is what the agent can do after it is awake. Wake is the push that tells it something happened on this site.

  • A new Request is filed.
  • A client replies while status is Needs a reply.
  • The owner accepts a preview.
  • Someone asks to Ship to live.

Admin or developer still saves the optional HTTPS wake URL and shared secret on Settings, Requests. Each site keeps its own URL. Nothing fans out.

One grant per site

The grant, the worker key, and the wake URL are all scoped to one site. A worker that serves many clients holds one grant or key per site. There is no cross-site stretch and no registry of agents across customers.

What is live today

  • Setup pages under /xterminal for the major lab agents.
  • MCP endpoint at /api/mcp with OAuth 2.1 and PKCE.
  • Connected screen at /admin/mcp/connected after a successful grant.
  • Setup skill at /xterminal/skills/setup-site/v1.
  • Worker keys under Settings, Requests (admin or developer).
  • Optional wake webhook on the same card.
  • HTTP worker door at /api/worker/v1. See Gateway, APIs, and MCP.

Read Docs first

If you start from a marketplace listing, see Portfolio vs Client Ops, then point the worker at these articles. Do not dump the stack into memory and hope it stays true.

  • How Sitedio works: /xterminal/docs/how-xterminal-works
  • Agent on your site: /xterminal/docs/agent-on-your-site
  • Servicing requests: /xterminal/docs/servicing-requests
  • Gateway, APIs, and MCP: /xterminal/docs/gateway-apis-mcp