Tighten draft protocol negotiation boundaries (#1692)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Tarek Mahmoud Sayed <tarekms@ntdev.microsoft.com>
This commit is contained in:
Stephen Halter 2026-07-12 14:30:49 -07:00 • committed by GitHub
commit fd38f51e27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -190,10 +190,10 @@ public partial class McpServerBuilderExtensionsToolsTests : ClientServerTestBase
{
// Under the 2026-07-28 protocol, list-changed notifications are delivered only over a
// subscriptions/listen stream (covered by SubscriptionsListenTests). This test pins the
// legacy revision to keep coverage of the session-wide broadcast that legacy clients still rely on.
// initialize-handshake revision to keep coverage of the session-wide broadcast that older clients still rely on.
await using McpClient client = await CreateMcpClientForServer(new McpClientOptions
{
ProtocolVersion = McpHttpHeaders.November2025ProtocolVersion,
ProtocolVersion = McpProtocolVersions.November2025ProtocolVersion,
});
var tools = await client.ListToolsAsync(cancellationToken: TestContext.Current.CancellationToken);
@ -239,7 +239,7 @@ public partial class McpServerBuilderExtensionsToolsTests : ClientServerTestBase
// subscriptions/listen stream. Pin the legacy revision to test the session-wide broadcast.
await using McpClient client = await CreateMcpClientForServer(new McpClientOptions
{
ProtocolVersion = McpHttpHeaders.November2025ProtocolVersion,
ProtocolVersion = McpProtocolVersions.November2025ProtocolVersion,
});
var serverOptions = ServiceProvider.GetRequiredService<IOptions<McpServerOptions>>().Value;