-
Notifications
You must be signed in to change notification settings - Fork 322
feat: add configurable OAuth redirect uri #3124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add chat.oauthRedirectPort setting to configure the OAuth callback server port. Replaces random port with configurable default of 7777.
Another commit incoming - need to rework this in the event of multiple remote MCPs, I see this
|
pub timeout: u64, | ||
pub scopes: &'a [String], | ||
pub headers: &'a HashMap<String, String>, | ||
pub oauth_config: &'a Option<crate::cli::chat::tools::custom_tool::OAuthConfig>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - import OAuthConfig
|
||
#[derive(Clone, Serialize, Deserialize, Debug, Eq, PartialEq, JsonSchema)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct OAuthConfig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming we want this to more or less match what you linked w/ gemini - https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md#oauth-configuration-properties
There's already a top-level oauth_scopes unfortunately which could've been included in here, but I think it does make sense to add any and all future OAuth related config items here going forward
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If i have some time this week, I can refactor oauth_scopes to be inside this config to consolidate this going forward
Thank you! |
Add support for custom redirect URI to support multiple remote MCP servers and requirement where an MCP server may require a hardcoded port. When not assigned in the mcp configuration, the current experience is preserved (randomly assigned port)
Issue #, if available: Request to be able to specify port/have dedicated port for
redirect_uri
since currently it was randomly assigned and this cannot be supported by the OAuth provider.Description of changes:
Adds ability to specify a default OAuth redirect uri, per mcp server (similar to Gemini CLI)
Example configuration
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.