@@ -69,13 +69,11 @@ The server **MUST** provide a single HTTP endpoint path (hereafter referred to a
69
69
** MCP endpoint** ) that supports both POST and GET methods. For example, this could be a
70
70
URL like ` https://example.com/mcp ` .
71
71
72
- ### Message Exchange
72
+ ### Sending Messages to the Server
73
73
74
74
Every JSON-RPC message sent from the client ** MUST** be a new HTTP POST request to the
75
75
MCP endpoint.
76
76
77
- #### Sending Messages to the Server
78
-
79
77
1 . The client ** MUST** use HTTP POST to send JSON-RPC messages to the MCP endpoint.
80
78
2 . The client ** MUST** include an ` Accept ` header, listing both ` application/json ` and
81
79
` text/event-stream ` as supported content types.
@@ -98,7 +96,8 @@ MCP endpoint.
98
96
support both these cases.
99
97
6 . If the server initiates an SSE stream:
100
98
- 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 ) .
102
101
- The server ** MAY** send JSON-RPC _ requests_ and _ notifications_ before sending a
103
102
JSON-RPC _ response_ . These messages ** SHOULD** relate to the originating client
104
103
_ request_ . These _ requests_ and _ notifications_ ** MAY** be
@@ -115,7 +114,7 @@ MCP endpoint.
115
114
- To avoid message loss due to disconnection, the server ** MAY** make the stream
116
115
[ resumable] ( #resumability-and-redelivery ) .
117
116
118
- #### Listening for Messages from the Server
117
+ ### Listening for Messages from the Server
119
118
120
119
1 . The client ** MAY** issue an HTTP GET to the MCP endpoint. This can be used to open an
121
120
SSE stream, allowing the server to communicate to the client, without the client first
0 commit comments