Demonstrates the SSE polling pattern with server-initiated stream close for long-running tasks (SEP-1699).
- Priming events (automatic with EventStore)
- Server-initiated stream close via
close_sse_stream()callback - Client auto-reconnect with Last-Event-ID
- Progress notifications during long-running tasks
- Configurable retry interval
# Start server on default port
uv run mcp-sse-polling-demo --port 3000
# Custom retry interval (milliseconds)
uv run mcp-sse-polling-demo --port 3000 --retry-interval 100Processes items with periodic checkpoints that trigger SSE stream closes:
items: Number of items to process (1-100, default: 10)checkpoint_every: Close stream after this many items (1-20, default: 3)
Use the companion mcp-sse-polling-client to test:
uv run mcp-sse-polling-client --url http://localhost:3000/mcp