Skip to content

Reduce OAuth callback ports from 6 to 3 for better port allocation#220

Merged
jancurn merged 2 commits into
mainfrom
claude/update-redirect-urls-HbbK6
May 8, 2026
Merged

Reduce OAuth callback ports from 6 to 3 for better port allocation#220
jancurn merged 2 commits into
mainfrom
claude/update-redirect-urls-HbbK6

Conversation

@jancurn

@jancurn jancurn commented May 8, 2026

Copy link
Copy Markdown
Member

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]

    • Removed ports: 13163, 31316, 16313
    • Maintains non-contiguous spacing to reduce collision risk with unrelated processes
  • Client metadata: Updated redirect_uris in client-metadata.json to match the new port list

    • Removed corresponding callback URIs for the eliminated ports
    • Keeps only the 3 active ports for OAuth redirects
  • Documentation: 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

claude added 2 commits May 8, 2026 10:14
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
@jancurn jancurn merged commit b6a5975 into main May 8, 2026
6 checks passed
@jancurn jancurn deleted the claude/update-redirect-urls-HbbK6 branch May 8, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants