Resolves a pending MCP OAuth request with a host-provided token or cancellation. The pending request is emitted as mcp.oauth_required with the data necessary to authorize the request.\n\nArgs:\n params: Pending MCP OAuth request ID and host-provided token or cancellation response.\n\nReturns:\n
(self, params: MCPOauthHandlePendingRequest, *, timeout: float | None = None)
| 25977 | self._session_id = session_id |
| 25978 | |
| 25979 | async def handle_pending_request(self, params: MCPOauthHandlePendingRequest, *, timeout: float | None = None) -> MCPOauthHandlePendingResult: |
| 25980 | "Resolves a pending MCP OAuth request with a host-provided token or cancellation. The pending request is emitted as mcp.oauth_required with the data necessary to authorize the request.\n\nArgs:\n params: Pending MCP OAuth request ID and host-provided token or cancellation response.\n\nReturns:\n Indicates whether the pending MCP OAuth response was accepted." |
| 25981 | params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} |
| 25982 | params_dict["sessionId"] = self._session_id |
| 25983 | return MCPOauthHandlePendingResult.from_dict(await self._client.request("session.mcp.oauth.handlePendingRequest", params_dict, **_timeout_kwargs(timeout))) |
| 25984 | |
| 25985 | async def login(self, params: MCPOauthLoginRequest, *, timeout: float | None = None) -> MCPOauthLoginResult: |
| 25986 | "Starts OAuth authentication for a remote MCP server.\n\nArgs:\n params: Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, callback success-page copy, and static OAuth client selection.\n\nReturns:\n OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server." |
no test coverage detected