Skip to content

Commit 3a9a6c9

Browse files
committed
Update protocol version
* This fixes #378 * In types.ts - set LATEST_PROTOCOL_VERSION to "2025-03-26" - add "2025-03-26" to SUPPORTED_PROTOCOL_VERSIONS * In auth.test.ts - in test "returns metadata when discovery succeeds" - expect "MCP-Protocol-Version" to be "2025-03-26"
1 parent 1317767 commit 3a9a6c9

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

src/client/auth.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe("OAuth Authorization", () => {
3939
const [url, options] = calls[0];
4040
expect(url.toString()).toBe("https://auth.example.com/.well-known/oauth-authorization-server");
4141
expect(options.headers).toEqual({
42-
"MCP-Protocol-Version": "2024-11-05"
42+
"MCP-Protocol-Version": "2025-03-26"
4343
});
4444
});
4545

@@ -478,4 +478,4 @@ describe("OAuth Authorization", () => {
478478
).rejects.toThrow("Dynamic client registration failed");
479479
});
480480
});
481-
});
481+
});

src/types.ts

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { z, ZodTypeAny } from "zod";
22

3-
export const LATEST_PROTOCOL_VERSION = "2024-11-05";
3+
export const LATEST_PROTOCOL_VERSION = "2025-03-26";
44
export const SUPPORTED_PROTOCOL_VERSIONS = [
55
LATEST_PROTOCOL_VERSION,
6+
"2024-11-05",
67
"2024-10-07",
78
];
89

@@ -754,11 +755,11 @@ export const PromptListChangedNotificationSchema = NotificationSchema.extend({
754755
/* Tools */
755756
/**
756757
* Additional properties describing a Tool to clients.
757-
*
758-
* NOTE: all properties in ToolAnnotations are **hints**.
759-
* They are not guaranteed to provide a faithful description of
758+
*
759+
* NOTE: all properties in ToolAnnotations are **hints**.
760+
* They are not guaranteed to provide a faithful description of
760761
* tool behavior (including descriptive properties like `title`).
761-
*
762+
*
762763
* Clients should never make tool use decisions based on ToolAnnotations
763764
* received from untrusted servers.
764765
*/
@@ -771,27 +772,27 @@ export const ToolAnnotationsSchema = z
771772

772773
/**
773774
* If true, the tool does not modify its environment.
774-
*
775+
*
775776
* Default: false
776777
*/
777778
readOnlyHint: z.optional(z.boolean()),
778779

779780
/**
780781
* If true, the tool may perform destructive updates to its environment.
781782
* If false, the tool performs only additive updates.
782-
*
783+
*
783784
* (This property is meaningful only when `readOnlyHint == false`)
784-
*
785+
*
785786
* Default: true
786787
*/
787788
destructiveHint: z.optional(z.boolean()),
788789

789790
/**
790-
* If true, calling the tool repeatedly with the same arguments
791+
* If true, calling the tool repeatedly with the same arguments
791792
* will have no additional effect on the its environment.
792-
*
793+
*
793794
* (This property is meaningful only when `readOnlyHint == false`)
794-
*
795+
*
795796
* Default: false
796797
*/
797798
idempotentHint: z.optional(z.boolean()),
@@ -801,7 +802,7 @@ export const ToolAnnotationsSchema = z
801802
* entities. If false, the tool's domain of interaction is closed.
802803
* For example, the world of a web search tool is open, whereas that
803804
* of a memory tool is not.
804-
*
805+
*
805806
* Default: true
806807
*/
807808
openWorldHint: z.optional(z.boolean()),

0 commit comments

Comments
 (0)