ChatGPT And Codex
ChatGPT Web Or Desktop Connector
ChatGPT connects from OpenAI infrastructure, so a local localhost URL is not reachable. For local desktop hosting, expose AIProfile with ngrok:
For a full visual walkthrough using npx, ChatGPT Developer Mode, and a synthetic company profile, see ChatGPT App With ngrok: npx and a Company Profile.
ngrok http 3000Configure config.yaml with the public URL and restart AIProfile:
auth:
mode: local
anonymous_enabled: true
issuer: https://abc123.ngrok-free.app
resource: https://abc123.ngrok-free.app/mcpCreate a grant:
npm run auth -- grant add \
--subject chatgpt-owner \
--preset owner-full \
--resource https://abc123.ngrok-free.app/mcpIn ChatGPT, add an MCP server or connector with:
https://abc123.ngrok-free.app/mcpChatGPT discovers OAuth metadata, registers itself, and opens the AIProfile authorization page. Enter the one-time approval code printed by the grant command.
Codex Terminal Or CLI
For terminal clients running on the same machine, use the local URL:
http://localhost:3000/mcpCreate a local grant:
npm run auth -- grant add --subject codex-cli --preset owner-fullWhen Codex opens the OAuth authorization page, enter the printed one-time approval code. If your Codex environment runs remotely, use the ngrok flow above instead of localhost.