Skip to content

Commit 2b9eae4

Browse files
committed
Merge remote-tracking branch 'origin/main' into localden/experimental
2 parents 886d388 + 068f041 commit 2b9eae4

24 files changed

+625
-132
lines changed

samples/AspNetCoreSseServer/Program.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
using OpenTelemetry.Metrics;
33
using OpenTelemetry.Trace;
44
using TestServerWithHosting.Tools;
5+
using TestServerWithHosting.Resources;
56

67
var builder = WebApplication.CreateBuilder(args);
78
builder.Services.AddMcpServer()
89
.WithHttpTransport()
910
.WithTools<EchoTool>()
10-
.WithTools<SampleLlmTool>();
11+
.WithTools<SampleLlmTool>()
12+
.WithResources<SimpleResourceType>();
1113

1214
builder.Services.AddOpenTelemetry()
1315
.WithTracing(b => b.AddSource("*")
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using ModelContextProtocol.Protocol;
2+
using ModelContextProtocol.Server;
3+
using System.ComponentModel;
4+
5+
namespace TestServerWithHosting.Resources;
6+
7+
[McpServerResourceType]
8+
public class SimpleResourceType
9+
{
10+
[McpServerResource, Description("A direct text resource")]
11+
public static string DirectTextResource() => "This is a direct resource";
12+
}

samples/QuickstartClient/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static void PromptForInput()
8888
{
8989
[var script] when script.EndsWith(".py") => ("python", args),
9090
[var script] when script.EndsWith(".js") => ("node", args),
91-
[var script] when Directory.Exists(script) || (File.Exists(script) && script.EndsWith(".csproj")) => ("dotnet", ["run", "--project", script, "--no-build"]),
92-
_ => ("dotnet", ["run", "--project", "../../../../QuickstartWeatherServer", "--no-build"])
91+
[var script] when Directory.Exists(script) || (File.Exists(script) && script.EndsWith(".csproj")) => ("dotnet", ["run", "--project", script]),
92+
_ => ("dotnet", ["run", "--project", "../QuickstartWeatherServer"])
9393
};
9494
}

src/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<PackageProjectUrl>https://github.com/modelcontextprotocol/csharp-sdk</PackageProjectUrl>
66
<RepositoryUrl>https://github.com/modelcontextprotocol/csharp-sdk</RepositoryUrl>
77
<RepositoryType>git</RepositoryType>
8-
<VersionPrefix>0.2.0</VersionPrefix>
9-
<VersionSuffix>preview.4</VersionSuffix>
8+
<VersionPrefix>0.3.0</VersionPrefix>
9+
<VersionSuffix>preview.1</VersionSuffix>
1010
<Authors>ModelContextProtocolOfficial</Authors>
1111
<Copyright>© Anthropic and Contributors.</Copyright>
1212
<PackageTags>ModelContextProtocol;mcp;ai;llm</PackageTags>

src/ModelContextProtocol.AspNetCore/HttpServerTransportOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace ModelContextProtocol.AspNetCore;
66
/// <summary>
77
/// Configuration options for <see cref="M:McpEndpointRouteBuilderExtensions.MapMcp"/>.
88
/// which implements the Streaming HTTP transport for the Model Context Protocol.
9-
/// See the protocol specification for details on the Streamable HTTP transport. <see href="https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http"/>
9+
/// See the protocol specification for details on the Streamable HTTP transport. <see href="https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http"/>
1010
/// </summary>
1111
public class HttpServerTransportOptions
1212
{

src/ModelContextProtocol.AspNetCore/McpEndpointRouteBuilderExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public static class McpEndpointRouteBuilderExtensions
1515
{
1616
/// <summary>
1717
/// Sets up endpoints for handling MCP Streamable HTTP transport.
18-
/// 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.
18+
/// 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.
1919
/// 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.
2020
/// </summary>
2121
/// <param name="endpoints">The web application to attach MCP HTTP endpoints.</param>

src/ModelContextProtocol.Core/Client/McpClientTool.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ internal McpClientTool(
7777
/// <inheritdoc/>
7878
public override JsonElement JsonSchema => ProtocolTool.InputSchema;
7979

80+
/// <inheritdoc/>
81+
public override JsonElement? ReturnJsonSchema => ProtocolTool.OutputSchema;
82+
8083
/// <inheritdoc/>
8184
public override JsonSerializerOptions JsonSerializerOptions { get; }
8285

src/ModelContextProtocol.Core/Client/SseClientTransportOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public required Uri Endpoint
4141
/// Streamable HTTP transport and automatically fall back to SSE transport if the server doesn't support it.
4242
/// </para>
4343
/// <para>
44-
/// <see href="https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http">Streamable HTTP transport specification</see>.
44+
/// <see href="https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http">Streamable HTTP transport specification</see>.
4545
/// <see href="https://modelcontextprotocol.io/specification/2024-11-05/basic/transports#http-with-sse">HTTP with SSE transport specification</see>.
4646
/// </para>
4747
/// </remarks>

src/ModelContextProtocol.Core/McpSession.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ internal sealed partial class McpSession : IDisposable
2929
"mcp.server.operation.duration", "Measures the duration of inbound message processing.", longBuckets: false);
3030

3131
/// <summary>The latest version of the protocol supported by this implementation.</summary>
32-
internal const string LatestProtocolVersion = "2025-03-26";
32+
internal const string LatestProtocolVersion = "2025-06-18";
3333

3434
/// <summary>All protocol versions supported by this implementation.</summary>
3535
internal static readonly string[] SupportedProtocolVersions =
3636
[
3737
"2024-11-05",
38+
"2025-03-26",
3839
LatestProtocolVersion,
3940
];
4041

0 commit comments

Comments
 (0)