Skip to content

Commit dcb96e8

Browse files
authored
Merge pull request modelcontextprotocol#416 from modelcontextprotocol/ihrpr/remove-batching
Remove batching requirement
2 parents bad2a42 + 521d7ff commit dcb96e8

File tree

2 files changed

+15
-25
lines changed

2 files changed

+15
-25
lines changed

docs/specification/draft/basic/transports.mdx

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ In the **stdio** transport:
2424
- The client launches the MCP server as a subprocess.
2525
- The server reads JSON-RPC messages from its standard input (`stdin`) and sends messages
2626
to its standard output (`stdout`).
27-
- Messages may be JSON-RPC requests, notifications, responses—or a JSON-RPC
28-
[batch](https://www.jsonrpc.org/specification#batch) containing one or more requests
29-
and/or notifications.
27+
- Messages are individual JSON-RPC requests, notifications, or responses.
3028
- Messages are delimited by newlines, and **MUST NOT** contain embedded newlines.
3129
- The server **MAY** write UTF-8 strings to its standard error (`stderr`) for logging
3230
purposes. Clients **MAY** capture, forward, or ignore this logging.
@@ -85,35 +83,27 @@ MCP endpoint.
8583
1. The client **MUST** use HTTP POST to send JSON-RPC messages to the MCP endpoint.
8684
2. The client **MUST** include an `Accept` header, listing both `application/json` and
8785
`text/event-stream` as supported content types.
88-
3. The body of the POST request **MUST** be one of the following:
89-
- A single JSON-RPC _request_, _notification_, or _response_
90-
- An array [batching](https://www.jsonrpc.org/specification#batch) one or more
91-
_requests and/or notifications_
92-
- An array [batching](https://www.jsonrpc.org/specification#batch) one or more
93-
_responses_
94-
4. If the input consists solely of (any number of) JSON-RPC _responses_ or
95-
_notifications_:
86+
3. The body of the POST request **MUST** be a single JSON-RPC _request_, _notification_, or _response_.
87+
4. If the input is a JSON-RPC _response_ or _notification_:
9688
- If the server accepts the input, the server **MUST** return HTTP status code 202
9789
Accepted with no body.
9890
- If the server cannot accept the input, it **MUST** return an HTTP error status code
9991
(e.g., 400 Bad Request). The HTTP response body **MAY** comprise a JSON-RPC _error
10092
response_ that has no `id`.
101-
5. If the input contains any number of JSON-RPC _requests_, the server **MUST** either
93+
5. If the input is a JSON-RPC _request_, the server **MUST** either
10294
return `Content-Type: text/event-stream`, to initiate an SSE stream, or
10395
`Content-Type: application/json`, to return one JSON object. The client **MUST**
10496
support both these cases.
10597
6. If the server initiates an SSE stream:
106-
- The SSE stream **SHOULD** eventually include one JSON-RPC _response_ per each
107-
JSON-RPC _request_ sent in the POST body. These _responses_ **MAY** be
108-
[batched](https://www.jsonrpc.org/specification#batch).
109-
- The server **MAY** send JSON-RPC _requests_ and _notifications_ before sending a
98+
- The SSE stream **SHOULD** eventually include JSON-RPC _response_ for the
99+
JSON-RPC _request_ sent in the POST body.
100+
- The server **MAY** send JSON-RPC _requests_ and _notifications_ before sending the
110101
JSON-RPC _response_. These messages **SHOULD** relate to the originating client
111-
_request_. These _requests_ and _notifications_ **MAY** be
112-
[batched](https://www.jsonrpc.org/specification#batch).
113-
- The server **SHOULD NOT** close the SSE stream before sending a JSON-RPC _response_
114-
per each received JSON-RPC _request_, unless the [session](#session-management)
102+
_request_.
103+
- The server **SHOULD NOT** close the SSE stream before sending the JSON-RPC _response_
104+
for the received JSON-RPC _request_, unless the [session](#session-management)
115105
expires.
116-
- After all JSON-RPC _responses_ have been sent, the server **SHOULD** close the SSE
106+
- After the JSON-RPC _response_ has been sent, the server **SHOULD** close the SSE
117107
stream.
118108
- Disconnection **MAY** occur at any time (e.g., due to network conditions).
119109
Therefore:
@@ -133,9 +123,7 @@ MCP endpoint.
133123
this HTTP GET, or else return HTTP 405 Method Not Allowed, indicating that the server
134124
does not offer an SSE stream at this endpoint.
135125
4. If the server initiates an SSE stream:
136-
- The server **MAY** send JSON-RPC _requests_ and _notifications_ on the stream. These
137-
_requests_ and _notifications_ **MAY** be
138-
[batched](https://www.jsonrpc.org/specification#batch).
126+
- The server **MAY** send JSON-RPC _requests_ and _notifications_ on the stream.
139127
- These messages **SHOULD** be unrelated to any concurrently-running JSON-RPC
140128
_request_ from the client.
141129
- The server **MUST NOT** send a JSON-RPC _response_ on the stream **unless**

docs/specification/draft/changelog.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ the previous revision, [2025-03-26](/specification/2025-03-26).
77

88
## Major changes
99

10-
1. TODO
10+
1. Removed support for JSON-RPC **[batching](https://www.jsonrpc.org/specification#batch)**
11+
(PR [#416](https://github.com/modelcontextprotocol/specification/pull/416))
12+
2. TODO
1113

1214
## Other schema changes
1315

0 commit comments

Comments
 (0)