Skip to content

Conversation

@shijie-oai
Copy link
Collaborator

@shijie-oai shijie-oai commented Dec 8, 2025

Summary

  • Added mcpServer/oauthLogin in app server for supporting in session MCP server login
  • Added McpServerOauthLoginParams and McpServerOauthLoginResponse to support above method with response returning the auth URL for consumer to open browser or display accordingly.
  • Added McpServerOauthLoginCompletedNotification which the app server would emit on MCP server login success or failure (i.e. timeout).
  • Refactored rmcp-client oath_login to have the ability on starting a auth server which the codex_message_processor uses for in-session auth.

@shijie-oai shijie-oai changed the title feat: support mcp insession login feat: support mcp in-session login Dec 8, 2025
Comment on lines +1946 to +1952
let config = match self.load_latest_config().await {
Ok(config) => config,
Err(error) => {
self.outgoing.send_error(request_id, error).await;
return;
}
};
Copy link
Collaborator Author

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.

Comment on lines +1954 to +1962
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;
}
Copy link
Collaborator Author

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.

@shijie-oai shijie-oai force-pushed the shijie/app-server-mcp-oauth branch from a674f75 to d411040 Compare December 9, 2025 20:35
}
#[cfg(not(target_os = "windows"))]
_ => return Err(anyhow!("unable to determine callback address")),
pub async fn perform_oauth_login_return_url(
Copy link
Collaborator Author

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.

@shijie-oai shijie-oai marked this pull request as ready for review December 9, 2025 20:58
@shijie-oai shijie-oai force-pushed the shijie/app-server-mcp-oauth branch 2 times, most recently from e7b9175 to 02039bb Compare December 9, 2025 21:07
@shijie-oai
Copy link
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Breezy!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@shijie-oai shijie-oai force-pushed the shijie/app-server-mcp-oauth branch from 02039bb to bf53b8c Compare December 9, 2025 23:34
@shijie-oai shijie-oai force-pushed the shijie/app-server-mcp-oauth branch from bf53b8c to ac87608 Compare December 10, 2025 00:28
@shijie-oai shijie-oai merged commit 893f526 into main Dec 10, 2025
44 of 47 checks passed
@shijie-oai shijie-oai deleted the shijie/app-server-mcp-oauth branch December 10, 2025 01:43
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants