Skip to content

cayu.mcp definitions

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.

from cayu.mcp import DEFAULT_MCP_CLIENT_NAME
DEFAULT_MCP_CLIENT_NAME = 'cayu'

Release source · Runtime guarantees · Capability guides

from cayu.mcp import DEFAULT_MCP_CLIENT_VERSION
DEFAULT_MCP_CLIENT_VERSION = __version__

Release source · Runtime guarantees · Capability guides

from cayu.mcp import DEFAULT_MCP_CONTAINMENT_KILL_TIMEOUT_S
DEFAULT_MCP_CONTAINMENT_KILL_TIMEOUT_S = 2.0

Release source · Runtime guarantees · Capability guides

from cayu.mcp import DEFAULT_MCP_CONTAINMENT_STARTUP_TIMEOUT_S
DEFAULT_MCP_CONTAINMENT_STARTUP_TIMEOUT_S = 5.0

Release source · Runtime guarantees · Capability guides

from cayu.mcp import DEFAULT_MCP_CONTAINMENT_TERM_TIMEOUT_S
DEFAULT_MCP_CONTAINMENT_TERM_TIMEOUT_S = 2.0

Release source · Runtime guarantees · Capability guides

from cayu.mcp import DEFAULT_MCP_MAX_LIST_ITEMS
DEFAULT_MCP_MAX_LIST_ITEMS = 10000

Release source · Runtime guarantees · Capability guides

from cayu.mcp import DEFAULT_MCP_MAX_LIST_PAGES
DEFAULT_MCP_MAX_LIST_PAGES = 100

Release source · Runtime guarantees · Capability guides

from cayu.mcp import DEFAULT_MCP_MAX_MESSAGE_BYTES
DEFAULT_MCP_MAX_MESSAGE_BYTES = 16 * 1024 * 1024

Release source · Runtime guarantees · Capability guides

from cayu.mcp import DEFAULT_MCP_MAX_RESPONSE_BYTES
DEFAULT_MCP_MAX_RESPONSE_BYTES = 64 * 1024 * 1024

Release source · Runtime guarantees · Capability guides

from cayu.mcp import DEFAULT_MCP_REQUEST_TIMEOUT_S
DEFAULT_MCP_REQUEST_TIMEOUT_S = 30.0

Release source · Runtime guarantees · Capability guides

from cayu.mcp import MCP_MODERN_PROTOCOL_VERSION
MCP_MODERN_PROTOCOL_VERSION = '2026-07-28'

Release source · Runtime guarantees · Capability guides

from cayu.mcp import MCP_PROTOCOL_VERSION
MCP_PROTOCOL_VERSION = '2025-06-18'

Release source · Runtime guarantees · Capability guides

from cayu.mcp import McpCallDeadlineExceededError

Raised when an MCP exchange exceeds its absolute deadline.

Bases: TimeoutError.

This type’s implementation and inherited behavior are available in the linked release source.

Release source · Runtime guarantees · Capability guides

from cayu.mcp import McpIdleTimeoutError

Raised when an MCP transport stops making inbound progress.

Bases: TimeoutError.

This type’s implementation and inherited behavior are available in the linked release source.

Release source · Runtime guarantees · Capability guides

from cayu.mcp import McpMessageTooLargeError

Raised when one JSON-RPC message or SSE event exceeds its byte limit.

Bases: McpProtocolError.

This type’s implementation and inherited behavior are available in the linked release source.

Release source · Runtime guarantees · Capability guides

from cayu.mcp import McpPeerClosedError

Raised when the peer closes before completing the expected response.

Bases: McpProtocolError.

This type’s implementation and inherited behavior are available in the linked release source.

Release source · Runtime guarantees · Capability guides

from cayu.mcp import McpProtocolEra

MCP wire era selected once for one transport connection.

Bases: StrEnum.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
LEGACY class attribute 'legacy'
MODERN_2026_07_28 class attribute MCP_MODERN_PROTOCOL_VERSION

Release source · Runtime guarantees · Capability guides

from cayu.mcp import McpProtocolError

Raised when an MCP server violates the expected JSON-RPC contract.

Bases: RuntimeError.

This type’s implementation and inherited behavior are available in the linked release source.

Release source · Runtime guarantees · Capability guides

from cayu.mcp import McpResponseTooLargeError

Raised when an aggregate HTTP response exceeds its byte limit.

Bases: McpProtocolError.

This type’s implementation and inherited behavior are available in the linked release source.

Release source · Runtime guarantees · Capability guides

from cayu.mcp import McpTransportLimits

Allocation and timing bounds for one MCP transport exchange.

Bases: BaseModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
max_message_bytes int DEFAULT_MCP_MAX_MESSAGE_BYTES
max_response_bytes int DEFAULT_MCP_MAX_RESPONSE_BYTES
idle_timeout_s float 30.0
total_call_timeout_s float 30.0
McpTransportLimits.validate_byte_limit(value: object, info) -> int
McpTransportLimits.validate_timeout(value: object, info) -> float
McpTransportLimits.validate_response_limit() -> McpTransportLimits

Release source · Runtime guarantees · Capability guides

from cayu.mcp import StdioMcpProcessLifetime

Ownership policy for a local stdio MCP subprocess.

Bases: StrEnum.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
PARENT_DEATH_CONTAINMENT class attribute 'parent_death_containment'
GRACEFUL_CLEANUP class attribute 'graceful_cleanup'
PERSISTENT_DETACHED class attribute 'persistent_detached'

Release source · Runtime guarantees · Capability guides

from cayu.mcp import SUPPORTED_MCP_PROTOCOL_VERSIONS
SUPPORTED_MCP_PROTOCOL_VERSIONS = frozenset({*SUPPORTED_LEGACY_MCP_PROTOCOL_VERSIONS, MCP_MODERN_PROTOCOL_VERSION})

Release source · Runtime guarantees · Capability guides