Skip to main content
New in version 2.3.5 MCP servers can report progress during long-running operations. The client can receive these updates through a progress handler.

Progress Handler

Set a progress handler when creating the client:

Handler Parameters

The progress handler receives three parameters:

Progress Handler Parameters

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

Per-Call Progress Handler

Override the progress handler for specific tool calls: