Skip to content

Conversation

@cs50victor
Copy link
Contributor

The typescript MCP SDK has a hardcoded DEFAULT_REQUEST_TIMEOUT_MSEC of 60 seconds. Without passing the timeout option to client.callTool(), the MCP_TIMEOUT environment variable was being ignored for tool execution, causing long-running tools (like browser automation) to fail with error -32001 (RequestTimeout) after 60 seconds regardless of the configured timeout.

This fix passes getTimeoutMs() to the SDK's callTool options, ensuring the user-configured MCP_TIMEOUT is respected.

The MCP SDK has a hardcoded DEFAULT_REQUEST_TIMEOUT_MSEC of 60 seconds.
Without passing the timeout option to client.callTool(), the MCP_TIMEOUT
environment variable was being ignored for tool execution, causing
long-running tools (like browser automation) to fail with error -32001
(RequestTimeout) after 60 seconds regardless of the configured timeout.

This fix passes getTimeoutMs() to the SDK's callTool options, ensuring
the user-configured MCP_TIMEOUT is respected.
Copy link
Owner

@philschmid philschmid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks

@philschmid philschmid merged commit a9d6ec0 into philschmid:main Jan 12, 2026
2 checks passed
@cs50victor cs50victor deleted the fix/mcp_tool_timeout branch January 12, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants