Skip to main content

mcp_get_handler

Function mcp_get_handler 

Source
pub async fn mcp_get_handler(
    __arg0: State<Arc<McpState>>,
    headers: HeaderMap,
) -> Response
Expand description

MCP Streamable HTTP GET handler.

Opens a Server-Sent Events stream for server-initiated messages. Clients use this to receive notifications and asynchronous responses from the MCP server. The stream starts with an endpoint event containing the session ID, then sends keepalive pings every 30 seconds.