Add 2025-06-18 as supported version (#529)

This commit is contained in:
Stephen Toub 2025-06-20 12:03:28 -04:00 • committed by GitHub
commit 0e6184a4aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 5 deletions

View file

@ -6,7 +6,7 @@ namespace ModelContextProtocol.AspNetCore;
/// <summary>
/// Configuration options for <see cref="M:McpEndpointRouteBuilderExtensions.MapMcp"/>.
/// which implements the Streaming HTTP transport for the Model Context Protocol.
/// See the protocol specification for details on the Streamable HTTP transport. <see href="https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http"/>
/// See the protocol specification for details on the Streamable HTTP transport. <see href="https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http"/>
/// </summary>
public class HttpServerTransportOptions
{

View file

@ -15,7 +15,7 @@ public static class McpEndpointRouteBuilderExtensions
{
/// <summary>
/// Sets up endpoints for handling MCP Streamable HTTP transport.
/// See <see href="https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http">the 2025-03-26 protocol specification</see> for details about the Streamable HTTP transport.
/// See <see href="https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http">the 2025-06-18 protocol specification</see> for details about the Streamable HTTP transport.
/// Also maps legacy SSE endpoints for backward compatibility at the path "/sse" and "/message". <see href="https://modelcontextprotocol.io/specification/2024-11-05/basic/transports#http-with-sse">the 2024-11-05 protocol specification</see> for details about the HTTP with SSE transport.
/// </summary>
/// <param name="endpoints">The web application to attach MCP HTTP endpoints.</param>

View file

@ -39,7 +39,7 @@ public sealed class SseClientTransportOptions
/// Streamable HTTP transport and automatically fall back to SSE transport if the server doesn't support it.
/// </para>
/// <para>
/// <see href="https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http">Streamable HTTP transport specification</see>.
/// <see href="https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http">Streamable HTTP transport specification</see>.
/// <see href="https://modelcontextprotocol.io/specification/2024-11-05/basic/transports#http-with-sse">HTTP with SSE transport specification</see>.
/// </para>
/// </remarks>

View file

@ -29,12 +29,13 @@ internal sealed partial class McpSession : IDisposable
"mcp.server.operation.duration", "Measures the duration of inbound message processing.", longBuckets: false);
/// <summary>The latest version of the protocol supported by this implementation.</summary>
internal const string LatestProtocolVersion = "2025-03-26";
internal const string LatestProtocolVersion = "2025-06-18";
/// <summary>All protocol versions supported by this implementation.</summary>
internal static readonly string[] SupportedProtocolVersions =
[
"2024-11-05",
"2025-03-26",
LatestProtocolVersion,
];

View file

@ -171,7 +171,10 @@ public class MapMcpStreamableHttpTests(ITestOutputHelper outputHelper) : MapMcpT
await app.StartAsync(TestContext.Current.CancellationToken);
await using var mcpClient = await ConnectAsync();
await using var mcpClient = await ConnectAsync(clientOptions: new()
{
ProtocolVersion = "2025-03-26",
});
await mcpClient.ListToolsAsync(cancellationToken: TestContext.Current.CancellationToken);
// The header should be included in the GET request, the initialized notification, and the tools/list call.