Default draft protocol support: sessionless + handshake-less (SEP-2575 + SEP-2567) (#1610)

This commit is contained in:
Stephen Halter 2026-06-23 21:24:22 -07:00 • committed by GitHub
commit 6c323e783b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -490,6 +490,8 @@ public abstract class ResumabilityIntegrationTestsBase(ITestOutputHelper testOut
var serverBuilder = Builder.Services.AddMcpServer()
.WithHttpTransport(options =>
{
// Resumability is a stateful concern; pin Stateless = false now that the new default is true.
options.Stateless = false;
options.EventStreamStore = eventStreamStore;
configureTransport?.Invoke(options);
})
@ -515,7 +517,11 @@ public abstract class ResumabilityIntegrationTestsBase(ITestOutputHelper testOut
TransportMode = HttpTransportMode.StreamableHttp,
}, HttpClient, LoggerFactory);
return await McpClient.CreateAsync(transport, loggerFactory: LoggerFactory,
// Resumability (Last-Event-ID) and Mcp-Session-Id are removed in the draft revision
// (SEP-2567). Pin the client to the latest stable version so it negotiates the stateful,
// resumable legacy handshake instead of the sessionless draft default.
return await McpClient.CreateAsync(transport, new McpClientOptions { ProtocolVersion = "2025-11-25" },
loggerFactory: LoggerFactory,
cancellationToken: TestContext.Current.CancellationToken);
}