@@ -23,7 +23,7 @@ public class McpIntegrationTests(ITestOutputHelper testOutputHelper)
2323 : IntegrationTests ( testOutputHelper )
2424{
2525 [ Fact ]
26- public async Task McpEndpoint_ExposesSampleTool ( )
26+ public async Task McpEndpoint_Supports20260728ProtocolAndExposesTools ( )
2727 {
2828 using var httpClient = Factory . CreateClient ( ) ;
2929 var transport = new HttpClientTransport (
@@ -34,10 +34,18 @@ public async Task McpEndpoint_ExposesSampleTool()
3434 } ,
3535 httpClient ) ;
3636
37- await using var client = await McpClient . CreateAsync ( transport , cancellationToken : TestCancellationToken ) ;
37+ await using var client = await McpClient . CreateAsync (
38+ transport ,
39+ new McpClientOptions
40+ {
41+ ProtocolVersion = "2026-07-28"
42+ } ,
43+ cancellationToken : TestCancellationToken ) ;
3844
3945 var tools = await client . ListToolsAsync ( cancellationToken : TestCancellationToken ) ;
4046
47+ Assert . Equal ( "2026-07-28" , client . NegotiatedProtocolVersion ) ;
48+ Assert . Null ( client . SessionId ) ;
4149 Assert . Contains ( tools , tool => tool . Name == "get_server_info" ) ;
4250 Assert . Contains ( tools , tool => tool . Name == "get_environment" ) ;
4351 Assert . Contains ( tools , tool => tool . Name == "create_config" ) ;
@@ -61,7 +69,7 @@ public async Task McpEndpoint_ExposesSampleTool()
6169 }
6270
6371 [ Fact ]
64- public async Task McpEndpoint_CallsSampleTool ( )
72+ public async Task McpEndpoint_RemainsCompatibleWith20251125ProtocolAndCallsTool ( )
6573 {
6674 using var httpClient = Factory . CreateClient ( ) ;
6775 var transport = new HttpClientTransport (
@@ -72,7 +80,13 @@ public async Task McpEndpoint_CallsSampleTool()
7280 } ,
7381 httpClient ) ;
7482
75- await using var client = await McpClient . CreateAsync ( transport , cancellationToken : TestCancellationToken ) ;
83+ await using var client = await McpClient . CreateAsync (
84+ transport ,
85+ new McpClientOptions
86+ {
87+ ProtocolVersion = "2025-11-25"
88+ } ,
89+ cancellationToken : TestCancellationToken ) ;
7690
7791 var result = await client . CallToolAsync (
7892 "get_server_info" ,
@@ -81,6 +95,7 @@ public async Task McpEndpoint_CallsSampleTool()
8195 var version = GetRequiredService < IUpdateService > ( ) . CurrentVersion ;
8296 var text = Assert . IsType < TextContentBlock > ( Assert . Single ( result . Content ) ) . Text ;
8397
98+ Assert . Equal ( "2025-11-25" , client . NegotiatedProtocolVersion ) ;
8499 Assert . False ( result . IsError ?? false ) ;
85100 Assert . Contains ( "OpenBullet 2 server info" , text ) ;
86101 Assert . Contains ( version . ToString ( ) , text ) ;
0 commit comments