Checked against OpenAI’s documentation on 2026-11-02.
ChatGPT connects to remote MCP servers in developer mode (Settings → Apps → Advanced) using
OAuth 2.1 with dynamic client registration and PKCE. mcp-mail implements RFC 9207 issuer
identification, so ChatGPT uses its stable callback
https://chatgpt.com/connector_platform_oauth_redirect, which is in the default
ALLOWED_REDIRECT_URIS.
# .env
OAUTH=true
TOKEN_SECRET_FILE=/etc/mcp-mail/token-secret
CHATGPT_COMPAT=true # adds read-only `search` and `fetch` for deep research
mcp-mail clients add chatgpt --for chatgpt # read-only preset, OAuth login printed once
https://mail.example.com/mcp,
authentication OAuth. Sign in with the login from step 1.Notes:
search and fetch; mcp-mail’s
versions search Inbox and Sent of every account and return fenced message text.readOnlyHint, so ChatGPT runs them without asking; anything else needs your
confirmation in the conversation.