> ## Documentation Index
> Fetch the complete documentation index at: https://docs.strata.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect ChatGPT to the AI Identity Gateway

Connect ChatGPT to the AI Identity Gateway so that ChatGPT can discover and invoke MCP tools with full identity, authentication, and authorization on every call.

When ChatGPT connects to the AI Identity Gateway as an MCP client, it goes through the standard OAuth discovery flow -- discovering the authorization server from the Gateway's protected resource metadata (RFC 9470), authenticating the user, and obtaining an access token. From there, ChatGPT can discover and invoke any MCP tools the Gateway exposes through [MCP Bridge](/guides/ai-identity/mcp-bridge) or [MCP Proxy](/guides/ai-identity/mcp-proxy) apps.

## How ChatGPT's Token Works

ChatGPT authenticates the user and sends a standard OAuth access token where the `sub` claim is the authenticated user. The token does **not** include delegation semantics -- there is no `act` claim or separate agent identity. From the token alone, the Gateway cannot distinguish "ChatGPT acting on behalf of the user" from "the user directly."

This has implications for how the Gateway evaluates and processes requests:

* **Inbound authorization policies** operate on the token as received. Since ChatGPT does not perform a token exchange before calling the Gateway, inbound OPA policies see only the claims in the access token -- user identity claims (`sub`, `email`, `groups`, etc.) and the `client_id` identifying the OAuth client. The `client_id` is a required claim in JWT access tokens per [RFC 9068](https://datatracker.ietf.org/doc/html/rfc9068#name-data-structure), so admins can write policies that target ChatGPT traffic by matching on it. When using CIMD, the `client_id` is a URL (e.g., `https://chatgpt.com/oauth/{id}/client.json`) rather than a simple string -- see the policy example in [Harden Tool Access](#harden-tool-access-with-inbound-authorization-policies).
* **Outbound token exchange** is where the Gateway adds delegation semantics. When the Gateway performs [RFC 8693](https://datatracker.ietf.org/doc/html/rfc8693) token exchange to call upstream APIs via MCP Bridge or MCP Proxy, it can mint delegation tokens with an `act` claim that includes the agent's client identity. This gives upstream services visibility into both the user and the agent that initiated the request.

<Note>
  ChatGPT uses [OAuth Client ID Metadata Documents
  (CIMD)](https://datatracker.ietf.org/doc/draft-ietf-oauth-client-id-metadata-document/)
  natively, presenting a verifiable HTTPS URL as its `client_id`. This is a
  meaningful improvement over agents that use self-asserted client identity
  strings -- the Auth Provider Orchestrator fetches and validates the metadata
  document, giving inbound policies a cryptographically grounded client
  identity to match on.
</Note>

## Prerequisites

* **A running AI Identity Gateway** -- Follow the [AI Identity overview](/guides/ai-identity/overview) to set up the Auth Provider Orchestrator and AI Identity Gateway Orchestrator with at least one MCP Bridge or MCP Proxy app configured.
* **OAuth authorization enabled on the MCP Provider** -- The Gateway's `mcpProvider.authorization.oauth` must be enabled so ChatGPT can authenticate. See the [AI Identity Gateway reference](/reference/modes/ai-identity-gateway) for configuration details.
* **ChatGPT Business or Enterprise/Edu account** -- Creating and publishing workspace apps requires a Business or Enterprise/Edu workspace. Owners and Admins can publish apps; individual members install them.

## Register ChatGPT as an OAuth Client

Configure the **Auth Provider Orchestrator** to accept ChatGPT using [Client ID Metadata Documents (CIMD)](/reference/orchestrator/experimental/client-id-metadata-documents). CIMD eliminates the need to pre-register a client ID, secret, redirect URLs, or scopes -- a single `oidcCimd` app with `allowedDomains: [chatgpt.com]` is all that is required. See the [CIMD reference](/reference/orchestrator/experimental/client-id-metadata-documents) for configuration steps and options.

## Connect ChatGPT to the Gateway

Once the Auth Provider Orchestrator is configured, a workspace Owner or Admin creates and publishes the ChatGPT app so that workspace members can install it. ChatGPT routes all MCP traffic through OpenAI's infrastructure, so the AI Identity Gateway and Auth Provider Orchestrator must both be accessible from the public internet.

<Warning>
  ChatGPT connects to the AI Identity Gateway through OpenAI's infrastructure.
  The Gateway and Auth Provider Orchestrator must both be publicly accessible --
  local or private network URLs (e.g., `localhost`, `127.0.0.1`, private DNS)
  will not work without tunneling.
</Warning>

**Admin setup:**

<Steps>
  <Step title="Open the Apps admin panel">
    Go to **[chatgpt.com/admin/apps](https://chatgpt.com/admin/apps)**. You must be a workspace Owner or Admin to access this page.
  </Step>

  <Step title="Create a new app">
    Click **+ Create**. The **New App** dialog opens.
  </Step>

  <Step title="Enter the app details and Gateway URL">
    Enter a **Name** and optional **Description** for the app. Under **Connection**, ensure **Server URL** is selected and enter the AI Identity Gateway's MCP endpoint:

    ```
    https://your-gateway.example.com/mcp
    ```
  </Step>

  <Step title="Configure OAuth with CIMD">
    Click **Advanced OAuth settings** to open the OAuth configuration panel. Ensure **Authentication** is set to **OAuth** and that the **Registration method** shows **Client Identifier Metadata Document (CIMD)**. ChatGPT selects both automatically based on what the Auth Provider supports.
  </Step>

  <Step title="Acknowledge the risk warning and create the app">
    Check the **I understand and want to continue** box, then click **Create**. ChatGPT saves the app as a draft.
  </Step>

  <Step title="Publish the app">
    In the **Drafts** tab, click **Publish** next to your app. Review and acknowledge each security risk section, check both confirmation boxes, and click **Publish** to confirm.

    The app moves to the **Enabled** tab with a **CUSTOM** label and becomes visible to all workspace members.
  </Step>
</Steps>

**Member setup:**

Each workspace member authenticates individually to ensure ChatGPT only accesses tools the member is authorized to use:

1. In ChatGPT, click **Plugins** in the left sidebar.
2. Click the workspace tab (your organization's name) to see apps published by your admin.
3. Find the AI Identity Gateway app and click **+** to install it.
4. Complete the OAuth flow -- authenticate with your identity provider when prompted.

Once connected, the Gateway's MCP tools are available in conversations.

## Verify the Connection

After connecting, verify that ChatGPT can discover and invoke tools from the AI Identity Gateway.

1. **Check tool discovery** -- Ask ChatGPT to list available tools. ChatGPT should display the MCP tools exposed by your MCP Bridge and MCP Proxy apps.
2. **Invoke a tool** -- Ask ChatGPT to call one of the discovered tools. The AI Identity Gateway authenticates the request, evaluates authorization policies, performs token exchange, and returns the result.
3. **Check the Orchestrator logs** -- The AI Identity Gateway Orchestrator logs show the complete request flow: agent authentication, OPA policy evaluation, token exchange, and upstream API call. Verify that all steps completed successfully.

<Note>
  If ChatGPT cannot discover tools or tool invocations fail, see the troubleshooting
  sections in the [Expose APIs to Agents](/guides/ai-identity/mcp-bridge#troubleshooting)
  and [Protect MCP Servers](/guides/ai-identity/mcp-proxy#troubleshooting) guides.
</Note>
