# Connect Claude and ChatGPT

Let Claude, ChatGPT, Cursor or any MCP client build and control your overlays through the PX Studio MCP server.

PX Studio has a built-in MCP server. Connect it to your AI assistant and ask in plain words: "add a sub goal to my BRB scene", "make the Live scene the program scene", "send a test follow alert". The assistant uses your account with exactly the rights you grant.

| | |
| --- | --- |
| Server URL | `https://pxstudio.cloud/mcp` |
| Transport | Streamable HTTP (JSON answers, no sessions) |
| Sign-in | OAuth in the browser, or a personal token as a Bearer header |
| Tools | Every operation of the [API](/docs/api), limited by your scopes |

## Set up your client

Pick your app. Apps with a connector screen sign in through your browser; developer tools use a [personal token](/docs/api#personal-tokens).

::: tabs
@@ Claude
::: steps
In Claude, open **Settings** → **Connectors** and choose **Add custom connector**.

Enter the URL `https://pxstudio.cloud/mcp` and click **Connect**.

PX Studio opens. Sign in if needed, check the app, your account and the permissions, untick anything you do not want and click **Allow access**.
:::

@@ ChatGPT
::: steps
In ChatGPT, open **Settings** → **Apps & Connectors** → **Advanced** and turn on developer mode.

Create a connector with the MCP server URL `https://pxstudio.cloud/mcp` and OAuth as authentication.

Approve the access in PX Studio like above.
:::

@@ Claude Code
Create a personal token first (see [API](/docs/api#personal-tokens)), then add the server:

```bash
claude mcp add --transport http px-studio https://pxstudio.cloud/mcp --header "Authorization: Bearer pxp_YOUR_TOKEN"
```

@@ Cursor
Add the server to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project):

```json mcp.json
{
  "mcpServers": {
    "px-studio": {
      "url": "https://pxstudio.cloud/mcp",
      "headers": { "Authorization": "Bearer pxp_YOUR_TOKEN" }
    }
  }
}
```

@@ VS Code
Add the server to `.vscode/mcp.json` in your workspace:

```json mcp.json
{
  "servers": {
    "px-studio": {
      "type": "http",
      "url": "https://pxstudio.cloud/mcp",
      "headers": { "Authorization": "Bearer pxp_YOUR_TOKEN" }
    }
  }
}
```

@@ Other clients
Any client that speaks MCP over Streamable HTTP works:

- **URL:** `https://pxstudio.cloud/mcp`
- **Auth:** either OAuth (the client discovers it from the `401` answer, see [OAuth for apps](/docs/oauth)) or the header `Authorization: Bearer pxp_YOUR_TOKEN`.
- Only `POST` is used. The server keeps no session, so every request carries its token.
:::

> [!WARNING]
> A personal token in a config file is a password. Give it only the scopes the assistant needs, set an expiry and never commit the file to a public repository.

## What the assistant can do

- Read your overlays, scenes, layers, widgets and presets.
- Create overlays and scenes, add widgets, move and resize them, change their settings.
- Put a scene live, fire widget actions and send test alerts.
- Manage PXStudioBot commands, timers, giveaways and loyalty points.

The assistant only sees the tools your scopes allow. Each tool says whether it only reads, changes something or deletes something, so the assistant can act carefully.

## Your OK before risky steps

Every tool that deletes without undo (**DESTRUCTIVE**), shows something on air (**ON AIR**), posts publicly (**PUBLIC**), acts on viewers or chat modes (**MODERATION**) or calls an outside service (**EXTERNAL**) only runs after the assistant asked you. Technically, it needs `confirm: true`, which the assistant may only send after your explicit yes.

## Stay in control

- The assistant can never do more than your account. Each permission (scope) can be unticked when you connect.
- Your OBS link, billing, team and tokens are never reachable through the connector.
- Changes show up in the overlay **History** as "via" the app, so you always see who changed what.
- Disconnect an app any time under **Settings** → **API & AI apps**.

> [!TIP]
> AI assistants can make mistakes. Let them work on a preview scene and use **Push preview** once you like the result. See [Scenes](/docs/scenes).

## Troubleshooting

| Problem | Fix |
| --- | --- |
| `401 invalid_token` | The token expired or was revoked. Create a new one or reconnect the app. |
| `403 insufficient_scope` | The token lacks a permission. Reconnect and keep that scope ticked, or create a token with it. |
| A tool is missing | Tools you have no scope for are not listed. Check the scopes of your token or connection. |
| `429 rate_limited` | Too many calls in a short time. Wait for the time in `Retry-After`. |
