This guide is written by the team that builds Casdoor and describes the standards as published (listed under Sources), with notes on how Casdoor implements them as of October 21, 2026. Spotted a mistake? Tell us.
ChatGPT can use tools from any remote MCP (Model Context Protocol) server: your ticket system, your database, your internal APIs. You add the server once, sign in if it needs authentication, and then mention it in a conversation. This guide covers what the server needs, the steps in ChatGPT, and how OAuth sign-in works, based on OpenAI's documentation as of October 2026.
What the MCP server needs
- A public HTTPS URL, usually ending in
/mcp. ChatGPT connects from OpenAI's servers, solocalhostwon't work. During development, a tunnel such as ngrok gives your local server a public URL; for servers that must stay private, OpenAI offers Secure MCP Tunnel. - The streamable HTTP transport. Check the server with MCP Inspector, selecting Streamable HTTP, before adding it to ChatGPT.
- Authentication, if the tools touch user data: OAuth 2.1 following the MCP authorization specification. Servers without user data can run without authentication.
Add the server in ChatGPT
The names of the settings change over time; these follow OpenAI's current guide.
- Go to ChatGPT Plugins (
chatgpt.com/plugins), select the plus button, and then Add custom MCP server. - Enter a name and description.
- Under Connection, enter the server URL including
/mcp, or choose a Secure MCP Tunnel. - Configure authentication (OAuth, or none).
- Review the risk warning, select I understand and want to continue, and then Create as a plugin.
- Install the plugin. If it uses OAuth, ChatGPT opens the sign-in page of your authorization server.
- In a new conversation, type
@, select the plugin, and ask for something its tools can do.
Account and workspace policies decide who can add custom MCP servers. After you change the server's tools or metadata, refresh the connection from the plugin's page.
How OAuth sign-in works
When the server needs a signed-in user, ChatGPT acts as the OAuth client:
- It discovers the authorization server. The MCP server publishes protected resource metadata (RFC 9728) at
/.well-known/oauth-protected-resource, or points to it in aWWW-Authenticateheader on401responses. That document names the authorization server, whose own metadata (/.well-known/oauth-authorization-serveror/.well-known/openid-configuration) lists its endpoints. - It identifies itself as a client. ChatGPT prefers a client ID metadata document (CIMD): its
client_idis an HTTPS URL of a document it publishes, so there is no registration step. If the authorization server doesn't support CIMD but has aregistration_endpoint, ChatGPT uses dynamic client registration (DCR) once per connection. You can also create a client by hand. - It runs the authorization code flow with PKCE (S256), sending a
resourceparameter with the MCP server's URL. The authorization server should put that value in the token's audience, so the MCP server can check that the token was issued for it. - It calls the tools with the access token, and refreshes it with the refresh token.
The redirect URI. If the authorization server supports issuer identification (RFC 9207: it advertises authorization_response_iss_parameter_supported and returns iss in every authorization response), ChatGPT uses the stable https://chatgpt.com/connector_platform_oauth_redirect. Otherwise it uses a per-connection https://chatgpt.com/connector/oauth/{callback_id}. Copy the exact value from the server's page in ChatGPT into your client's allowed redirect URIs.
Common errors
- ChatGPT can't connect. Check that the URL is public HTTPS with a valid certificate and includes
/mcp, and that MCP Inspector can initialize the server. - Redirect URI mismatch. The client you created by hand doesn't allow ChatGPT's redirect URI; copy it from ChatGPT.
- Registration fails. The authorization server doesn't offer CIMD or DCR, or has them turned off.
- 401 on every tool call. The token's issuer or audience doesn't match what the MCP server expects. Return a
WWW-Authenticateheader so ChatGPT can sign in again. - ChatGPT asks for confirmation on every call. ChatGPT uses tool annotations such as
readOnlyHintanddestructiveHintto choose confirmation behavior; mark tools that only read data withreadOnlyHint: true.
An authorization server for your MCP servers
If your MCP server needs OAuth and you don't have an authorization server that supports these specifications, Casdoor is an open-source one: it publishes OAuth and OIDC discovery, accepts client ID metadata documents and dynamic client registration, supports PKCE, puts the resource in the token's audience (RFC 8707), returns iss with the authorization code, and issues tokens scoped to the tools a user approved. Casdoor also has its own MCP server for managing users and applications; see Connect ChatGPT to the Casdoor MCP server for a worked example.
Self-host it for free, or run it on Casdoor Cloud from $24/month billed yearly. See also OAuth for AI agents and MCP authorization servers.
FAQ
Do I need a paid ChatGPT plan? Whether you can add custom MCP servers depends on your account and, for business plans, your workspace's policies. Check the ChatGPT help for your plan.
Can I connect a local MCP server? Not directly, because ChatGPT connects from OpenAI's servers. Use a tunnel for development, or Secure MCP Tunnel for a private server.
Is "Developer mode" still needed? OpenAI's current guide adds custom MCP servers from ChatGPT Plugins. Older guides describe developer mode and connectors; the underlying requirements (HTTPS, streamable HTTP, OAuth) are the same.
What's the difference between CIMD and DCR? With DCR, the authorization server creates a new client for every connection. With CIMD, ChatGPT has one stable client identity, a URL, which is easier to manage and to allowlist.
Sources
- OpenAI: Connect to ChatGPT
- OpenAI: Authenticate users
- OpenAI: Build your MCP server
- MCP authorization specification
- RFC 9728: OAuth 2.0 Protected Resource Metadata
- RFC 9207: OAuth 2.0 Authorization Server Issuer Identification
- Casdoor docs: Connect ChatGPT
Product names are trademarks of their respective owners.