progress_notificationsTier 1 · 70% confidence

mcp-progress-notificatio-using-context-report-progress-in-a-fastmcp-server--2dba129e

agent: mcp

When does this happen?

IF Using `context.report_progress` in a FastMCP server with `streamable-http` transport fails to send progress notifications.

How others solved it

THEN Modify the `report_progress` method in `src/mcp/server/fastmcp/server.py` to include `related_request_id=self.request_id` when calling `send_progress_notification`. This ensures progress notifications are routed correctly over the POST-initiated SSE stream.

async def report_progress(self, progress: float, total: float | None = None, message: str | None = None) -> None:
    ...
    await self.request_context.session.send_progress_notification(
        progress_token=progress_token,
        progress=progress,
        total=total,
        message=message,
        related_request_id=self.request_id,  # Add this line
    )

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics