feat: add --callback-port flag to login command#170
Open
dsdshcym wants to merge 1 commit intoapify:mainfrom
Open
feat: add --callback-port flag to login command#170dsdshcym wants to merge 1 commit intoapify:mainfrom
dsdshcym wants to merge 1 commit intoapify:mainfrom
Conversation
Some OAuth providers (e.g., Slack MCP) register specific redirect URIs with fixed ports. The hardcoded port 8000 causes redirect_uri mismatch errors. This flag lets users specify the expected callback port. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
--callback-port <port>option tomcpc loginto specify the OAuth callback portredirect_urimismatch errors--callback-portis provided, it's used directly instead of auto-selecting from port 8000Motivation
Slack's MCP server (
mcp.slack.com/mcp) uses client ID1601185624273.8899143856786with a registered redirect URI on port 3118. Without this flag,mcpc loginalways starts the callback server on port 8000, which Slack rejects:With this fix:
mcpc login mcp.slack.com/mcp --client-id "1601185624273.8899143856786" --callback-port 3118Test plan
mcpc login --helpshows the new--callback-portoptionmcpc login <server> --client-id <id> --callback-port 3118uses port 3118 for the callback--callback-port, behavior is unchanged (auto-selects from 8000)🤖 Generated with Claude Code