Skip to content

Conversation

@WhammyLeaf
Copy link
Contributor

@WhammyLeaf WhammyLeaf commented Jan 9, 2026

Currently the callback URI for MCP authentication is dynamically generated. More specifically, the callback URI is dynamic because the port part of it is randomly chosen by the OS. This is not ideal as callback URIs are recommended to be static and many authorization servers do not support dynamic callback URIs.

This PR fixes that issue by exposing a new config option named mcp_oauth_callback_port. When it is set, the callback URI is constructed using this port rather than a random one chosen by the OS, thereby making callback URI static.

Related issue: #8827

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@WhammyLeaf
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@WhammyLeaf
Copy link
Contributor Author

@aibrahim-oai Perhaps you can have a look at this?

@etraut-openai
Copy link
Collaborator

@codex review

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@WhammyLeaf
Copy link
Contributor Author

@etraut-openai @gpeal I also tested this manually locally and it seems to work

Copy link
Collaborator

@gpeal gpeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just need to remove some stale env var comments

@gpeal gpeal enabled auto-merge (squash) January 12, 2026 16:22
@gpeal gpeal merged commit d556298 into openai:main Jan 12, 2026
26 of 32 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 12, 2026
@WhammyLeaf WhammyLeaf deleted the add-static-mcp-callback-uri-support branch January 16, 2026 14:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants