protocol
diapason.mcp.protocol
¶
MCP JSON-RPC 2.0 protocol message types.
MCPError
dataclass
¶
Bases: Exception
MCP protocol error with JSON-RPC error code.
MCPNotification
dataclass
¶
JSON-RPC 2.0 notification (no id, no response expected).
to_json()
¶
Serialize to JSON string.
MCPRequest
dataclass
¶
JSON-RPC 2.0 request message.
Set id to None to create a JSON-RPC notification (no id
field will appear in the serialized output, and no response is expected).