Handle long-running MCP workYou can monitor progress, provide requested input, cancel, or resume work that finishes later. Recording and deterministic replay make the protocol lifecycle testable.pythonacademyacademy/topics/mcp-tasks-advancedwebsite/content-src/academy/course.mjsacademyHandle long-running MCP work
You can monitor progress, provide requested input, cancel, or resume work that finishes later. Recording and deterministic replay make the protocol lifecycle testable.
11 focused minutesNot started
Worked example
See the idea in context
task_id = client.call_tool("start_reindex", {"scope": "all"})["task"]["taskId"]
started.publish(
if not completed.wait(60):