Skip to content

Commit 9cffe4f

Browse files
committed
Disconnection shouldn't be cancellation
1 parent ea699ca commit 9cffe4f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docs/specification/draft/basic/transports.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,13 @@ URL like `https://example.com/mcp`.
8787
_response_.
8888
- After the JSON-RPC _response_ has been sent, the server **MAY** close the SSE
8989
stream at any time.
90-
- The client **MAY** close the SSE stream at any time. The server **SHOULD**
91-
interpret this as the client cancelling the request, if it is still in-flight.
90+
- Disconnection **MAY** occur at any time (e.g., due to network conditions).
91+
Therefore:
92+
- Disconnection **SHOULD NOT** be interpreted as the client cancelling its
93+
request.
94+
- To cancel, the client **SHOULD** explicitly send an MCP `CancelledNotification`.
95+
- To avoid message loss due to disconnection, the server **MAY** make the stream
96+
[resumable](#resumability-and-redelivery).
9297

9398
3. When the client sends a JSON-RPC _notification_ or _response_ to the MCP endpoint via
9499
POST:
@@ -120,7 +125,7 @@ URL like `https://example.com/mcp`.
120125
1. The client **MAY** remain connected to multiple SSE streams simultaneously.
121126
2. The server **MUST** send each of its JSON-RPC messages on only one of the connected
122127
streams; that is, it **MUST NOT** broadcast the same message across multiple streams.
123-
- The risk of message loss can be mitigated by making the stream
128+
- The risk of message loss **MAY** be mitigated by making the stream
124129
[resumable](#resumability-and-redelivery).
125130

126131
### Resumability and Redelivery

0 commit comments

Comments
 (0)