yera.tools.mcp.oauth_browser

Browser presentation for MCP OAuth authorization.

Symbols

class BrowserOAuthDeviceInteraction — Open device verification and present its user instructions.
class BrowserOAuthInteraction — Open OAuth authorization and delegate callback capture.

BrowserOAuthDeviceInteraction

Open device verification and present its user instructions.

Methods

present_device_authorization — Open verification and display its instructions.

BrowserOAuthDeviceInteraction.present_device_authorization

present_device_authorization(
    request: OAuthDeviceAuthorizationRequest,
) → None

Open verification and display its instructions.

Parameters

request
type: OAuthDeviceAuthorizationRequest

Non-secret device-verification context.

BrowserOAuthInteraction

Open OAuth authorization and delegate callback capture.

Methods

present_authorization — Open the transient authorization URL.
await_callback — Wait for and return the captured OAuth callback.

BrowserOAuthInteraction.present_authorization

present_authorization(
    request: OAuthAuthorizationRequest,
) → None

Open the transient authorization URL.

Parameters

request
type: OAuthAuthorizationRequest

Authorization context prepared by the MCP SDK.

Raises

MCPAuthenticationError

If no browser accepts the URL.

BrowserOAuthInteraction.await_callback

await_callback() → OAuthAuthorizationResult

Wait for and return the captured OAuth callback.

Returns

type: OAuthAuthorizationResult

Authorization code, state, and optional issuer.