-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat: support mcp in-session login #7751
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
| let config = match self.load_latest_config().await { | ||
| Ok(config) => config, | ||
| Err(error) => { | ||
| self.outgoing.send_error(request_id, error).await; | ||
| return; | ||
| } | ||
| }; |
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.
We need to grab the latest config so that it contains the information that we just wrote to disk. Not using the config API because of the lack of typing there.
| if !config.features.enabled(Feature::RmcpClient) { | ||
| let error = JSONRPCErrorError { | ||
| code: INVALID_REQUEST_ERROR_CODE, | ||
| message: "OAuth login is only supported when [features].rmcp_client is true in config.toml".to_string(), | ||
| data: None, | ||
| }; | ||
| self.outgoing.send_error(request_id, error).await; | ||
| return; | ||
| } |
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.
For now adding this check in before we remove the flag as a whole - we also do add features.rmcp_client to our config when a streamable server is added.
a674f75 to
d411040
Compare
| } | ||
| #[cfg(not(target_os = "windows"))] | ||
| _ => return Err(anyhow!("unable to determine callback address")), | ||
| pub async fn perform_oauth_login_return_url( |
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.
Used by the app server in session log log in flow which returns the URL for auth and keep the auth server on the side with a custom timeout if supplied.
e7b9175 to
02039bb
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
02039bb to
bf53b8c
Compare
bf53b8c to
ac87608
Compare
Summary
mcpServer/oauthLoginin app server for supporting in session MCP server loginMcpServerOauthLoginParamsandMcpServerOauthLoginResponseto support above method with response returning the auth URL for consumer to open browser or display accordingly.McpServerOauthLoginCompletedNotificationwhich the app server would emit on MCP server login success or failure (i.e. timeout).