OAuth callback server implementation API Documentation
from mcp_use.auth.oauth_callback import CallbackResponse
method
codestr | Nonedefault:"None" String value statestr | Nonedefault:"None" String value errorstr | Nonedefault:"None" String value error_descriptionstr | Nonedefault:"None" String value error_uristr | Nonedefault:"None" String value
def __init__(code: str | None = None, state: str | None = None, error: str | None = None, error_description: str | None = None, error_uri: str | None = None):
from mcp_use.auth.oauth_callback import OAuthCallbackServer
portintrequired Port to listen on.
def __init__(port: int):
def shutdown():
returnsstr
def start():
timeoutfloatdefault:"300" Timeout duration
returnsmcp_use.auth.oauth_callback.CallbackResponse
def wait_for_code(timeout: float = 300):
Was this page helpful?