Skip to main content

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
boolean
default:"false"
Use JSON responses instead of SSE streaming. Set to false for SSE.
float
default:"30.0"
HTTP timeout for SSE responses.
float
default:"30.0"
Timeout for webhook delivery attempts.
int
default:"1"
Maximum retry attempts for failed webhook deliveries.
float
Optional overall transport timeout.
Note: The webhook_tools set is configured at the session manager level, not in the config.

Client Configuration

Class: StreamableHTTPWebhookClientConfig
string
default:"http://localhost:8000/mcp"
StreamableHTTP endpoint URL.Example: http://api.example.com/mcp
string
default:"http://localhost:8001/webhook"
Webhook URL for async responses.Example: http://client.example.com/webhook
float
default:"30.0"
HTTP request timeout in seconds.
int
default:"1"
Number of retry attempts for failed requests.
string
Unique client identifier. Auto-generated if not provided.
float
Optional overall transport timeout.