# Set up in a chat app

Claude, ChatGPT and other OAuth MCP chat apps use the connector at `https://app.flaghand.com/mcp`, for **new and existing accounts**. **Don't ask whether the person has an account:** both use the same sign-in page.

The sign-in page creates the account free with Google or an email link or code, no card: sign up there, then click **Allow**. Existing owners sign in and click **Allow**. No separate site sign-up, no shell.

Never call `startSignup`, `POST /api/v1/signup` or the CLI from a chat app. A failed fetch or code-runner `CONNECT 403` is the chat app's own sandbox, not a Flaghand API response: use the connector. Never ask about network/environment settings or send the person to Claude Code or claude.ai/code.

## Claude

On web/desktop (Free, Pro or Max), open **Customize › Connectors › Add custom connector** (some layouts: **Add › Custom › Web**). Enter Flaghand and `https://app.flaghand.com/mcp`. If shown, click **Continue**, choose **Sign in now** and **Use Claude's published identity**, or **Register automatically**. Click **Add**, then **Connect** if asked, and sign in. In this chat, **+ › Connectors** turns on Flaghand; no new chat needed. Mobile works too.

## ChatGPT

Business, Enterprise or Edu web workspace: **Plugins › + › Add custom MCP server**. Name it Flaghand, enter `https://app.flaghand.com/mcp` under **Connection**, choose **OAuth**, accept the risk notice, then **Create as a plugin**, install and sign in. Use ChatGPT's published identity (CIMD) or dynamic client registration (DCR) if offered; no client ID or secret to create. Select it with **@**. Developer Mode is not required. If the plan can't add a custom MCP server (Pro is read/fetch only; Plus is unconfirmed), say so: the person can add the same URL in Claude (Free allows one custom connector). [Plan rules and other apps](https://app.flaghand.com/docs/agents.md#chat-apps-and-plans).

## After Allow

Call `getMe`, then `getSetup` for the platform. A connector token lacks `connections` scope and can't call `startConnection`: with no usable account, relay `next.tell_person`, the Settings link where the **owner connects it**, then read `getSetup` again. Draft, check ([previews in chat](https://app.flaghand.com/docs/agents.md#previews-inside-the-chat)), then call `createPost` or `requestApproval`. Unlisted operations: `getOperation`, then its named dispatcher.

**Files attached in the chat** can't reach a tool. Have the person add them at `https://app.flaghand.com/files?workspace=ws_…` and paste back **Copy for your agent** (one `med_` id per file), or read `listMedia`. [More on files](https://app.flaghand.com/docs/media-and-threads.md#where-a-file-can-come-from).

Give the person the returned `approval_url`. The card comes **later, at the first approval** or after the seven-day free start, not at sign-up. Relay any short `https://app.flaghand.com/pay#…` link verbatim with its whole `#` fragment, never Stripe's redirected URL. Only the owner approves, with a passkey. Agents never approve, schedule, post or send DMs.
