Skip to content

Commit cc1f19a

Browse files
committed
Allow messages to contain other protocol versions
1 parent d5c3d81 commit cc1f19a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export const InitializeRequestSchema = RequestSchema.extend({
202202
/**
203203
* The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
204204
*/
205-
protocolVersion: z.literal(PROTOCOL_VERSION),
205+
protocolVersion: z.number().int(),
206206
capabilities: ClientCapabilitiesSchema,
207207
clientInfo: ImplementationSchema,
208208
}),
@@ -250,7 +250,7 @@ export const InitializeResultSchema = ResultSchema.extend({
250250
/**
251251
* 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.
252252
*/
253-
protocolVersion: z.literal(PROTOCOL_VERSION),
253+
protocolVersion: z.number().int(),
254254
capabilities: ServerCapabilitiesSchema,
255255
serverInfo: ImplementationSchema,
256256
});

0 commit comments

Comments
 (0)