-
Notifications
You must be signed in to change notification settings - Fork 749
mcp client times out after 60 seconds (ignoring timeout option) #245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@emsi I'm an MCP newbie, but the following seemed to extend the timeout for me:
|
Not with the test server that I provided. That's why I provided reproducible examples. Clearly both python and js/ts SDK diverge here. |
Any update on this issue? I’m also getting the same timeout issue. Tried passing the timeout value in |
I’m facing the same issue. Has anyone fixed it? It would be helpful if someone could share their solution. |
I am not doing any heavy task. Just the connect is giving me this error. And yea, I am using my client TypescriptSDK and server with PythonSDK over SSE. |
I am connected via SSE, and the server execution speed is <1, so the tool results are returned. However, the client still times out after waiting for 60 seconds. Moreover, I am connected locally without any proxy. Has anyone encountered any good solutions? {"code":-32001,"data":{"timeout":60000},"name":"McpError"} |
Same problem here with stdio server. Anybody has a solution or simply a clue? |
Describe the bug
The JS/TS client sdk has 60 seconds timeout that is not affected by server sending progress update.
On the same mcp server tool, the python client sdk works as expected but the js/ts sdk times out with:
I have created an mcp server that is doing some "heavy" task that takes more than 60 seconds, though this server sends progress updates every 5 seconds to keep the connection alive.
You can run the server like this:
uvx --quiet --refresh git+https://github.com/emsi/slow-mcp --transport sse
(requires uvx! https://docs.astral.sh/uv/getting-started/installation/)
I've created two clients. Python and Typescript:
https://github.com/emsi/slow-mcp/blob/master/src/client.py
https://github.com/emsi/slow-mcp/blob/master/src/client.mjs
When I run the tests with python client it works as expected:
The server just calls the following script that prints number of seconds lapsed:
However the Typescript/JS client times out after 60000 milliseconds!
To Reproduce
curl -LsSf https://astral.sh/uv/install.sh | sh
(my slow_mcp server requires it)npm install @modelcontextprotocol/sdk
:)node src/client.mjs
Expected behavior
The timeout should be longer. Some tasks might easily take more than few minutes and if the server is sending updates or pings the timeout should reset.
At the very least both python and js/ts sdk should have identical, longer, timeouts.
The text was updated successfully, but these errors were encountered: