pub struct McpOauthLoginRequest {
pub callback_success_message: Option<String>,
pub client_id: Option<String>,
pub client_name: Option<String>,
pub client_secret: Option<String>,
pub force_reauth: Option<bool>,
pub grant_type: Option<McpOauthLoginGrantType>,
pub public_client: Option<bool>,
pub server_name: String,
}Expand description
Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, callback success-page copy, and static OAuth client selection.
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§callback_success_message: Option<String>Optional override for the body text shown on the OAuth loopback callback success page. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass surface-specific copy telling the user where to return.
client_id: Option<String>Optional OAuth client ID override for this login. When set, the runtime uses this pre-registered static client instead of dynamic client registration.
client_name: Option<String>Optional override for the OAuth client display name shown on the consent screen. Applies to newly registered dynamic clients only — existing registrations keep the name they were created with. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass their own surface-specific label so the consent screen matches the product the user sees.
client_secret: Option<String>Optional OAuth client secret override for this login. The runtime treats this as an ephemeral host-owned secret, uses it for this authentication attempt and does not persist it.
force_reauth: Option<bool>When true, clears any cached OAuth token for the server and runs a full new authorization. Use when the user explicitly wants to switch accounts or believes their session is stuck.
grant_type: Option<McpOauthLoginGrantType>Optional OAuth grant type override for this login. Defaults to the server configuration, or authorization_code when no grant type is specified.
public_client: Option<bool>Optional override indicating whether the static OAuth client is public. When false, the runtime treats it as confidential and uses the per-login clientSecret if provided, otherwise retrieving the client secret from the MCP OAuth secret store.
server_name: StringName of the remote MCP server to authenticate
Trait Implementations§
Source§impl Clone for McpOauthLoginRequest
impl Clone for McpOauthLoginRequest
Source§fn clone(&self) -> McpOauthLoginRequest
fn clone(&self) -> McpOauthLoginRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more