Skip to content
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

Usability issue for long-running tasks #223

Closed
seuros opened this issue Mar 28, 2025 · 5 comments · Fixed by #271
Closed

Usability issue for long-running tasks #223

seuros opened this issue Mar 28, 2025 · 5 comments · Fixed by #271
Labels
bug Something isn't working

Comments

@seuros
Copy link
Contributor

seuros commented Mar 28, 2025

The MCP Inspector client's request timeout mechanism does not reset when a notifications/progress message is received for an ongoing request. This deviates from a suggested behavior in the MCP specification, potentially causing premature timeouts for long-running operations that provide progress updates.

Specification Reference:

The MCP specification document basic/lifecycle.md under the "Timeouts" section states:

Implementations MAY choose to reset the timeout clock when receiving a [progress notification] corresponding to the request, as this implies that work is actually happening. However, implementations SHOULD always enforce a maximum timeout, regardless of progress notifications, to limit the impact of a misbehaving client or server.

Current Behavior:

In client/src/lib/hooks/useConnection.ts, the makeRequest function initiates a setTimeout when a request is sent. This timeout is only cleared when the request promise resolves or rejects (within the finally block). Receiving a notifications/progress (handled separately via setNotificationHandler) does not interact with or reset this timeout timer.

Expected Behavior:

Following the suggestion in the specification, the client could reset the request timeout timer each time a relevant notifications/progress is received. This would allow long-running operations that provide regular progress updates to continue without timing out prematurely, as long as progress is being reported within the timeout window. A maximum overall timeout should still be considered.

@seuros seuros added the bug Something isn't working label Mar 28, 2025
@pulkitsharma07
Copy link
Contributor

I believe we need to implement support for https://spec.modelcontextprotocol.io/specification/2025-03-26/basic/utilities/progress/#progress-flow in the MCP inspector. I can take a shot at it.

@seuros
Copy link
Contributor Author

seuros commented Mar 28, 2025

Please do.

@0xTomDaniel
Copy link

I was also running into this issue last week. Another vote for this!

@pulkitsharma07
Copy link
Contributor

I am on it, should be able to open a fix today.

@pulkitsharma07
Copy link
Contributor

Done, Give this a shot #271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants