Initial Checks
Description
Spec states: Implementations SHOULD establish timeouts for all sent requests, to prevent hung connections and resource exhaustion.
The TypeScript SDK does have a default timeout of 60 seconds on requests, and the difference between Python & TypeScript is the crux of modelcontextprotocol/typescript-sdk#245 (which also suggests 60 seconds might not be long enough). Also related, TypeScript has a resetTimeoutOnProgress option (defaulting to falst), which would probably be useful if we do introduce a default to the Python SDK.
Example Code
Python & MCP Python SDK
Initial Checks
Description
Spec states:
Implementations SHOULD establish timeouts for all sent requests, to prevent hung connections and resource exhaustion.The TypeScript SDK does have a default timeout of 60 seconds on requests, and the difference between Python & TypeScript is the crux of modelcontextprotocol/typescript-sdk#245 (which also suggests 60 seconds might not be long enough). Also related, TypeScript has a
resetTimeoutOnProgressoption (defaulting to falst), which would probably be useful if we do introduce a default to the Python SDK.Example Code
Python & MCP Python SDK