Handle Long-Running MCP Tool Calls with the MCP Tasks Extension
A few weeks ago, I gave a talk on something that sounds simple but is actually fairly complex: how to handle long-running MCP tool calls. By default, MCP tool calls are synchronous - client requests, server accepts, client blocks until server responds. If you’re querying a database or making an API request, the client wait time isn’t very noticeable, because the tool call typically completes fast. However, there are some cases where this approach doesn’t work so well. Imagine a client calling a tool to prepare a report. The server needs to search for the data, extract and transform it, analyze it, summarize information and prepare conclusions, generate the final report in a standardized format, and return it to the client. This can take a while. Think about video conversion, audio transcription, browser automation, database migration, multi-step agent workflows - they all have the same problem. ...