MCP TS SDK: request times out after 60 seconds even with timeout option or progress updates
Using the TypeScript MCP SDK client on Node v23.10.0, a long-running tool call fails with
McpError: MCP error -32001: Request timed outafter 60000 ms, even though the server sends progress updates every 5 seconds and the Python SDK client handles the same server fine. Passing a timeout tocallToolorconnectdoes not seem to override the default. What actually works?Originally asked on GitHub: https://github.com/modelcontextprotocol/typescript-sdk/issues/245
6 answers
The issue is reported as closed, but no SDK-side fix is confirmed in this thread. Lacking other settings, the TypeScript SDK requests time out after 60 seconds and progress notifications do not reset that timer.
Options that appeared in the thread:
- Pass request options as the third argument to
callTool:
jsawait client.callTool( { name: "your_tool", arguments: {...} }, undefined, { timeout: 300000 }, );One commenter said this seemed to extend the timeout for them. The original reporter said it did not help on their provided test server, and another user said passing timeout in both
connectandcallTooldid not override the 60-second default.-
Set
resetTimeoutOnProgress: truein the request options. A commenter quoted SDK documentation saying that receiving a progress notification then resets the request timeout, and that the server should send regular progress updates for long operations. No maintainer confirmed this in the thread, and a later commenter reported still timing out even with a one-day timeout andresetTimeoutOnProgressset, suspecting the request options were not reaching the protocol layer. -
If more than one client connects, look at the server architecture. One commenter reproduced the timeout with two concurrent clients and found the root cause: their server created only one
McpServerinstance, and the last client connection stole it, so the other client's tool calls timed out. Creating oneMcpServerper client session/transport fixed it (SDK ^1.13.0, SSE transport viaSSEServerTransport).
General advice: make sure the server actually sends progress notifications, set
resetTimeoutOnProgresson the client, and do not share a singleMcpServerinstance across transports.Did this work for you?- Pass request options as the third argument to
What a GitHub user tried on GitHub (Didn't work)
Reporter ran a Node.js client against an SSE MCP server whose tool runs about 125 seconds while sending progress every 5 seconds. The request failed at 60000 ms with McpError -32001, while the equivalent Python client succeeded.
Source: https://github.com/modelcontextprotocol/typescript-sdk/issues/245 (opens external site)
Did this work for you?What @jrubins tried on GitHub (Partly worked)
A commenter passed
{ timeout: 300000 }as the third argument toclient.callTool. It seemed to extend the timeout for them, but the original reporter said it did not help with the provided test server.Did this work for you?What @AbhishekkGautam tried on GitHub (Didn't work)
Another user tried passing the timeout value in both
connectandcallTool, but it did not override the default 60-second timeout.Did this work for you?What @mikestaub tried on GitHub (Outcome unclear)
A commenter suggested setting
resetTimeoutOnProgress: truein the request options so that receiving a progress notification resets the request timeout. The reporter of this suggestion gave no confirmation from a maintainer, and later reports were mixed.Did this work for you?What @ljdean1 tried on GitHub (Worked)
A commenter with two concurrent clients traced the timeout to a single shared
McpServerinstance being taken over by the last client connection. Creating oneMcpServerper client session/transport, using SDK ^1.13.0 and SSEServerTransport, resolved it for them.Did this work for you?
Related questions
- MCP TypeScript SDK StreamableHttp without sticky sessions in multi-replica deployments?
- MCP stdio server: SyntaxError Unexpected token in deserializeMessage when using console.log
- MCP typescript-sdk: tool inputSchema/outputSchema reject JSON Schema type 'array'?
- Use Zod union/intersection as MCP tool paramsSchema in typescript-sdk?
- MCP Inspector: "Invalid transport type: undefined" when connecting to an SSE server