Update protocol version - #410
Conversation
* 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"
* Added types.test.ts - "should have correct latest protocol version" - "should have correct supported protocol versions"
* tidy types.test.ts
ihrpr
left a comment
There was a problem hiding this comment.
Thank you for working on this! Please can we have tests for version negotiations. Ideally we test:
- old protocol server, new client
- old protocol client, new server
It seems as if the bases are covered by the current crop of client and server tests. If you see a gap, I'm happy to close it. Server version-handling tests
Client version-handling tests
|
Those tests have loads of mocking, I think if we can just check manually if all works fine for both of the cases that would be great. |
* In src/client/index.test.ts added tests: - "should connect new client to old, supported server version" - should negotiate version when client is old, and newer server supports its version" - "should throw when client is old, and server doesn't support its version"
Fair enough. Added some straightforward mock-less tests. Have a look. |
* In src/client/index.test.ts added tests: - "should connect new client to old, supported server version" - should negotiate version when client is old, and newer server supports its version" - "should throw when client is old, and server doesn't support its version"




Motivation and Context
StreamableHttp is available in the current release of the SDK and people are finding that returning the newest protocol version from their servers can cause a failure to connect.
How Has This Been Tested?
Unit and integration tests pass. Lint has no errors.
Breaking Changes
Nope.
Types of changes
Checklist
Additional context