cayu.mcp.http
Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.
DEFAULT_HTTP_MCP_CONNECT_TIMEOUT_S
Section titled “DEFAULT_HTTP_MCP_CONNECT_TIMEOUT_S”from cayu.mcp import DEFAULT_HTTP_MCP_CONNECT_TIMEOUT_SDEFAULT_HTTP_MCP_CONNECT_TIMEOUT_S = 10.0Release source · Runtime guarantees · Capability guides
DEFAULT_HTTP_MCP_TIMEOUT_S
Section titled “DEFAULT_HTTP_MCP_TIMEOUT_S”from cayu.mcp import DEFAULT_HTTP_MCP_TIMEOUT_SDEFAULT_HTTP_MCP_TIMEOUT_S = 120.0Release source · Runtime guarantees · Capability guides
HttpMcpClient
Section titled “HttpMcpClient”from cayu.mcp import HttpMcpClientMCP client for remote servers over the Streamable HTTP transport.
Bases: McpClient.
connect (method)
Section titled “connect (method)”async HttpMcpClient.connect(server: McpServerSpec) -> McpSessioninit (method)
Section titled “init (method)”HttpMcpClient.__init__(*, timeout_s: float | None=None, transport_limits: McpTransportLimits | None=None, connect_timeout_s: float=DEFAULT_HTTP_MCP_CONNECT_TIMEOUT_S, proxy: str | None=None, verify: bool | str | None=None, client_name: str=DEFAULT_MCP_CLIENT_NAME, client_version: str=DEFAULT_MCP_CLIENT_VERSION, max_list_pages: int=DEFAULT_MCP_MAX_LIST_PAGES, max_list_items: int=DEFAULT_MCP_MAX_LIST_ITEMS, protocol_era: McpProtocolEra=McpProtocolEra.LEGACY, transport: httpx.AsyncBaseTransport | None=None, secret_resolver: SecretResolver | None=None) -> NoneRelease source · Runtime guarantees · Capability guides
HttpMcpSession
Section titled “HttpMcpSession”from cayu.mcp import HttpMcpSessionBases: McpSession.
secret_redactor (property)
Section titled “secret_redactor (property)”HttpMcpSession.secret_redactor() -> SecretRedactorRedactor for secrets injected into this session (empty if none).
A hostile or buggy MCP server can echo injected secrets back through tool content, structured output, stderr, or protocol errors, so the toolset scrubs results with this before they reach model-visible context.
initialize_result (property)
Section titled “initialize_result (property)”HttpMcpSession.initialize_result() -> McpInitializeResultlist_tools (method)
Section titled “list_tools (method)”async HttpMcpSession.list_tools() -> tuple[McpToolDefinition, ...]call_tool (method)
Section titled “call_tool (method)”async HttpMcpSession.call_tool(name: str, arguments: dict[str, Any]) -> McpToolResultlist_resources (method)
Section titled “list_resources (method)”async HttpMcpSession.list_resources() -> tuple[McpResourceDefinition, ...]read_resource (method)
Section titled “read_resource (method)”async HttpMcpSession.read_resource(uri: str) -> McpResourceResultclose (method)
Section titled “close (method)”async HttpMcpSession.close() -> Noneinit (method)
Section titled “init (method)”HttpMcpSession.__init__(*, server: McpServerSpec, http_client: httpx.AsyncClient, url: str, client_name: str, client_version: str, timeout_s: float | None=None, transport_limits: McpTransportLimits | None=None, max_list_pages: int=DEFAULT_MCP_MAX_LIST_PAGES, max_list_items: int=DEFAULT_MCP_MAX_LIST_ITEMS, protocol_era: McpProtocolEra=McpProtocolEra.LEGACY, secret_redactor: SecretRedactor | None=None) -> Noneinitialize (method)
Section titled “initialize (method)”async HttpMcpSession.initialize() -> NoneEstablish server metadata using the selected protocol era.