Skip to main content
New in version 2.3.5 Use this when you need to track progress of long-running operations. MCP servers can report progress during operations. The client receives these updates through a progress handler.

Progress Handler

Set a handler when creating the client:
The handler receives three parameters:

Handler Parameters

progress
float
Current progress value
total
float | None
Expected total value (may be None if unknown)
message
str | None
Optional status message

Per-Call Handler

Override the client-level handler for specific tool calls: