Expand description
JSON-RPC 2.0 response builders for HTTP transport
This module provides functions that always return JSON-RPC 2.0 conformant HTTP responses with proper headers and body content.
Functionsยง
- bad_
request_ response - Build HTTP response for bad request (400) with JSON-RPC parse error.
- jsonrpc_
error_ response - Build an HTTP response containing a JSON-RPC error object. Always returns a proper JSON-RPC 2.0 conformant response.
- jsonrpc_
notification_ response - Build an HTTP response for JSON-RPC notifications (202 Accepted per MCP 2025-06-18).
- jsonrpc_
response_ with_ session - Build a generic JSON-RPC response with session header support.
- jsonrpc_
success_ response - Build an HTTP response containing a successful JSON-RPC response.
- method_
not_ allowed_ response - Build HTTP response for method not allowed (405).
- not_
found_ response - Build HTTP response for not found (404).
- options_
response - Build HTTP response for OPTIONS preflight requests.
- sse_
response_ headers - Build HTTP response for SSE stream (proper headers for text/event-stream).