# Connect ChatGPT

ChatGPT connects to a gateway as a custom connector that authenticates with OAuth. The person signs in with a gateway user in the browser. ChatGPT does not use API keys for a gateway.

## Before you begin

- A gateway that serves at least one API. See [Create a gateway](https://docs.faustine.ai/agent-gateway/create-a-gateway/).
- A gateway user in the environment you connect to. See [Create a gateway user](https://docs.faustine.ai/agent-gateway/gateway-users/).
- A ChatGPT account that can turn on developer mode. In a ChatGPT workspace, an admin has to allow it.

For ChatGPT's own screens, see [OpenAI's MCP documentation](https://platform.openai.com/docs/mcp).

## Copy the MCP URL

1. In the portal, go to [**Agent Gateway**](https://auth.faustine.ai/go?to=%2Fintegrations%2Fagent-gateway) and select your gateway.
2. Select the **Connect** tab.
3. In the **Endpoints** card, copy the **MCP URL**.

```text
https://gateway.faustine.ai/<workspace>/<gateway>/mcp
```

## Create the connector

1. In ChatGPT, go to **Settings** > **Connectors** > **Advanced** and turn on **Developer mode**.
2. In **Connectors**, select **Create**.
3. Enter a name for the connector, such as the name of your gateway.
4. Paste the MCP URL.
5. For the authentication, select **OAuth**.
6. Connect. ChatGPT opens the gateway's sign-in page.
7. Enter the username and password of the gateway user.

The gateway registers ChatGPT as a client on its own. There is no client ID or secret to create.

## Make the first call

In a chat, turn on the connector, then ask what it can do with the gateway or ask for something the API returns, such as a list of contacts.

In the portal, the request appears in the gateway's **Logs** tab, and the **ChatGPT** card in the **Connect** tab shows when the client was last seen.

When ChatGPT calls an operation that requires confirmation, a confirmation card appears in the chat and nothing runs until the person decides. ChatGPT does not allow a logo inside cards, so the card shows your name and accent color without your icon. See [Confirmation](https://docs.faustine.ai/agent-gateway/confirmation/).

## Next steps

- [Create a gateway user](https://docs.faustine.ai/agent-gateway/gateway-users/): give each person their own user and scope.
- [Set the look and feel of your gateway](https://docs.faustine.ai/agent-gateway/look-and-feel/): your name and color on the sign-in page and the card.
- [Connect clients](https://docs.faustine.ai/agent-gateway/connect-clients/): the other clients a gateway supports.
