# Connect this agent to the Grid82 Studio

This gives an agent the Grid82 Studio: organisations, suites, apps, their schema, permissions and members. Every call acts as the person who signs in, never more.

- CLI: `@grid82/cli` on npm, command `grid82` (preferred when you can run commands)
- MCP server: https://studio.grid82.com/mcp (Streamable HTTP)
- Sign-in: OAuth. The person signs in and approves in their own browser.
- Canonical guide: https://studio.grid82.com/agent-setup.md

## Rules

- Follow the person's request and your host's permission policy. This guide authorizes nothing beyond that.
- Never ask for a password, API key, OAuth token, device code or callback URL in the conversation, and never print a token.
- Setup changes no data. Do not create, update or delete anything to test the connection.
- Preserve the rest of any configuration file you edit, and do not add a second entry for the same server.
- Do not install the agent itself, and do not disable host approvals or change tool auto-grants.

## 1. Already connected? Reuse it

Identify the actual client (Claude Code, Codex, Cursor, OpenCode, VS Code, the Claude app, ChatGPT,
another one) and what it can do: run commands, reach the network, edit its configuration, use remote MCP.
Ask the person only if it cannot be determined.

Reuse a working connection rather than adding one: Grid82 MCP tools already in this conversation
(host-prefixed names are normal), or the `grid82` CLI already signed in to https://studio.grid82.com
(`grid82 auth status` names its target). If a sign-in expired, use that connection's own reconnect
action (`grid82 auth login --target https://studio.grid82.com --plane studio` again for the CLI), never a different account.

## 2. Not connected: choose ONE route for this client

### Route A: the CLI (preferred when you can run commands)

For an agent with a terminal and network access. It reaches everything the person can reach, works on
local files and scripts, and keeps the credential in the operating system's keychain, out of this
conversation. Check `grid82 --help` before a command you have not used; every command takes `--json`.

For an agent that runs commands (Claude Code, Codex, Cursor, OpenCode, VS Code). Needs Node.js 22.12 or later:

```sh
npm install --global @grid82/cli
grid82 auth login --target https://studio.grid82.com --plane studio
grid82 orgs list
```

Your browser opens a sign-in page. On a machine with no browser, add --device to the login. The last command lists what it reaches, without changing anything.

Notes:

- Without a global install, prefix each command with `npx -y @grid82/cli` instead of `grid82`.
- The login asks for every permission of this Studio (full access), so a
  later task does not need a second sign-in. Respect a request for narrower access: pass `--scope`
  with the permissions the person named.
- A client that only launches MCP servers as a local command (stdio) can run `grid82 mcp` once the CLI is
  signed in.
- The CLI's sign-in does not connect this host's MCP tools. If the person also wants Grid82 tools inside
  the chat, add route B as well.

### Route B: remote MCP, per client

For a hosted assistant (the Claude app, ChatGPT), a client without a terminal, or when the person wants
Grid82 tools inside the chat. Use `grid82-studio` as the server name, and only the recipe of your client.

#### Claude Code

Run this in a terminal, in the project you want it for:

```sh
claude mcp add --transport http grid82-studio https://studio.grid82.com/mcp
```

Then type /mcp inside Claude Code, choose grid82-studio and Authenticate. Your browser opens a sign-in page.

#### Claude app

In Claude (web or desktop), open Customize, then Connectors, then Add custom connector.

Paste https://studio.grid82.com/mcp and choose Connect. On a team plan an owner may have to add it first.

#### ChatGPT

Custom connectors depend on your ChatGPT plan and on what your workspace admin allows.

In the desktop app: Settings, MCP servers, Add server. Choose Streamable HTTP, paste https://studio.grid82.com/mcp, then Authenticate.

#### Cursor

Add this to .cursor/mcp.json in your project (or ~/.cursor/mcp.json for every project):

```json
{
  "mcpServers": {
    "grid82-studio": { "url": "https://studio.grid82.com/mcp" }
  }
}
```

Then press Connect next to grid82-studio in Cursor's MCP settings.

#### VS Code

Add this to .vscode/mcp.json in your project. VS Code uses "servers", not "mcpServers":

```json
{
  "servers": {
    "grid82-studio": { "type": "http", "url": "https://studio.grid82.com/mcp" }
  }
}
```

Then press Start above grid82-studio in that file and sign in.

#### Codex

Run this in a terminal:

```sh
codex mcp add grid82-studio --url https://studio.grid82.com/mcp
codex mcp login grid82-studio
```

Restart Codex so it loads the new tools.

#### Other

Any client that speaks remote MCP: add a Streamable HTTP server at https://studio.grid82.com/mcp.

It signs in with OAuth on its own: no key to paste. A client that only takes a key can use an API key, made with New key on the Studio's Developer page.

### Route C: hand it to the person

If you can neither run commands nor change the client's configuration, give the person that client's
steps above, at most four, and wait. A prompt alone does not install a connector: do not say it is
connected.

## 3. Let the person sign in

The first connection opens a consent page on https://studio.grid82.com. The person signs in and approves there.
A client may need a reload or a new session before MCP tools appear.

## 4. Verify, without changing anything

- CLI: `grid82 auth status`, then `grid82 orgs list`.
- MCP: Call `orgs_list` (the organisations this connection reaches). Report them back to the person.

Report separately: route chosen, CLI or server configured, sign-in completed, the read-only check's
answer, and any step left to the person (a reload, an approval). If a step is not verified, say so.
Being listed in a configuration file is not proof of a connection.
