Skip to main content
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 or 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, 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.
  • Outbound token exchange is where the Gateway adds delegation semantics. When the Gateway performs RFC 8693 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.
ChatGPT uses OAuth Client ID Metadata Documents (CIMD) 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.

Prerequisites

  • A running AI Identity Gateway — Follow the 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 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). 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 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.
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.
Admin setup:
1

Open the Apps admin panel

Go to chatgpt.com/admin/apps. You must be a workspace Owner or Admin to access this page.
2

Create a new app

Click + Create. The New App dialog opens.
3

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:
4

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.
5

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.
6

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.
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.
If ChatGPT cannot discover tools or tool invocations fail, see the troubleshooting sections in the Expose APIs to Agents and Protect MCP Servers guides.