WebSocket connector for MCP implementations API Documentation
from mcp_use.connectors.websocket import WebSocketConnector
method
urlstrrequired The WebSocket URL to connect to. headersdict[str, str] | Nonedefault:"None" Optional additional headers. authstr | dict[str, typing.Any] | httpx.Auth | Nonedefault:"None" Authentication method - can be:
def __init__(url: str, headers: dict[str, str] | None = None, auth: str | dict[str, typing.Any] | httpx.Auth | None = None):
Was this page helpful?