Reduce OAuth callback ports from 6 to 3 for better port allocation#220
Merged
Conversation
Drop the duplicate digit-permutation ports (13163, 31316, 16313) and keep only 13316, 31613, 16133 in the hosted CIMD's redirect_uris and the matching MCPC_OAUTH_CALLBACK_PORTS list. https://claude.ai/code/session_01MBkeTp3rJeBNYqycYLKcsq
Adds 4 unit tests that verify MCPC_OAUTH_CALLBACK_PORTS and the redirect_uris in client-metadata.json stay in sync: every port has a matching loopback URI, every URI maps back to a port, the lists have the same length, and ports are unique. https://claude.ai/code/session_01MBkeTp3rJeBNYqycYLKcsq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR reduces the number of OAuth callback ports used by the MCPC client from 6 to 3, improving port allocation efficiency while maintaining non-contiguous spacing to prevent a single process from claiming all available ports.
Changes
OAuth callback ports: Reduced from
[13316, 13163, 31316, 31613, 16133, 16313]to[13316, 31613, 16133]Client metadata: Updated
redirect_urisinclient-metadata.jsonto match the new port listDocumentation: Updated CHANGELOG.md to reflect the port reduction from 6 to 3
Implementation Details
The change simplifies the OAuth callback port configuration while maintaining the original design principle of using non-contiguous ports to minimize the likelihood of a single unrelated process claiming all available callback ports. This reduces resource overhead without compromising the robustness of the OAuth flow.
https://claude.ai/code/session_01MBkeTp3rJeBNYqycYLKcsq