# SingleBrain Gateway > One connection that lets your assistant read the person's own marketing and sales accounts (Google Analytics, Search Console, HubSpot, Slack and more), with a receipt for every call. These are setup instructions for you, the agent. Follow them in order. ## 1. Know which kind of agent you are Decide this first. It changes everything below. - **A hosted assistant** (claude.ai, ChatGPT, Claude desktop). You install nothing and run nothing. Go to step 2 and tell the person how to add SingleBrain as a connector. They sign in on a SingleBrain page that opens, so no key is ever copied. - **A local coding agent** (Claude Code, Codex, Cursor, VS Code). Go to "Agent-led setup" below and set yourself up. The person only signs in and picks a code; no signup link, no paste. - **A sandboxed agent that cannot reach the internet**, or cannot reach https://gateway.singlebrain.com. Say so plainly, in one sentence, and stop. Do not guess at a workaround. ## 2. Connect SingleBrain (hosted assistants) The connector address is: https://gateway.singlebrain.com/mcp It carries no key. The first time the assistant uses it, a SingleBrain page opens where the person can sign in or create an account, pick their organization and choose Allow. Signing up costs nothing. **claude.ai and Claude desktop.** Tell the person to open https://claude.ai/customize/connectors (or Settings, Connectors in the desktop app), choose Add custom connector, paste the address above and choose Add, then choose Connect. Leave the advanced settings empty. **ChatGPT.** Tell the person to turn on Developer mode in ChatGPT settings (it needs a paid plan), then add a custom MCP server on https://chatgpt.com/plugins: name it SingleBrain, paste the address above as the Server URL, set Authentication to "OAuth", and add it. ## Agent-led setup (Claude Code, Codex, Cursor, VS Code) **Claude Code: sign in with OAuth first.** OAuth is on here, so Claude Code holds no key at all: run claude mcp add --transport http singlebrain "https://gateway.singlebrain.com/mcp" --scope user with no header, then tell the person to run /mcp in Claude Code, pick singlebrain, choose Authenticate and finish sign-in on the SingleBrain page that opens. If `claude mcp add-json` or `claude mcp add` fails because a server named singlebrain already exists, stop and ask the person whether to replace that server or add this one under another name, such as singlebrain-2. Never remove anything on your own, never run `claude mcp list`, and never print a server URL or key. Use the device flow below only if that sign-in cannot finish. Every other local coding agent (Codex, Cursor, VS Code), and Claude Code only if its OAuth sign-in cannot finish, sets itself up with the device flow below, without the person pasting anything. It uses the singlebrain CLI. In every command, is your own client id: claude-code, codex, cursor or vscode. The person signs in, or creates a free account, on the page the first command links to. Claude desktop, claude.ai and ChatGPT do not use this: they add the connector in step 2, which signs in over OAuth. 1. Run: npx -y singlebrain start --client It prints a link and a code, then exits. Show the person the link, and the code in large text: "Open this link and pick this code on the page." 2. Showing the link does not end your task. In this same turn, without waiting for the person to reply, run: npx -y singlebrain wait --client It waits while the person approves. If your shell tool has a timeout, give it at least 10 minutes: a code lives 10 minutes. If it is cut off before its last line, run it again. It writes the key into your own MCP config and nowhere else: the key never passes through you, a command line or this chat, and you never handle it. Its last line begins with one word: - `authorized`: the connection is set up. Go to step 3. - `denied` (the person picked a wrong code or said it was not them) or `expired` (ten minutes passed): say so in one sentence and offer to start again from step 1, which shows a new code. A cancelled session never comes back. - `failed`: tell the person what the line says, and stop. 3. Confirm the connection and start the first run in this same session with npx -y singlebrain call --client onboarding_next_step. It reads the key from your config and prints only the answer. The new config takes effect in a new session of your client, not this one: your own SingleBrain tools appear there, so do not say they are ready in this session. Claude Code in particular loads the singlebrain server only when a new Claude Code session starts. Until then, call any SingleBrain tool the same way, with its arguments as one JSON object: npx -y singlebrain call --client ''. 4. Follow the step it returns, as in "After setup" below. Send the person's answers with `submit_onboarding_answers` and each pick or finished run with `onboarding_next_step`, through npx -y singlebrain call --client . Never ask the person to paste a SingleBrain key, a password or any other secret into this chat. A key in a chat is a key in a transcript. The setup page shows them where the key goes, and it never needs to pass through you. If you are a local coding agent and the person hands you the setup command from that page, run it as given, then call `onboarding_next_step` and follow the step it returns. ## 3. After setup: the first run When the connection works, call `onboarding_next_step` and follow the step it returns, every time, until it reports a first useful result. It confirms the connection, asks the two setup questions, offers workflows that need no connection with their price, and says how to run the one the person picks and what to offer after it. A hosted assistant does this when the person comes back to this chat after adding the connector. Do not offer next steps of your own beside it, do not start a connection it has not offered, and do not say setup is complete before it does. Keep the mechanics out of what you tell the person. Mention them only if the person asks. ## Notes - SingleBrain reads the person's accounts. The exceptions are Slack, where the assistant replies in the workspace that installed it and can join a public channel to read it, and Instantly, where it can add leads and create draft campaigns after a preview but never activates a campaign. - The person sees every call and its result at https://gateway.singlebrain.com/activity. - Help: https://gateway.singlebrain.com/support ## What SingleBrain can reach One page per tool group: what to ask, whose account it uses, and the price. Read one only when the person asks what SingleBrain can do. - Analytics & Search Console: https://gateway.singlebrain.com/tools/google-analytics-and-search-console.md - Google Ads: https://gateway.singlebrain.com/tools/google-ads.md - Sheets, Docs & Calendar: https://gateway.singlebrain.com/tools/google-workspace.md - YouTube channel: https://gateway.singlebrain.com/tools/youtube.md - Slack: https://gateway.singlebrain.com/tools/slack.md - HubSpot CRM: https://gateway.singlebrain.com/tools/hubspot-crm.md - Asana: https://gateway.singlebrain.com/tools/asana.md - Coda: https://gateway.singlebrain.com/tools/coda.md - Gong calls: https://gateway.singlebrain.com/tools/gong.md - Instantly: https://gateway.singlebrain.com/tools/instantly.md - Stripe revenue: https://gateway.singlebrain.com/tools/stripe.md - SEO research: https://gateway.singlebrain.com/tools/seo-research.md - Text embeddings: https://gateway.singlebrain.com/tools/embeddings.md - B2B prospecting: https://gateway.singlebrain.com/tools/prospecting.md - Perplexity Sonar: https://gateway.singlebrain.com/tools/web-augmented-chat.md - Web search: https://gateway.singlebrain.com/tools/web-search.md - Social profile search: https://gateway.singlebrain.com/tools/apify-scrapers.md - Apify: https://gateway.singlebrain.com/tools/apify-actors.md - Email finder: https://gateway.singlebrain.com/tools/email-finder.md - Jev: https://gateway.singlebrain.com/tools/jev.md - Model Rail: https://gateway.singlebrain.com/tools/model-rail.md - Account: https://gateway.singlebrain.com/tools/always-available.md