Support a static callback URI for MCP authentication
Resolved 💬 3 comments Opened Jan 7, 2026 by WhammyLeaf Closed Mar 29, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What feature would you like to see?
From what I can tell the callback URI expected by codex is dynamically generated when doing MCP authentication. Specifically the port part of the localhost is randomly assigned. That is a bit of a problem because many authorizations servers require a static redirect URI. would it be possible for you to support a static callback URI. Something similar to what librechat or cline have.
Additional information
Proposed solution is here: https://github.com/openai/codex/pull/8971
_No response_
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
The main issue is the port part. I think a good solution would be allowing users to define the port to be used via an env or via the config.toml file. That way the callback uri will become static.
This was recently added. It will be included in the next release.