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/spec/lifecycle.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,17 +48,19 @@ This sequence ensures that both parties are aware of each other's capabilities a
48
48
## Initialization
49
49
The initialization process **MUST** begin with the client sending an `initialize` request to the server. This request **MUST** include:
50
50
51
-
- The *protocol version* supported by the client as a numeric integer
51
+
- The *protocol version* supported by the client, as a string
52
52
- The client's capabilities
53
53
- Information about the client implementation
54
54
55
+
Protocol versions are represented as strings in the format `YYYY-MM-DD` (year–month–day, all zero-padded), and can be lexicographically compared—for example, `2024-10-07` is greater than `2024-10-06`.
@@ -98,7 +100,7 @@ The server **MUST** respond to the initialize request with an `InitializeResult`
98
100
{{<tab>}}
99
101
```typescript
100
102
export interface InitializeResult extends Result {
101
-
protocolVersion: number;
103
+
protocolVersion: string;
102
104
capabilities: ServerCapabilities;
103
105
serverInfo: Implementation;
104
106
}
@@ -110,7 +112,7 @@ The server **MUST** respond to the initialize request with an `InitializeResult`
110
112
"jsonrpc": "2.0",
111
113
"id": 1,
112
114
"result": {
113
-
"protocolVersion": 1,
115
+
"protocolVersion": "2024-10-07",
114
116
"capabilities": {
115
117
"experimental": {},
116
118
"logging": {},
@@ -130,7 +132,7 @@ The server **MUST** respond to the initialize request with an `InitializeResult`
130
132
{{</tab>}}
131
133
{{</tabs>}}
132
134
133
-
If the server cannot support the protocol version requested by the client, it **SHOULD** respond with an error.
135
+
The server may choose a different protocol version than the client has requested. In such cases, it is up to the client whether to proceed with the connection or abort.
Copy file name to clipboardExpand all lines: schema/schema.json
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -465,9 +465,8 @@
465
465
"$ref": "#/definitions/Implementation"
466
466
},
467
467
"protocolVersion": {
468
-
"const": 1,
469
468
"description": "The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.",
470
-
"type": "integer"
469
+
"type": "string"
471
470
}
472
471
},
473
472
"required": [
@@ -496,9 +495,8 @@
496
495
"$ref": "#/definitions/ServerCapabilities"
497
496
},
498
497
"protocolVersion": {
499
-
"const": 1,
500
498
"description": "The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect.",
* The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
126
126
*/
127
-
protocolVersion: typeofPROTOCOL_VERSION;
127
+
protocolVersion: string;
128
128
capabilities: ClientCapabilities;
129
129
clientInfo: Implementation;
130
130
};
@@ -137,7 +137,7 @@ export interface InitializeResult extends Result {
137
137
/**
138
138
* The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect.
0 commit comments