Release v2.1.0 (#1792)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5a733baf-670e-4850-934e-57f2821d671f
This commit is contained in:
Jeff Handley 2026-08-04 20:29:59 -07:00 • committed by GitHub
commit 3be47ee31e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 15 additions and 2189 deletions

View file

@ -231,6 +231,16 @@ builder.Services.AddMcpServer()
}); });
``` ```
#### Customizing a subscriptions/listen stream
For the `2026-07-28` protocol version and later, a server can fully own a long-lived
`subscriptions/listen` stream by registering `WithSubscriptionsListenHandler`. This replaces the
SDK's built-in listen handling. The handler must send one
`notifications/subscriptions/acknowledged` notification before other events, tag every streamed
notification with the listen request ID in `_meta.subscriptionId`, and remain active until its
cancellation token is cancelled. It must also configure only the server capabilities that the
handler actually supports; this extension does not advertise capabilities automatically.
#### Sending resource update notifications #### Sending resource update notifications
When a resource's content changes, the server notifies subscribed clients: When a resource's content changes, the server notifies subscribed clients:

View file

@ -5,7 +5,7 @@
<PackageProjectUrl>https://csharp.sdk.modelcontextprotocol.io</PackageProjectUrl> <PackageProjectUrl>https://csharp.sdk.modelcontextprotocol.io</PackageProjectUrl>
<RepositoryUrl>https://github.com/modelcontextprotocol/csharp-sdk</RepositoryUrl> <RepositoryUrl>https://github.com/modelcontextprotocol/csharp-sdk</RepositoryUrl>
<RepositoryType>git</RepositoryType> <RepositoryType>git</RepositoryType>
<VersionPrefix>2.0.0</VersionPrefix> <VersionPrefix>2.1.0</VersionPrefix>
<VersionSuffix></VersionSuffix> <VersionSuffix></VersionSuffix>
<Authors>ModelContextProtocol</Authors> <Authors>ModelContextProtocol</Authors>
<Copyright>© Model Context Protocol a Series of LF Projects, LLC.</Copyright> <Copyright>© Model Context Protocol a Series of LF Projects, LLC.</Copyright>
@ -18,7 +18,7 @@
<AssemblyOriginatorKeyFile>$(RepoRoot)\Open.snk</AssemblyOriginatorKeyFile> <AssemblyOriginatorKeyFile>$(RepoRoot)\Open.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly> <SignAssembly>true</SignAssembly>
<EnablePackageValidation>true</EnablePackageValidation> <EnablePackageValidation>true</EnablePackageValidation>
<PackageValidationBaselineVersion>1.4.1</PackageValidationBaselineVersion> <PackageValidationBaselineVersion>2.0.0</PackageValidationBaselineVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

File diff suppressed because it is too large Load diff

View file

@ -7,6 +7,7 @@
<PackageId>ModelContextProtocol.Core</PackageId> <PackageId>ModelContextProtocol.Core</PackageId>
<Description>Core .NET SDK for the Model Context Protocol (MCP)</Description> <Description>Core .NET SDK for the Model Context Protocol (MCP)</Description>
<PackageReadmeFile>README.md</PackageReadmeFile> <PackageReadmeFile>README.md</PackageReadmeFile>
<CompatibilitySuppressionFilePath>$(MSBuildThisFileDirectory)CompatibilitySuppressions.xml</CompatibilitySuppressionFilePath>
<!-- Suppress the experimental extensions warning --> <!-- Suppress the experimental extensions warning -->
<NoWarn>$(NoWarn);MCPEXP001</NoWarn> <NoWarn>$(NoWarn);MCPEXP001</NoWarn>
<!-- Core implements the Roots, Sampling, and Logging features deprecated by SEP-2577 (MCP9005). <!-- Core implements the Roots, Sampling, and Logging features deprecated by SEP-2577 (MCP9005).

View file

@ -4,7 +4,7 @@
The official C# SDK for the [Model Context Protocol](https://modelcontextprotocol.io/), enabling .NET applications, services, and libraries to implement and interact with MCP clients and servers. Please visit the [API documentation](https://csharp.sdk.modelcontextprotocol.io/api/ModelContextProtocol.html) for more details on available functionality. The official C# SDK for the [Model Context Protocol](https://modelcontextprotocol.io/), enabling .NET applications, services, and libraries to implement and interact with MCP clients and servers. Please visit the [API documentation](https://csharp.sdk.modelcontextprotocol.io/api/ModelContextProtocol.html) for more details on available functionality.
See the [release notes](https://github.com/modelcontextprotocol/csharp-sdk/releases/tag/v2.0.0) for what's new in this version. See the [release notes](https://github.com/modelcontextprotocol/csharp-sdk/releases/tag/v2.1.0) for what's new in this version.
## Packages ## Packages