v0.5.0-preview.1
Pre-release
Pre-release
Breaking Changes
The 0.5.0-preview.1 release includes several categories of breaking 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.
- Add request options bag to high level requests and include Meta (#970)
- High-level request methods refactored to use options bag. Methods
CallToolAsync,GetPromptAsync,ListResourcesAsync,ReadResourceAsync,SubscribeResourceAsync,UnsubscribeResourceAsync,ListToolsAsync,ListPromptsAsync, and similar now accept a newRequestOptionsparameter instead of individualJsonSerializerOptionsandProgressTokenparameters. - Code that passes
JsonSerializerOptionsorProgressTokenas named or positional parameters to high-level request methods will break and must be updated to use theRequestOptionsbag instead.
- High-level request methods refactored to use options bag. Methods
- Remove obsolete APIs from codebase (#985)
McpServerFactoryclass: Removed obsolete factory class for creating MCP servers.McpClientFactoryclass: Removed obsolete factory class for creating MCP clients.- Obsolete interfaces removed:
IMcpEndpoint,IMcpClient,IMcpServer - Extension methods and properties that were previously marked obsolete are no longer available.
LegacyTitledEnumSchemaandEnumSchemaremain in place as obsolete APIs, but they now use a custom diagnostic ID ofMCP9001instead of the defaultCS0618obsoletion diagnostic ID. This allows references to these APIs to be suppressed with a targeted diagnostic.
- Fall back to well-known URL in client if 401 response is missing resource_metadata parameter (#1054)
IsConfiguredEndpointRequest()now properly validates absolute URIs by checking both host and scheme match, not just the path. This may cause previously accepted requests to be rejected if host/scheme don't match.ModelContextProtocol.AspNetCore.Authentication.McpAuthenticationOptions.ResourceMetadataUriwas changed fromstringto a nullablestring?.ModelContextProtocol.Authentication.ProtectedResourceMetadata.Resourcewas changed fromrequired Urito a non-required and nulalbleUri?
- Remove McpClient.Enumerate*Async methods (#1060)
- Removes
EnumerateToolsAsync,EnumeratePromptsAsync,EnumerateResourceTemplatesAsync, andEnumerateResourcesAsyncfrom the public API surface. These scenarios are covered by the correspondingList*Asyncmethods.
- Removes
- Add McpClient/Session methods using .Protocol types (#1063)
- Methods accepting a
CancellationToken tokenhad the argument renamed fromtokentocancellationTokenfor consistency throughout the SDK. - Methods accepting a
JsonSerializerOptions? serializerOptionsargument were updated to accept aRequestOptions? optionsargument instead, further adopting theRequestOptionsclass introduced in #970. ModelContextProtocol.Client.McpClient.CompleteAsyncwas updated to add an optionalRequestOptions? optionsargument, changing the position of the optionalCancellationTokenargument on the method signature.ModelContextProtocol.Client.McpClient.UnsubscribeFromResourceAsyncarguments were changed to now acceptUnsubscribeRequestParams requestParams, CancellationToken cancellationToken = default.ModelContextProtocol.Client.McpClient.SetLoggingLevelwas renamed toSetLoggingLevelAsync.
- Methods accepting a
What's Changed
- Add support for Client ID Metadata Documents to enable URL-based client registration by @MackinnonBuck in #1023
- MCP Core docs edit pass by @gewarren in #1033
- Adjust analyzer diagnostic severities and improve MCP001 reporting by @Copilot in #1038
- Remove obsolete APIs from codebase by @Copilot in #985
- Add support for
datatoMcpProtocolExceptionby @Copilot in #1028 - Fix XML generator partial method issues by @jongalloway in #1059
- Remove McpClient.Enumerate*Async methods by @Copilot in #1060
- Add request options bag to high level requests and include Meta by @mikekistler in #970
- Add support for URL mode elicitation by @halter73 in #1021
- Synthesize return description into tool description when UseStructuredContent is false by @Copilot in #1049
- Add ResourceNotFound error code (-32002) by @Copilot in #1062
- Add McpClient/Session methods using .Protocol types by @stephentoub in #1063
- WithMeta for McpClientTool by @PederHP in #1027
- Fall back to well-known URL in client if 401 response is missing resource_metadata parameter by @halter73 in #1054
Documentation Updates
- Core Protocol docs edit pass by @gewarren in #1032
- Docs edit pass (MCP.AspNetCore and a few other files) by @gewarren in #1034
- Update NuGet.org package owner to ModelContextProtocol by @jeffhandley #1071
Repository Infrastructure Updates
- Add Conformance tests for the server by @mikekistler in #983
- Bump version to 0.5.0-preview.1 by @jeffhandley in #1035
- Bump the serilog-testing group with 1 update by @dependabot[bot] in #1046
- Bump actions/setup-dotnet from 5.0.0 to 5.0.1 by @dependabot[bot] in #1045
- Bump the testing-frameworks group with 1 update by @dependabot[bot] in #1044
New Contributors
- @jongalloway made their first contribution in #1059
Full Changelog: v0.4.1-preview.1...v0.5.0-preview.1