How to connect an MCP server to ChatGPT
ChatGPT on the web uses MCP servers through plugins, and it can only reach remote servers on a public HTTPS address (or through OpenAI's Secure MCP Tunnel). The ChatGPT desktop app can also run local servers, using the same settings as Codex.
Checked against the official docs on 2026-11-26. Apps change often; the sources are linked at the bottom.
Where the config file lives
| Desktop app, Codex CLI and IDE extension (shared) | ~/.codex/config.toml |
| ChatGPT on the web | No file. Servers are added in Plugins |
| Top-level key | [mcp_servers.<name>] (desktop app); none on the web |
Add a remote server (a URL)
- Open Plugins
In ChatGPT on the web, go to Plugins, select the + button, then Add custom MCP server. - Enter the server details
Give it a name and, optionally, a description. Under Connection, enter the server URL, including the/mcppath. Choose the sign-in type: OAuth, no authentication, or both. - Create and install
Review the risk warning, select I understand and want to continue, then Create as a plugin. Install the plugin, then type@in a conversation to pick it.
- ChatGPT supports SSE and streaming HTTP servers. Workspace permissions and security settings decide whether you can add custom servers.
- A server on
localhostwon't work from the web. Use a public HTTPS address or a Secure MCP Tunnel (details).
Add a local server (runs on your computer)
- ChatGPT desktop app
Open Settings, select MCP servers, then Add server. Enter a name, choose STDIO (a command) or Streamable HTTP (a URL), save, then select Restart. - Sign in where needed
Servers that need OAuth show Authenticate in the list. In the composer, type/mcpto see connected servers.
Tips
- Tool selection works better when you name the plugin and the tool in your request, for example: "Use the Acme CRM app's update_record tool…".
- The desktop app, Codex CLI and the Codex IDE extension share MCP settings, so a server added in one shows up in the others. See the Codex guide.
Common problems in ChatGPT
- Claude or ChatGPT can't connect to my localhost MCP server
- Remote MCP server says "Needs authentication" or 401 after it used to work
- Remote MCP server stopped working: old /sse endpoint retired