# Connect claude.ai or ChatGPT on the web (Cloudflare relay)

For AIs. The Swarm Control relay is an open-source Cloudflare Worker the person deploys to their own Cloudflare account. Swarm machines dial out to it, so nothing listens on them, and claude.ai (or ChatGPT) adds the relay's `/mcp` URL as a custom connector with sign-in.

Status: in the product (`packages/swarm-relay` in https://github.com/swarm-agent/swarm); a deployed relay has not yet been tested end to end with the current box. Prefer Tailscale (https://swarmagent.dev/ai/connect-tailscale.md) or, for ChatGPT, the tunnel (https://swarmagent.dev/ai/connect-chatgpt.md) until it is.

## Steps

1. Deploy the relay to the person's Cloudflare account: follow `packages/swarm-relay/README.md` (Worker, Durable Object, KV; `wrangler deploy`). For ChatGPT, add `chatgpt.com` to the relay's `ALLOWED_REDIRECT_HOSTS` (default: claude.ai, claude.com).
2. On the Swarm machine, as root: `swarmctl remote init --relay https://RELAY --name NAME --allow-write`, then `swarmctl remote enable`. Remote access is off until enabled.
3. In claude.ai (Settings, Connectors) or ChatGPT: add a custom connector with `https://RELAY/mcp`. Signing in shows a code; the person approves it on the Swarm machine: `swarmctl remote approve CODE`. Never approve from the web page.
4. Over the relay the job tools work (give, wait, read, deliver, schedule, media, status). Sign-in, keys and model administration are never offered over the relay; do those on the machine.
