You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/specification/draft/basic/_index.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ support exactly the features they need.
28
28
29
29
All messages between MCP clients and servers **MUST** follow the
30
30
[JSON-RPC 2.0](https://www.jsonrpc.org/specification) specification. The protocol defines
31
-
three types of messages:
31
+
these types of messages:
32
32
33
33
### Requests
34
34
@@ -70,14 +70,17 @@ Responses are sent in reply to requests, containing the result or error of the o
70
70
```
71
71
72
72
- Responses **MUST** include the same ID as the request they correspond to.
73
-
-**Responses** are further sub-categorized as either **successful results** or **errors**. Either a `result` or an `error`**MUST** be set. A response **MUST NOT** set both.
74
-
- Results **MAY** follow any JSON object structure, while errors **MUST** include an error code and
75
-
message at minimum.
73
+
-**Responses** are further sub-categorized as either **successful results** or
74
+
**errors**. Either a `result` or an `error`**MUST** be set. A response **MUST NOT**
75
+
set both.
76
+
- Results **MAY** follow any JSON object structure, while errors **MUST** include an
77
+
error code and message at minimum.
76
78
- Error codes **MUST** be integers.
77
79
78
80
### Notifications
79
81
80
-
Notifications are sent from the client to the server or vice versa, as a one-way message. The receiver **MUST NOT** send a response.
82
+
Notifications are sent from the client to the server or vice versa, as a one-way message.
83
+
The receiver **MUST NOT** send a response.
81
84
82
85
```typescript
83
86
{
@@ -91,6 +94,13 @@ Notifications are sent from the client to the server or vice versa, as a one-way
91
94
92
95
- Notifications **MUST NOT** include an ID.
93
96
97
+
### Batching
98
+
99
+
JSON-RPC also defines a means to
100
+
[batch multiple requests and notifications](https://www.jsonrpc.org/specification#batch),
101
+
by sending them in an array. MCP implementations **MAY** support sending JSON-RPC
102
+
batches, but **MUST** support receiving JSON-RPC batches.
103
+
94
104
## Auth
95
105
96
106
MCP provides an [Authorization]({{< ref "/specification/draft/basic/authorization" >}})
0 commit comments