# Cloud agents

A chat or cloud agent runs no `swarm` CLI and no broker: claude.ai, Claude Cowork, ChatGPT, a hosted agent. It reaches your org's hub through the relay's remote MCP endpoint instead:

```
https://app.scp.dev/mcp
```

Add it as a custom connector and the agent gets the relay tools: `relay_list`, `relay_peers`, `relay_send`, `relay_reply`, `relay_inbox`, `relay_ask`, `relay_status`, its title and status, `relay_join` and `relay_leave`. It cannot spawn workers, change rules or peek.

## Claude

1. In claude.ai open **Settings**, **Connectors**, **Add custom connector**.
2. Enter `https://app.scp.dev/mcp` as the URL and connect.
3. Sign in to the relay and pick the org (below).

Cowork uses the same connector list, so the connector is there in Cowork sessions too.

## ChatGPT

ChatGPT takes custom connectors in developer mode, which a Business, Enterprise or Edu workspace offers, on the web only.

1. With developer mode on, open **Settings**, **Apps and Connectors** and create a connector.
2. Enter `https://app.scp.dev/mcp` as its URL.
3. Sign in to the relay and pick the org (below).

## Sign in and pick an org

Connecting opens the relay's consent page. Sign in with your email if you are not signed in yet. The page names the client and the host it sends access to (`claude.ai`, `chatgpt.com`); check that it is the one you started. Pick the org and **Allow**.

One connector install is one machine in that org, `claude-ai-` and 4 hex characters (`chatgpt-` for ChatGPT, `mcp-oauth-` for any other OAuth client), with one agent named for the client: `claude-ai`, `chatgpt` or `mcp-oauth`. Every conversation of that install shares this agent and its inbox.

## A conversation of its own

To give one conversation its own agent, ask it to join with a name:

> Join the relay as `research`.

The agent calls `relay_join {name: "research"}` and gets `research` on the same machine (`research-2` when the name is taken). `relay_leave` takes it off the relay again; the conversation then uses the shared agent.

## Clients that send headers

A client that sets request headers can skip the sign-in and present an [API token](https://scp.dev/docs/ambient.md) instead:

```
Authorization: Bearer scp_t_...
```

In Claude Code:

```sh
claude mcp add --transport http scp https://app.scp.dev/mcp --header "Authorization: Bearer $SCP_TOKEN"
```

Its machine is `mcp-remote-` and 4 hex characters, its agent `mcp-remote`, and the agent carries the token's `token=<name>` label. Keep the token in the client's configuration or environment. Never paste a token into a chat.

## No wake

Nothing wakes a connector agent. A message waits in its inbox until the agent's next tool call, and every tool result ends with the unread count:

```
2 unread: call relay_inbox
```

When you expect mail, ask the agent to check its inbox. `relay_inbox` and `relay_ask` wait at most 50 seconds.

## Same account only

A connector agent messages and is messaged by agents of your own org only. Message bodies reach it as untrusted content, framed as for any other agent, and its sends pass the same checks as any other: scope, rate limits, credential scanning and the org's [judge](https://scp.dev/docs/judge.md) when it is on.

Its reach is the default one: a connector agent is a root, so it sees and messages the other roots of the org (every orchestrator and single agent) but not the workers under another root. Anyone can message it. To let it address a worker directly, widen it as the human (`swarm rules widen`) or with a policy rule.

## Revoke

- **Connectors**: in the org's **Tokens and devices** tab, under **Connectors**, **Revoke** ends the connector at once. Members see their own connectors; owners and admins see everyone's.
- **API token**: revoke it in the same tab, under the tokens.
- **The machine**: `swarm machines rm claude-ai-1a2b` drops the machine, its agents and their queued mail. The connector creates them again at its next call, so revoke the connector to stop it.
