Skip to content

cayu.mcp.stdio

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_MCP_CANCELLATION_NOTIFICATION_TIMEOUT_S

Section titled “DEFAULT_MCP_CANCELLATION_NOTIFICATION_TIMEOUT_S”
from cayu.mcp import DEFAULT_MCP_CANCELLATION_NOTIFICATION_TIMEOUT_S
DEFAULT_MCP_CANCELLATION_NOTIFICATION_TIMEOUT_S = 1.0

Release source · Runtime guarantees · Capability guides

from cayu.mcp import DEFAULT_MCP_GRACEFUL_SHUTDOWN_TIMEOUT_S
DEFAULT_MCP_GRACEFUL_SHUTDOWN_TIMEOUT_S = 2.0

Release source · Runtime guarantees · Capability guides

from cayu.mcp import DEFAULT_MCP_WRITE_TIMEOUT_S
DEFAULT_MCP_WRITE_TIMEOUT_S = 5.0

Release source · Runtime guarantees · Capability guides

from cayu.mcp import StdioMcpClient

MCP client for local stdio servers.

Bases: McpClient.

async StdioMcpClient.connect(server: McpServerSpec) -> StdioMcpSession
StdioMcpClient.__init__(*, request_timeout_s: float | None=None, transport_limits: McpTransportLimits | None=None, write_timeout_s: float=DEFAULT_MCP_WRITE_TIMEOUT_S, graceful_shutdown_timeout_s: float=DEFAULT_MCP_GRACEFUL_SHUTDOWN_TIMEOUT_S, cancellation_notification_timeout_s: float=DEFAULT_MCP_CANCELLATION_NOTIFICATION_TIMEOUT_S, 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, inherit_env: bool=False, secret_resolver: SecretResolver | None=None, process_lifetime: StdioMcpProcessLifetime | str=StdioMcpProcessLifetime.PARENT_DEATH_CONTAINMENT, containment_startup_timeout_s: float=DEFAULT_MCP_CONTAINMENT_STARTUP_TIMEOUT_S, containment_term_timeout_s: float=DEFAULT_MCP_CONTAINMENT_TERM_TIMEOUT_S, containment_kill_timeout_s: float=DEFAULT_MCP_CONTAINMENT_KILL_TIMEOUT_S) -> None
StdioMcpClient.process_capability_evidence()

Release source · Runtime guarantees · Capability guides

from cayu.mcp import StdioMcpSession

Bases: McpSession.

StdioMcpSession.secret_redactor() -> SecretRedactor

Redactor 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.

StdioMcpSession.initialize_result() -> McpInitializeResult
async StdioMcpSession.list_tools() -> tuple[McpToolDefinition, ...]
async StdioMcpSession.call_tool(name: str, arguments: dict[str, Any]) -> McpToolResult
async StdioMcpSession.list_resources() -> tuple[McpResourceDefinition, ...]
async StdioMcpSession.read_resource(uri: str) -> McpResourceResult
async StdioMcpSession.close() -> None
StdioMcpSession.__init__(*, server: McpServerSpec, process: asyncio.subprocess.Process | ContainedStdioMcpProcess, request_timeout_s: float | None=None, transport_limits: McpTransportLimits | None=None, write_timeout_s: float, graceful_shutdown_timeout_s: float, cancellation_notification_timeout_s: float, client_name: str, client_version: str, 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) -> None
StdioMcpSession.protocol_era() -> McpProtocolEra

The wire era selected for this session, fixed for its lifetime.

StdioMcpSession.request_timeout_s(value: float) -> None
StdioMcpSession.process_capability_evidence()
async StdioMcpSession.initialize() -> None

Release source · Runtime guarantees · Capability guides