MCP supports optional progress tracking for long-running operations through notification messages. When a client wants progress updates for a request, it includes a progressToken in the request metadata, and the server may then send notifications/progress messages carrying the token, the current progress value, an optional total and an optional human-readable message. If you never ask for progress, the server may send nothing.
What you need
- A request that takes long enough to be worth tracking
- A client that can show progress notifications
- A note of what the total should be, if the server knows it
Step 1: Include a progress token in the request
Add a unique progressToken, a string or integer, in the request metadata. Tokens must be unique across all active requests, so the client can match each update to the right request.
Step 2: Read the progress values as they arrive
Check each notification carries the same token, and that the progress value increases with each notification, even when the total is unknown. The message field should say in plain words what is happening.
Step 3: Check progress stops when the work ends
Confirm no further progress notifications arrive after the final response. If updates keep coming after completion, the server is not following the protocol.
Worked example: synthetic progress check for a long task
The table below is a synthetic example. It shows the expected result of tracking progress; no task was run.
| Update | Progress | Total |
|---|---|---|
| Started | 0 | 100 |
| Halfway | 50 | 100 |
| Nearly done | 90 | 100 |
| Finished | 100 | 100 |
Expected result (UNTESTED). progress rises from 0 to 100 against a total of 100, and stops after the final response. This check was not run live; the table shows the expected result for the synthetic example.
Limits
- Progress notifications are optional: a server may choose to send none, even when a token was provided.
- A server may omit the total when it does not know it, and the progress value may be a floating point number.
- Progress notifications must only reference tokens from an active request.
- Both parties should rate-limit progress notifications to prevent flooding.
