Skip to content

Commit 1f71c93

Browse files
committed
Server must be able to reply in batch over SSE
1 parent 764bdb5 commit 1f71c93

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

docs/specification/draft/basic/transports.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,11 @@ The server **MUST** provide a single HTTP endpoint path (hereafter referred to a
6969
**MCP endpoint**) that supports both POST and GET methods. For example, this could be a
7070
URL like `https://example.com/mcp`.
7171

72-
### Message Exchange
72+
### Sending Messages to the Server
7373

7474
Every JSON-RPC message sent from the client **MUST** be a new HTTP POST request to the
7575
MCP endpoint.
7676

77-
#### Sending Messages to the Server
78-
7977
1. The client **MUST** use HTTP POST to send JSON-RPC messages to the MCP endpoint.
8078
2. The client **MUST** include an `Accept` header, listing both `application/json` and
8179
`text/event-stream` as supported content types.
@@ -98,7 +96,8 @@ MCP endpoint.
9896
support both these cases.
9997
6. If the server initiates an SSE stream:
10098
- The SSE stream **SHOULD** eventually include one JSON-RPC _response_ per each
101-
JSON-RPC _request_ sent in the POST body.
99+
JSON-RPC _request_ sent in the POST body. These _responses_ **MAY** be
100+
[batched](https://www.jsonrpc.org/specification#batch).
102101
- The server **MAY** send JSON-RPC _requests_ and _notifications_ before sending a
103102
JSON-RPC _response_. These messages **SHOULD** relate to the originating client
104103
_request_. These _requests_ and _notifications_ **MAY** be
@@ -115,7 +114,7 @@ MCP endpoint.
115114
- To avoid message loss due to disconnection, the server **MAY** make the stream
116115
[resumable](#resumability-and-redelivery).
117116

118-
#### Listening for Messages from the Server
117+
### Listening for Messages from the Server
119118

120119
1. The client **MAY** issue an HTTP GET to the MCP endpoint. This can be used to open an
121120
SSE stream, allowing the server to communicate to the client, without the client first

0 commit comments

Comments
 (0)