everything: cancelled long-running operation delays stdio shutdown
Version
@modelcontextprotocol/server-everything 2026.8.31 Node.js 26.5.0 macOS arm64
Reproduction
- Start the Everything server over stdio.
- Call trigger-long-running-operation with duration 2 and steps 4.
- Cancel the request after 400 ms.
- Call echo on the same session.
- Close the client with a 400 ms cleanup limit.
Observed
The operation timed out at about 403 ms and echo succeeded on the same session. Client cleanup then exceeded 400 ms.
This reproduced three times. Normal stdio cleanup passed when no operation was cancelled. The equivalent Streamable HTTP test also cleaned up normally.
The long-running tool waits on timers and does not check request cancellation, so the handler can continue after the client cancels it.
Expected
The demonstration operation should stop after cancellation so stdio shutdown is not delayed by the original timer loop.
Report
The commands and test results are in anilloutombam/mcp-failure-lab#89: https://github.com/anilloutombam/mcp-failure-lab/pull/89
Triage: Priority Low (total 5)
- Severity 2: trigger-long-running-operation ignores request cancellation and keeps its timer loop running after the client cancels, so pending timers can delay stdio shutdown; the demo should stop on the request's abort signal.
- Urgency 2: wanted eventually
- Bonuses: +1
buglabel
Still present on v2 (checked by reading the current code).
Board: Servers V2 (#43), Status Incoming, awaiting maintainer review (no milestone yet). Part of the backlog triage in #4875.
Prior work, from the PR backlog triage (#4877). These outside pull requests addressed this issue against the pre-refactor code:
- #4847 by @Ewertonslv
They are being closed as part of the backlog triage in #4875, since the repository now takes issues rather than outside PRs and their diffs predate the v2 refactor. They stay readable and serve as prototypes for the fix here. Thank you to their authors.