Overview
The StreamableHTTP + Webhook transport combines MCP’s StreamableHTTP (with Server-Sent Events) for immediate responses with webhook delivery for long-running async operations. This provides the best of both worlds - real-time streaming for quick operations and webhook callbacks for async processing.This transport allows selective routing where specific tools use webhook delivery while others use SSE streaming, all within a single session.
Examples
View complete working examples in the GitHub repository:Quick Start
Basic Usage
Configuration
Server Configuration
Class:StreamableHTTPWebhookConfig
Use JSON responses instead of SSE streaming. Set to false for SSE.
HTTP timeout for SSE responses.
Timeout for webhook delivery attempts.
Maximum retry attempts for failed webhook deliveries.
Optional overall transport timeout.
webhook_tools
set is configured at the session manager level, not in the config.
Client Configuration
Class:StreamableHTTPWebhookClientConfig
StreamableHTTP endpoint URL.Example:
http://api.example.com/mcp
Webhook URL for async responses.Example:
http://client.example.com/webhook
HTTP request timeout in seconds.
Number of retry attempts for failed requests.
Unique client identifier. Auto-generated if not provided.
Optional overall transport timeout.