python-sdk/examples/clients/sse-polling-client
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Marcelo Trylesinski 2713b53b12
Some checks failed
CI / checks (push) Has been cancelled
CI / all-green (push) Has been cancelled
Replace httpx and httpx-sse with httpx2 (#2972)
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
2026-07-14 17:05:08 +01:00
..
mcp_sse_polling_client Replace httpx and httpx-sse with httpx2 (#2972) 2026-07-14 17:05:08 +01:00
pyproject.toml chore: update author metadata to LF Projects (#1992) 2026-02-04 11:01:33 +00:00
README.md Add SSE polling support (SEP-1699) (#1654) 2025-12-02 11:44:49 +00:00

MCP SSE Polling Demo Client

Demonstrates client-side auto-reconnect for the SSE polling pattern (SEP-1699).

Features

  • Connects to SSE polling demo server
  • Automatically reconnects when server closes SSE stream
  • Resumes from Last-Event-ID to avoid missing messages
  • Respects server-provided retry interval

Usage

# First start the server:
uv run mcp-sse-polling-demo --port 3000

# Then run this client:
uv run mcp-sse-polling-client --url http://localhost:3000/mcp

# Custom options:
uv run mcp-sse-polling-client --url http://localhost:3000/mcp --items 20 --checkpoint-every 5

Options

  • --url: Server URL (default: http://localhost:3000/mcp)
  • --items: Number of items to process (default: 10)
  • --checkpoint-every: Checkpoint interval (default: 3)
  • --log-level: Logging level (default: DEBUG)