Add 2025-06-18 as supported version (#529)
This commit is contained in:
parent
521bb7bde2
commit
0e6184a4aa
5 changed files with 9 additions and 5 deletions
|
|
@ -6,7 +6,7 @@ namespace ModelContextProtocol.AspNetCore;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Configuration options for <see cref="M:McpEndpointRouteBuilderExtensions.MapMcp"/>.
|
/// Configuration options for <see cref="M:McpEndpointRouteBuilderExtensions.MapMcp"/>.
|
||||||
/// which implements the Streaming HTTP transport for the Model Context Protocol.
|
/// 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>
|
/// </summary>
|
||||||
public class HttpServerTransportOptions
|
public class HttpServerTransportOptions
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ public static class McpEndpointRouteBuilderExtensions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets up endpoints for handling MCP Streamable HTTP transport.
|
/// 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.
|
/// 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>
|
/// </summary>
|
||||||
/// <param name="endpoints">The web application to attach MCP HTTP endpoints.</param>
|
/// <param name="endpoints">The web application to attach MCP HTTP endpoints.</param>
|
||||||
|
|
|
||||||
|
|
@ -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.
|
/// Streamable HTTP transport and automatically fall back to SSE transport if the server doesn't support it.
|
||||||
/// </para>
|
/// </para>
|
||||||
/// <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>.
|
/// <see href="https://modelcontextprotocol.io/specification/2024-11-05/basic/transports#http-with-sse">HTTP with SSE transport specification</see>.
|
||||||
/// </para>
|
/// </para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
|
|
||||||
|
|
@ -29,12 +29,13 @@ internal sealed partial class McpSession : IDisposable
|
||||||
"mcp.server.operation.duration", "Measures the duration of inbound message processing.", longBuckets: false);
|
"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>
|
/// <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>
|
/// <summary>All protocol versions supported by this implementation.</summary>
|
||||||
internal static readonly string[] SupportedProtocolVersions =
|
internal static readonly string[] SupportedProtocolVersions =
|
||||||
[
|
[
|
||||||
"2024-11-05",
|
"2024-11-05",
|
||||||
|
"2025-03-26",
|
||||||
LatestProtocolVersion,
|
LatestProtocolVersion,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,10 @@ public class MapMcpStreamableHttpTests(ITestOutputHelper outputHelper) : MapMcpT
|
||||||
|
|
||||||
await app.StartAsync(TestContext.Current.CancellationToken);
|
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);
|
await mcpClient.ListToolsAsync(cancellationToken: TestContext.Current.CancellationToken);
|
||||||
|
|
||||||
// The header should be included in the GET request, the initialized notification, and the tools/list call.
|
// The header should be included in the GET request, the initialized notification, and the tools/list call.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue