feat: change resetTimeoutOnProgress default to true#1393
Open
elango5292 wants to merge 1 commit intomodelcontextprotocol:mainfrom
Open
feat: change resetTimeoutOnProgress default to true#1393elango5292 wants to merge 1 commit intomodelcontextprotocol:mainfrom
elango5292 wants to merge 1 commit intomodelcontextprotocol:mainfrom
Conversation
|
@modelcontextprotocol/client
@modelcontextprotocol/server
@modelcontextprotocol/express
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
Long-running MCP tools that send progress notifications should keep connections alive by default. This changes the default behavior so clients automatically reset their timeout when receiving progress updates. Previously, clients would timeout after 60 seconds even if the server was actively sending progress notifications, unless they explicitly set resetTimeoutOnProgress: true.
390c144 to
52ef6fb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes the default value of
resetTimeoutOnProgressfromfalsetotrue.Motivation
Long-running MCP tools (like AI research tools) can take 60+ seconds to complete. Servers can send progress notifications to indicate they're still working, but clients currently ignore these by default and timeout after 60 seconds.
This change makes progress notifications actually useful by default - if a server sends progress updates, the client will reset its timeout automatically.
Changes
packages/core/src/shared/protocol.ts: Changed default fromfalsetotrueBackward Compatibility
Clients that explicitly set
resetTimeoutOnProgress: falsewill continue to work as before. This only affects clients that don't specify the option.Cross-SDK Consistency
I understand MCP has SDKs in multiple languages. If this change is accepted, should similar changes be made to other SDKs (Python, Java, etc.) for consistency? Happy to submit PRs to other SDKs if the team agrees this should be the default behavior across all implementations.