Documentation Index
Fetch the complete documentation index at: https://docs.mcp-use.com/llms.txt
Use this file to discover all available pages before exploring further.
WebSocket connector for MCP implementations.
This module provides a connector for communicating with MCP implementations
through WebSocket connections.
WebSocketConnector
from mcp_use.client.connectors.websocket import WebSocketConnector
method init
Initialize a new WebSocket connector.Parameters
The WebSocket URL to connect to.
Optional additional headers.
auth
str | dict[str, typing.Any] | httpx.Auth | None
default:"None"
Authentication method - can be:
Signaturedef __init__(url: str, headers: dict[str, str] | None = None, auth: str | dict[str, typing.Any] | httpx.Auth | None = None):
method request
Send a raw request to the MCP implementation.Parameters
params
dict[str, typing.Any] | None
default:"None"
Dictionary of key-value pairs
Returns
Signaturedef request(method: str, params: dict[str, typing.Any] | None = None):