You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked that this question would not be more appropriate as an issue in a specific repository
I have searched existing discussions and documentation for answers
Question Category
Protocol Specification
SDK Usage
Server Implementation
General Implementation
Documentation
Other
Your Question
I am currently developing an MCP (Model Context Protocol) server using Python 3 and have encountered a challenge. The platform exclusively supports SSE (Server-Sent Events), and the execution of certain tools can be quite time-consuming. If I opt for synchronous execution, there's a risk of client timeouts due to the extended processing time. On the other hand, if I choose asynchronous execution by initially sending a "processing" status to the client, there's a possibility that the client session may terminate before the tool completes its task. This is particularly problematic in scenarios such as deploying services to Kubernetes or automating the purchase of cloud resources, where operations can be lengthy.
I am seeking advice on how to effectively manage these long-running tasks while ensuring that the client remains informed or can retrieve the results once the task is finished. Any insights or best practices for handling such situations would be greatly appreciated, as I plan to share this query with a technical community for further assistance.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Question Category
Your Question
I am currently developing an MCP (Model Context Protocol) server using Python 3 and have encountered a challenge. The platform exclusively supports SSE (Server-Sent Events), and the execution of certain tools can be quite time-consuming. If I opt for synchronous execution, there's a risk of client timeouts due to the extended processing time. On the other hand, if I choose asynchronous execution by initially sending a "processing" status to the client, there's a possibility that the client session may terminate before the tool completes its task. This is particularly problematic in scenarios such as deploying services to Kubernetes or automating the purchase of cloud resources, where operations can be lengthy.
I am seeking advice on how to effectively manage these long-running tasks while ensuring that the client remains informed or can retrieve the results once the task is finished. Any insights or best practices for handling such situations would be greatly appreciated, as I plan to share this query with a technical community for further assistance.
Beta Was this translation helpful? Give feedback.
All reactions