Releases: modelcontextprotocol/csharp-sdk
v0.4.1-preview.1
This release brings protocol type standardization, several MCP specification implementations, and new features including an incremental source generator for automatic Description attributes from XML comments and client session resumption support. This release includes breaking changes to protocol types and elicitation enum schemas; refer to the Breaking Changes section below for details.
We are working toward the first stable version of the C# SDK as version 1.0.0, which will have compliance with Version 2025-11-25 of the MCP specification. We will publish at least one more pre-release version of the SDK before declaring the stable version, and breaking changes to remove obsolete interfaces and extension methods (#774) are expected as part of stabilizing the API.
Breaking Changes
Refer to the C# SDK Versioning documentation for details on versioning and breaking change policies.
- Audit and standardize MCP protocol types for consistency #892
- Property mutability changes
- Required properties changes
- Collection types used for properties
- Implement SEP-1330: Standards-compliant enum schemas for elicitation #969
EnumSchemais marked[Obsolete]using the defaultCS0618diagnostic, and it becomes an alias forLegacyTitledEnumSchema, which is also marked as[Obsolete]using the defaultCS0618diagnostic
What's Changed
- Add default value support for all primitive types in elicitation schemas (SEP-1034) #924 by @eiriktsarpalis (co-authored by @Copilot)
- Audit protocol types #892 by @MackinnonBuck
- Implement SEP-986: Specify Format for Tool Names #945 by @stephentoub
- Add public constructors to McpClient types for reusing cached definitions #938 by @stephentoub (co-authored by @Copilot)
- Tweak how McpClientTool.InvokeAsync exposes some content #941 by @stephentoub
- Ignore unexpected properties when deserializing a ContentBlock #956 by @jeffhandley
- Add Description property to Implementation type per MCP spec #966 by @stephentoub (co-authored by @Copilot)
- Remove TODOs related to AllowOutOfOrderMetadataProperty workarounds #977 by @eiriktsarpalis
- Make
JsonRpcMessageWithId.RequestIdnon-required #984 by @MackinnonBuck - Implement SEP-1330: Standards-compliant enum schemas for elicitation #969 by @stephentoub (co-authored by @Copilot)
- Add production-ready incremental source generator for automatic Description attributes from XML comments #899 by @stephentoub (co-authored by @Copilot)
- Add tools support to sampling #976 by @stephentoub
- Use JsonElement.Parse for string-to-JsonElement deserialization #1002 by @stephentoub (co-authored by @Copilot)
- Fix race condition in StdioClientTransport on .NET Framework #996 by @stephentoub (co-authored by @Copilot)
- Tokens can be cached beyond the lifetime of the (http) transport #834 by @halllo
- Add ability for client to resume session #1029 by @halter73
Documentation Updates
- Update ModelId in QuickStartClient to non-deprecated version #926 by @PederHP
- Add file-based MCP server sample #931 by @PederHP
- Align error handling documentation with SEP-1303 #967 by @stephentoub (co-authored by @Copilot)
- Fix a couple issues in the client sample readme #994 by @ericstj
- Fix documentation typos and incorrect type references #993 by @MackinnonBuck (co-authored by @Copilot)
- Introduce versioning, breaking changes, and support document #986 by @jeffhandley (co-authored by @Copilot @eiriktsarpalis @mikekistler)
- Address additional feedback on Versioning doc #999 by @jeffhandley
- Tweak the file-based MCP server sample #1019 by @eiriktsarpalis
- Writing style edits #1024 by @gewarren
Test Improvements
- Fix tests in Dev Container #965 by @halter73
- Skip flaky test on Mono where stderr callbacks are unsupported #980 by @stephentoub (co-authored by @Copilot)
Repository Infrastructure Updates
- Update Microsoft.Extensions.AI packages to version 9.10.1 #916 by @stephentoub (co-authored by @Copilot)
- Update to .NET SDK to 10.rc2 #883 by @eiriktsarpalis
- Bump danielpalme/ReportGenerator-GitHub-Action from 5.4.17 to 5.4.18 #920
- Bump actions/upload-artifact from 4.6.2 to 5.0.0 #918
- Bump actions/download-artifact from 5.0.0 to 6.0.0 #919
- Fixed dotnet version from 10.0.100-rc.1.25451.107 to 10.0.100-rc.2 #927 by @eduardomb-aw (co-authored by @eiriktsarpalis)
- Update to .NET 10.x packages #957 by @stephentoub
- Remove prerelease requirement from global.json #961 by @eiriktsarpalis
- Update to MTP #958 by @Youssef1313
- Bump actions/checkout from 5.0.0 to 5.0.1 #973
- Bump danielpalme/ReportGenerator-GitHub-Action from 5.4.18 to 5.5.0 #972
- Bump the opentelemetry-testing group with 6 updates #974
- Revert "Update to MTP" #989 by @eiriktsarpalis
- Bump the serilog-testing group with 2 updates #992
- Bump the testing-frameworks group with 3 updates #991
- Revert "Revert "Update to MTP"" #990 by @Youssef1313
- Add Microsoft.CodeAnalysis.* to dependabot ignore list #1009 by @eiriktsarpalis (co-authored by @Copilot)
- Revert "Update to MTP (#958)" #1011 by @halter73
- Bump the testing-frameworks group with 3 updates #1013
- Bump the serilog-testing group with 1 update #1014
- Bump version to 0.4.1-preview.1 #1031 by @jeffhandley
Acknowledgements
- @eduardomb-aw made their first contribution in #927
- @Youssef1313 made their first contribution in #958
- @ericstj made their first contribution in #994
- @halllo made their first contribution in #834
- @gewarren made their first contribution in #1024
- @anktsrkr submitted issue #749 (resolved by #834)
- @AlexandreDonne submitted issue #597 (resolved by #834)
- @pankajvaher submitted issue #946 (resolved by #1029)
- @cristipufu submitted issue #621 (resolved by #1029)
- @mikekistler @narasamdya @jozkee reviewed pull requests
Full Changelog: v0.4.0-preview.3...v0.4.1-preview.1
v0.4.0-preview.3
This release adds icons and metadata support (SEP-973), the new McpMetaAttribute for attaching custom metadata to tools, prompts, and resources, and .NET 10.0 target framework support. It also includes several bug fixes including faster shutdown for Streamable HTTP servers, proper exception propagation through tool call filters, and a fix for templated resource matching. This release contains breaking changes — see below for details and migration guidance.
Breaking Changes
Refer to the C# SDK Versioning documentation for details on versioning and breaking change policies.
-
McpException refactored; ErrorCode and error-code constructors moved to new McpProtocolException #844
McpException.ErrorCodeproperty,McpException(string, McpErrorCode), andMcpException(string, Exception?, McpErrorCode)constructors were removed. UseMcpProtocolExceptionfor error-code scenarios.McpExceptionthrown from tools and tool call filters now produces an erroredCallToolResultinstead of a JSON-RPC error. UseMcpProtocolExceptionto produce a JSON-RPC error with a specific error code.
-
McpServerResource.ReadAsync return type changed; new abstract IsMatch method #897
McpServerResource.ReadAsyncreturn type changed fromValueTask<ReadResourceResult?>toValueTask<ReadResourceResult>. Custom subclasses must update their signatures and throwInvalidOperationExceptioninstead of returningnullfor non-matching URIs.- New abstract method
bool IsMatch(string uri)must be implemented by any customMcpServerResourcesubclass.
-
StreamableHttpServerTransport method renames #843
HandleGetRequestrenamed toHandleGetRequestAsyncandHandlePostRequestrenamed toHandlePostRequestAsync. Update call sites accordingly.
What's Changed
- Implement SEP-973: Icons and metadata support for Implementations, Resources, Tools, and Prompts #802 by @MackinnonBuck (co-authored by @jozkee @Copilot)
- Fix slow shutdown when a Streamable HTTP client is connected #843 by @halter73
- Propagate tool call exceptions through filters #844 by @halter73 (co-authored by @stephentoub)
- Add net10.0 assets and run some fixers #875 by @stephentoub
- Synthesize handlers for empty tool/prompt/resource collections #865 by @stephentoub (co-authored by @Copilot)
- Convert EverythingServer to use Streamable HTTP #709 by @mikekistler (co-authored by @halter73)
- Add McpMetaAttribute for attaching metadata to tools, prompts, and resources #857 by @stephentoub (co-authored by @Copilot)
- Fix regression matching templated McpServerResources #897 by @halter73
- Call Regex.IsMatch when Match is not needed #903 by @halter73
Documentation Updates
- Fix markdown links in docs and add docfx CI validation #862 by @eiriktsarpalis (co-authored by @Copilot)
- Fix comments on McpServerTool/Prompt/Resource #866 by @stephentoub
Test Improvements
- Remove problematic System.Net.Http package reference from tests #867 by @stephentoub
- Add comprehensive test coverage for resource capability preservation with WithResources #896 by @stephentoub (co-authored by @Copilot)
Repository Infrastructure Updates
- Bump version to 0.4.0-preview.3 by @halter73
- Onboard repository to Dependabot for automated testing and AI dependency updates #800 by @eiriktsarpalis (co-authored by @Copilot)
- Bump actions/setup-node from 4.3.0 to 5.0.0 #845
- Bump actions/upload-pages-artifact from 3.0.1 to 4.0.0 #848
- Bump danielpalme/ReportGenerator-GitHub-Action from 5.4.4 to 5.4.17 #847
- Bump actions/setup-dotnet from 4.3.1 to 5.0.0 #846
- Bump becheran/mlc from 0.21.0 to 1.0.0 #852
- Bump actions/checkout from 4.2.2 to 5.0.0 #851
- Bump actions/download-artifact from 4.2.1 to 5.0.0 #849
- Fix sample projects to work in GitHub Codespaces by installing .NET 9.0 SDK #854 by @eiriktsarpalis (co-authored by @Copilot)
- Set up Copilot instructions for repository #858 by @stephentoub (co-authored by @Copilot)
- Pin global.json to rc.1 SDK #869 by @halter73
- Pin GitHub workflows to rc.1 SDK #871 by @halter73
- Add copilot-setup-steps.yml to preinstall .NET 10 SDK in GitHub Copilot environment #877 by @stephentoub (co-authored by @Copilot)
- Move copilot-setup-steps.yml to workflows directory per GitHub documentation #879 by @stephentoub (co-authored by @Copilot)
- Delete .github/workflows/copilot-setup-steps.yml #882 by @stephentoub
- Add copilot setup steps #885 by @stephentoub
- Update copilot-setup-steps.yml to use global.json for .NET SDK version #888 by @stephentoub (co-authored by @Copilot)
- Bump the opentelemetry-testing group with 2 updates #901
- Bump actions/setup-node from 5.0.0 to 6.0.0 #900
- Update download-artifact path reference #905 by @jeffhandley
Acknowledgements
- @dsp-ant submitted issue #753 (resolved by #802)
- @codeape2 submitted issue #825 (resolved by #843)
- @gophph submitted issue #820 (resolved by #844)
- @BenLampson submitted issue #821 (resolved by #897)
Full Changelog: v0.4.0-preview.2...v0.4.0-preview.3
v0.4.0-preview.2
This release includes a breaking change to the Streamable HTTP transport's Stateless mode, making it truly sessionless by removing the data protection dependency and session ID tracking. It also fixes an issue with sending server notifications from request-specific McpServer instances used outside their original scope.
Breaking Changes
Refer to the C# SDK Versioning documentation for details on versioning and breaking change policies.
- Make "Stateless" mode sessionless #760
McpServer.ClientInfowill always benullin stateless mode because stateless mode no longer uses a session ID or relies on data protection- If you need
ClientInfoin your handlers, use the default stateful mode
What's Changed
- Move options validation to constructor #826 by @halter73
- Make "Stateless" mode sessionless #760 by @halter73
- Update sample with URI validation #824 by @localden
- Fix support for sending server notifications with request-specific McpServer instances used outside their original scope #832 by @eiriktsarpalis
Repository Infrastructure Updates
- Bump version to 0.4.0-preview.2 #818 by @jeffhandley
- Onboard repo to the .NET 10 sdk #822 by @eiriktsarpalis
- Update .NET version in release.yml #841 by @halter73
- Bump version to 0.4.0-preview.3 by @halter73
- Bump version back down to 0.4.0-preview.2 by @halter73
- Update remaining .NET versions in release.yml by @halter73
Acknowledgements
- @sr-auto submitted issue #682 (resolved by #760)
- @mikekistler submitted issue #693 (resolved by #832)
- @stephentoub reviewed pull requests
Full Changelog: v0.4.0-preview.1...v0.4.0-preview.2
v0.4.0-preview.1
The 0.4.0-preview.1 release of the Model Context Protocol C# SDK introduces several significant breaking API changes to improve the SDK's evolution path. Interfaces have been replaced by abstract classes, factory classes have been deprecated in favor of static factory methods, SSE transport types have been renamed to HTTP, and handlers/collections have been decoupled from protocol types. This release also adds new features including ElicitAsync<T>, middleware and authorization support for server-side handlers, WithXx overloads that take target instances, and improvements to dynamic client registration.
Breaking Changes
The 0.4.0-preview.1 release includes several breaking API changes as we continue to refine the API surface area for the path toward a 1.0.0 stable release. Refer to the C# SDK Versioning documentation for information regarding our versioning, breaking change, and support approaches.
- Interfaces were replaced by abstract classes to better allow evolution of the API surface in future versions.
- Factory classes were deprecated and replaced by static factory methods to improve usability and align with existing .NET patterns such as
HttpClient. - The 'Sse' (Server-Sent Events) APIs were renamed to use 'Http', aligning with the revised Transports nomenclature.
- APIs for handlers and callbacks were decoupled from the protocol representation for improved separation of concerns.
Interfaces replaced by abstract classes
The IMcpClient, IMcpServer, and IMcpEndpoint interfaces are marked as [Obsolete] and will be removed in an upcoming release. These interfaces are replaced by new abstract classes.
| Old | New |
|---|---|
IMcpClient |
McpClient |
IMcpServer |
McpServer |
IMcpEndpoint |
McpSession |
Action: Replace usages of the obsolete interfaces with the new abstract types. Change variable, field, and parameter types. Optional, but recommended: rename identifiers like endpoint → session for clarity.
Factory classes deprecated
The McpClientFactory and McpServerFactory classes are marked as [Obsolete] and will be removed in an upcoming release.
| Old | New |
|---|---|
McpClientFactory.CreateAsync(...) |
McpClient.CreateAsync(...) |
McpServerFactory.CreateAsync(...) |
McpServer.CreateAsync(...) |
Action: Replace calls to the factory classes with the static factory methods on the abstract classes.
Rename SseClientTransport to HttpClientTransport
The SseClientTransport and SseClientTransportOptions classes were renamed to reflect Http naming instead of Sse.
| Old | New |
|---|---|
SseClientTransport |
HttpClientTransport |
SseClientTransportOptions |
HttpClientTransportOptions |
Action: Update usage of these types to utilize the new type names.
Decouple handlers and collections from protocol types
Handlers and collections in the Capabilities types are now obsolete; they've been moved to McpClientOptions and McpServerOptions.
| Old | New |
|---|---|
| myClientOptions.Capabilities.NotificationHandlers | myClientOptions.Handlers.NotificationHandlers |
| myClientOptions.Capabilities.Elicitation.ElicitationHandler | myClientOptions.Handlers.ElicitationHandler |
| myClientOptions.Capabilities.Roots.RootsHandler | myClientOptions.Handlers.RootsHandler |
| myClientOptions.Capabilities.Sampling.SamplingHandler | myClientOptions.Handlers.SamplingHandler |
| myServerOptions.Capabilities.NotificationHandlers | myServerOptions.Handlers.NotificationHandlers |
| myServerOptions.Capabilities.Completions.CompleteHandler | myServerOptions.Handlers.CompleteHandler |
| myServerOptions.Capabilities.Logging.SetLoggingLevelHandler | myServerOptions.Handlers.SetLoggingLevelHandler |
| myServerOptions.Capabilities.Prompts.ListPromptsHandler | myServerOptions.Handlers.ListPromptsHandler |
| myServerOptions.Capabilities.Prompts.GetPromptHandler | myServerOptions.Handlers.GetPromptHandler |
| myServerOptions.Capabilities.Prompts.PromptCollection | myServerOptions.PromptCollection |
| myServerOptions.Capabilities.Resources.ListResourceTemplatesHandler | myServerOptions.Handlers.ListResourceTemplatesHandler |
| myServerOptions.Capabilities.Resources.ListResourcesHandler | myServerOptions.Handlers.ListResourcesHandler |
| myServerOptions.Capabilities.Resources.ReadResourceHandler | myServerOptions.Handlers.ReadResourceHandler |
| myServerOptions.Capabilities.Resources.SubscribeToResourcesHandler | myServerOptions.Handlers.SubscribeToResourcesHandler |
| myServerOptions.Capabilities.Resources.UnsubscribeFromResourcesHandler | myServerOptions.Handlers.UnsubscribeFromResourcesHandler |
| myServerOptions.Capabilities.Resources.ResourceCollection | myServerOptions.ResourceCollection |
| myServerOptions.Capabilities.Tools.ListToolsHandler | myServerOptions.Handlers.ListToolsHandler |
| myServerOptions.Capabilities.Tools.CallToolHandler | myServerOptions.Handlers.CallToolHandler |
| myServerOptions.Capabilities.Tools.ToolCollection | myServerOptions.ToolCollection |
Action: Replace usages of the obsolete handlers and collections with the corresponding APIs on the options types.
Collections
Old
new McpServerOptions()
{
Capabilities = new()
{
Tools = new()
{
ToolCollection = [McpServerTool.Create(...)]
}
}
};New
new McpServerOptions()
{
ToolCollection = [McpServerTool.Create(...)]
};Handlers
Old
new McpServerOptions()
{
Capabilities = new()
{
Tools = new()
{
CallToolHandler = (request, ct) => { ... }
}
}
};New
new McpServerOptions()
{
Handlers = new()
{
CallToolHandler = (request, ct) => { ... }
}
};What's Changed
- Add WithXx overloads that take target instance #706 by @stephentoub
- Improvements to dynamic client registration #609 by @S-Luiten
- Improved samples: added weather tool in AspNetCoreSseServer and option to connect via HTTP to AspNetCoreSseServer #469 by @sabbadino
- Convert ValueStringBuilder.cs to file-scoped namespaces #746 by @Revazashvili
- Per RouteValue Tools Sample #724 by @PederHP
- Add middleware and authz support for server-side handlers #733 by @halter73
- Add ElicitAsync<T> #715 by @mehrandvd (co-authored by @eiriktsarpalis @stephentoub)
- Restructure
IMcpEndpoint,IMcpClient, andIMcpServer#723 by @MackinnonBuck (co-authored by @halter73) - Add McpSession.NegotiatedProtocolVersion property #794 by @eiriktsarpalis
- Decouple Handlers and Collections from protocol types #765 by @jozkee
- Fix stdio client transport CLI argument escaping #811 by @eiriktsarpalis
Documentation Updates
- Add articles on logging and progress #717 by @mikekistler
- Clarify default value in ElicitResult documentation #731 by @timheuer
- Fix typo in LoggingTools.cs #740 by @ElanHasson
- Correct 'McpTool' to 'McpServerTool' in README #775 by @asklar
- Add conceptual docs on accessing HttpContext #771 by @mikekistler (co-authored by @Copilot)
Repository Infrastructure Updates
- Bump version to 0.3.0-preview.5 by @halter73
- Update packages and Infra #732 by @eiriktsarpalis
- Include docs samples in solution build #751 by @mikekistler
- Update MEAI dependencies #801 by @eiriktsarpalis
- Add devcontainer.json to support .NET 9 samples in GitHub Codespaces #779 by @eiriktsarpalis (co-authored by @Copilot)
- Bump M.E.AI version #817 by @stephentoub
- Bump to 0.4.0-preview.1 for releasing breaking changes #813 by @jeffhandley
Acknowledgements
- @sabbadino made their first contribution in #469
- @S-Luiten made their first contribution in #609
- @Revazashvili made their first contribution in #746
- @ElanHasson made their first contribution in #740
- @mehrandvd made their first contribution in #715
- @asklar made their first contribution in #775
- @MackinnonBuck made their first contribution in #723
- @jozkee made their first contribution in #765
- @JH8676 submitted #668 (resolved by #794)
- @adner submitted #594 (resolved by #811)
- @DavidParks8 @sayiedanwartt-design reviewed pull requests
Full Changelog: v0.3.0-preview.4...v0.4.0-preview.1
v0.3.0-preview.4
This release includes bug fixes for ResourceLinkBlock deserialization and IEnumerable serialization, performance improvements to idle session tracking, enhanced MCP session logging, new samples, and the initial framework for conceptual documentation.
What's Changed
- Respect HandleResponse() and SkipHandler() calls in OnResourceMetadataRequest #607 by @halter73
- UnreferenceDisposable made slimmer #627 by @Scooletz
- IdleTracking uses lists instead of SortedSet #629 by @Scooletz
- Fix ResourceLinkBlock deserialization by adding missing "name" case #645 by @eiriktsarpalis (co-authored by @Copilot)
- Add an in-memory transport sample #664 by @stephentoub
- Remove 'Sse' from AspNetCoreSseServer sample name #665 by @halter73
- Fix NotSupportedException when returning IEnumerable #675 by @eiriktsarpalis (co-authored by @Copilot)
- Enhance HTTP and MCP session logging #608 by @theojiang25
- Remove special-casing of string enumerables in McpServerTool #699 by @stephentoub
- Prune idle sessions before starting new ones #701 by @halter73
Documentation Updates
- Add framework for conceptual docs #708 by @mikekistler (co-authored by @halter73)
Repository Infrastructure Updates
- Bump version to 0.3.0-preview.4 by @halter73
Acknowledgements
- @Scooletz made their first contribution in #627
- @theojiang25 made their first contribution in #608
- @KrakerXyz submitted issue #644 (resolved by #645)
- @asklar submitted issue #673 (resolved by #675)
- @AArnott submitted issue #698 (resolved by #699)
- @AArnott @DavidParks8 @Meir017 @PederHP reviewed pull requests
Full Changelog: v0.3.0-preview.3...v0.3.0-preview.4
v0.3.0-preview.3
This release improves .NET Framework support by adding cancellable stream reader polyfills, fixes a crash when ResourceMetadata is dynamically provided via events, ensures IsExternalInit type forwarding for multi-TFM consumers, and enables IHttpContextAccessor in Streamable HTTP tool calls by flowing ExecutionContext with JSON-RPC messages. It also updates Microsoft.Extensions.AI to 9.7.1.
What's Changed
- Add .NET Framework support with cancellable stream readers and enable netfx testing #588 by @eiriktsarpalis
- Fix: Prevent crash when Options.ResourceMetadata is null but handled by event #603 by @DavidParks8
- Update to M.E.AI 9.7.0 #602 by @stephentoub
- Ensure IsExternalInit is type forwarded on NET builds #619 by @stephentoub
- Flow ExecutionContext with JsonRpcMessage #616 by @halter73
- Update MEAI version to 9.7.1 and add regression test for #601 #628 by @eiriktsarpalis
Repository Infrastructure Updates
- Bump version to 0.3.0-preview.3 by @halter73
Acknowledgements
- @DavidParks8 made their first contribution in #603
- @xiaomi7732 submitted issue #365 (resolved by #616)
- @aschabus submitted issue #601 (resolved by #628)
- @sr-auto reviewed pull requests
Full Changelog: v0.3.0-preview.2...v0.3.0-preview.3
v0.3.0-preview.2
This release introduces authorization support using ASP.NET Core's native authentication and authorization integration, enabling OAuth 2.0-protected MCP servers. It also includes improvements to URI template handling, structured output support in McpClientTool, constructor injection for IMcpServer, and a breaking change to default name casing for tools, prompts, and resources.
Breaking Changes
Refer to the C# SDK Versioning documentation for details on versioning and breaking change policies.
- Change default name casing of McpServerXx.Create tools/prompts/resources #568
- Tools and resources created via
McpServerTool.Create,McpServerPrompt.Create, andMcpServerResource.Createwithout an explicit name now derivelower_snake_casenames instead of using the PascalCase method name (e.g.,"Echo"→"echo","EchoWithUserName"→"echo_with_user_name"). - Set the
Nameproperty on the[McpServerTool]attribute or pass it via the options parameter to preserve existing names.
- Tools and resources created via
What's Changed
- Fix URI template derivation and lookup #530 by @eiriktsarpalis
- Fix deserialization of PrimitiveSchemaDefinition #537 by @stephentoub
- Implement ReturnJsonSchema in McpClientTool #538 by @S-Luiten
- Styling: remove a few redundant parens from object initializer expressions #548 by @eiriktsarpalis
- Delete unused method and linker suppression #567 by @stephentoub
- Enable injecting IMcpServer and friends into ctors #570 by @stephentoub
- Make CallToolResult.IsError optional #573 by @stephentoub
- Add CallToolResult.ToChatMessage extension method #575 by @stephentoub
- Change default name casing of McpServerXx.Create tools/prompts/resources #568 by @stephentoub
- Fix relative path resolution in sample app #572 by @eiriktsarpalis
- Fixed StreamableHttpClientSessionTransport.cs for netstandard #582 by @lucapivato
- Authorization Support (Using ASP.NET Core Native AuthN/AuthZ Integration) #377 by @localden
Documentation Updates
- Document default value for UseStructuredContent #539 by @S-Luiten
- Update README.md to fix the server sample build issue #546 by @Anduin2017
Repository Infrastructure Updates
- Removed space #563 by @rokenbuzz
- Bump version to 0.3.0-preview.2 by @halter73
Acknowledgements
- @S-Luiten made their first contribution in #538
- @Anduin2017 made their first contribution in #546
- @rokenbuzz made their first contribution in #563
- @lucapivato made their first contribution in #582
- @newpost submitted issue #395 (resolved by #572)
- @eiriktsarpalis @stephentoub @halter73 @PederHP @TylerLeonhardt @DavidParks8 reviewed pull requests
Full Changelog: v0.3.0-preview.1...v0.3.0-preview.2
v0.3.0-preview.1
The v0.3.0-preview.1 release introduces spec-aligned content type renames, session ID support across transports, structured output for server tools, and improved Streamable HTTP client behavior.
Breaking Changes
Refer to the C# SDK Versioning documentation for information regarding our versioning, breaking change, and support approaches.
- Content type renames to match spec #513
Contentrenamed toContentBlockwith subclassesTextContentBlock,ImageContentBlock,AudioContentBlock, andResourceContentBlock;CallToolResponserenamed toCallToolResult;CancelledNotificationrenamed toCancelledNotificationParams;ProgressNotificationrenamed toProgressNotificationParams;Referencereplaced with derived typesResourceReference,ResourceTemplateReference, andPromptReference;CallToolRequestParamssealed- Migration: Update all type name references throughout consuming code; search-and-replace is mostly sufficient
- Session ID support added across transports #466
SessionIdproperty added to theITransportandIMcpEndpointinterfaces, requiring all custom implementations to add this member;StreamableHttpServerTransport.InitializeRequestproperty replaced withOnInitRequestReceivedcallback- Migration: Add
public string? SessionId => null;to customITransport/IMcpEndpointimplementations; replace reads of.InitializeRequestwith callback via.OnInitRequestReceived
What's Changed
- Add context to complete requests #488 by @stephentoub
- Add structured output/output schema support for server-side tools #480 by @eiriktsarpalis (co-authored by @stephentoub)
- Pass session IDs to MCP endpoints #466 by @eiriktsarpalis (co-authored by @halter73)
- Make enums serialize as strings if using the reflection-based serializer #473 by @eiriktsarpalis
- Update Microsoft.Extensions.AI version and expose JSON configuration on
McpServerResourceCreateOptions#511 by @sbomer (co-authored by @eiriktsarpalis) - Update content types according to latest spec #513 by @stephentoub
- Fix visibility of polyfill #523 by @stephentoub
- Add a callback for receiving stderr output #525 by @stephentoub
- Send MCP-Protocol-Version header in Streamable HTTP client transport #500 by @halter73
- Send DELETE request when closing a Streamable HTTP session on the client #501 by @halter73
- Add 2025-06-18 as supported protocol version #529 by @stephentoub
Documentation Updates
- Remove incorrect acknowledgement from README of new Core package #482 by @halter73
- Fix QuickstartClient path #528 by @stephentoub
Repository Infrastructure Updates
- Bump version to 0.2.0-preview.4 by @halter73
- Bump version number to 0.3.0 #534 by @eiriktsarpalis
Acknowledgements
- @sbomer made their first contribution in #511
- @AArnott submitted issue #425 (resolved by #466) and issue #487 (resolved by #525)
- @rlacaci submitted issue #357 (resolved by #511)
- @ihrpr submitted issues #508, #517, and #518 (resolved by #513)
- @akeit0 submitted issue #522 (resolved by #523)
- @AArnott reviewed pull requests
Full Changelog: v0.2.0-preview.3...v0.3.0-preview.1
v0.2.0-preview.3
This release introduces the ModelContextProtocol.Core package, splitting the SDK into layered packages to provide client and low-level server APIs with minimal dependencies. Protocol record types are converted to classes for better forward compatibility, elicitation support is added, and protocol version negotiation is improved.
Breaking Changes
Refer to the C# SDK Versioning documentation for details on versioning and breaking change policies.
- Add ModelContextProtocol.Core package #428
- Client, protocol, transport, and core types moved from the
ModelContextProtocolassembly to a newModelContextProtocol.Coreassembly; existingModelContextProtocolpackage now referencesModelContextProtocol.Coreand provides hosting/DI extensions - Migration: Applications referencing
ModelContextProtocolretain access to all types with no changes needed; applications wanting minimal dependencies can referenceModelContextProtocol.Coredirectly
- Client, protocol, transport, and core types moved from the
- Convert records to classes #470
- Nine protocol types converted from
record/record structtoclass:SseClientTransportOptions,StdioClientTransportOptions,ProgressNotificationValue,Annotations,InitializeResult,JsonRpcErrorDetail,PingResult,Resource,ResourceTemplate;ProgressNotificationValuechanged from value type to reference type - Migration: Remove uses of structural equality,
withexpressions, and deconstruction on the affected types
- Nine protocol types converted from
- Improve protocol version handling #468
McpClientOptions.ProtocolVersionandMcpServerOptions.ProtocolVersionchanged fromstringtostring?; default protocol version updated from2024-11-05to2025-03-26; server now negotiates the protocol version based on the client's requested version- Migration: Update any code that relies on the
ProtocolVersiontype or the default protocol version value
What's Changed
- Add elicitation capability #467 by @stephentoub
- Convert records to classes #470 by @eiriktsarpalis
- Add ModelContextProtocol.Core package #428 by @halter73
- Improve protocol version handling #468 by @stephentoub
- Don't conflate request and response IDs in Streamable HTTP transports #475 by @halter73
Repository Infrastructure Updates
- Bump version to 0.2.0-preview.3 #465 by @jeffhandley
- Convert solution to slnx #472 by @eiriktsarpalis
- Update dependency versions #474 by @stephentoub
Acknowledgements
- @mkeeley-tricentis submitted issue #464 (resolved by #475)
- @ladeak reviewed pull requests
Full Changelog: v0.2.0-preview.2...v0.2.0-preview.3
v0.2.0-preview.2
This release replaces UseStreamableHttp with a TransportMode enum for more flexible transport configuration, with auto-detection as the new default. It also improves SSE client transport compatibility, relaxes accept header validation, and adds tool invocation error logging.
Breaking Changes
Refer to the C# SDK Versioning documentation for details on versioning and breaking change policies.
- Replace
UseStreamableHttpwithTransportMode#456SseClientTransportOptions.UseStreamableHttpproperty removed and replaced withTransportModeof typeHttpTransportMode- Default behavior changed from SSE-only to auto-detect (tries Streamable HTTP first, falls back to SSE)
- Migration:
UseStreamableHttp = true→TransportMode = HttpTransportMode.StreamableHttp; default/false →TransportMode = HttpTransportMode.Sse(to preserve old behavior)
What's Changed
- Allow more accept headers #429 by @halter73
- SSE client transport: tolerate return of RPC responses in POST requests #445 by @eiriktsarpalis
- Log tool invocation errors #447 by @kooshi
- Automatically fall back from Streamable HTTP to SSE on the client by default #456 by @halter73
- Set CreateNoWindow=true in RunProcessAndWaitForExit #462 by @stephentoub
Documentation Updates
- Update README.md #437 by @Gavinluo
- Update documentation of McpJsonUtilities.DefaultOptions #463 by @eiriktsarpalis
Repository Infrastructure Updates
- Bump version to 0.2.0-preview.2 #424 by @jeffhandley
- Serilog AOT has been fixed as of 4.3.0 #434 by @agocke
Acknowledgements
- @Gavinluo made their first contribution in #437
- @kooshi made their first contribution in #447
- @AArnott submitted issues #439 (resolved by #445) and #440 (resolved by #456)
- @yinzara submitted issue #459 (resolved by #463)
Full Changelog: 0.2.0-preview.1...v0.2.0-preview.2