Bump ModelContextProtocol from 0.5.0-preview.1 to 1.2.0#19374
Open
dependabot[bot] wants to merge 1 commit intomainfrom
Open
Bump ModelContextProtocol from 0.5.0-preview.1 to 1.2.0#19374dependabot[bot] wants to merge 1 commit intomainfrom
dependabot[bot] wants to merge 1 commit intomainfrom
Conversation
--- updated-dependencies: - dependency-name: ModelContextProtocol dependency-version: 1.2.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Contributor
|
Test this change out locally with the following install scripts (Action run 24013382160) VSCode
Azure CLI
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated ModelContextProtocol from 0.5.0-preview.1 to 1.2.0.
Release notes
Sourced from ModelContextProtocol's releases.
1.2.0
This release improves stateless HTTP transport defaults and documentation with a breaking behavioral change that we are considering as a server reliability fix and therefore not bumping the major version with this release. Legacy SSE endpoints are now disabled by default with a new
HttpServerTransportOptions.EnableLegacySseproperty available to opt back into responding to the SSE endpoints; the property is marked as an[Obsolete]warning as we expect to remove this property in a future major version.A warning-level
[Obsolete]attribute is also applied to theRequestContext(McpServer, JsonRpcRequest)constructor, and theRequestContext(McpServer, JsonRpcRequest, TParams)overload should be used instead. This change contributes to fixes including DI scope lifetime in task-augmented tools, meta/progress combination failures, and outgoing message filter routing. We plan to remove the obsolete overload in a future major version.Breaking Changes
Refer to the C# SDK Versioning documentation for details on versioning and breaking change policies.
1. Disable legacy SSE by default #1468
MapMcp()no longer maps/sseand/messageendpoints by default. Servers whose clients connect via SSE will find those endpoints removed.Migrating from legacy SSE
If your clients connect to a
/sseendpoint (e.g.,https://my-server.example.com/sse), they were using the legacy SSE transport--if not running inStatelessmode. The/sseand/messageendpoints are now disabled by default (EnableLegacySseisfalseand marked[Obsolete]with diagnosticMCP9004). Upgrading the server SDK without updating clients will break SSE connections.Client-side migration. Change the client
Endpointfrom the/ssepath to the root MCP endpoint — the same URL your server passes toMapMcp(). For example:With the default
HttpTransportMode.AutoDetecttransport mode, the client automatically tries Streamable HTTP first. You can also setTransportMode = HttpTransportMode.StreamableHttpexplicitly if you know the server supports it.Server-side migration. If you previously relied on
/ssebeing mapped automatically, you now needEnableLegacySse = true(suppressing theMCP9004warning) to keep serving those endpoints. The recommended path is to migrate all clients to Streamable HTTP and then removeEnableLegacySse.Transition period. If some clients still need SSE while others have already migrated to Streamable HTTP, set
EnableLegacySse = truewithStateless = false. Both transports are served simultaneously byMapMcp()— Streamable HTTP on the root endpoint and SSE on/sseand/message. Once all clients have migrated, removeEnableLegacySseand optionally switch toStateless = true.SSE (legacy — opt-in only)
Legacy SSE endpoints are now disabled by default and must be explicitly enabled via
HttpServerTransportOptions.EnableLegacySse. This is the primary reason they are disabled — the SSE transport has no built-in HTTP-level backpressure.The legacy SSE transport separates the request and response channels: clients POST JSON-RPC messages to
/messageand receive responses through a long-lived GET SSE stream on/sse. The POST endpoint returns 202 Accepted immediately after queuing the message — it does not wait for the handler to complete. This means there is no HTTP-level backpressure on handler concurrency, because each POST frees its connection immediately regardless of how long the handler runs.Internally, handlers are dispatched with a fire-and-forget pattern. A client can send unlimited POST requests to
/messagewhile keeping the GET stream open, and each one spawns a concurrent handler with no built-in limit.The GET stream does provide session lifetime bounds: handler cancellation tokens are linked to the GET request's
HttpContext.RequestAborted, so when the client disconnects the SSE stream, all in-flight handlers are cancelled. This is similar to SignalR's connection-bound lifetime model — but unlike SignalR, there is no per-client concurrency limit likeMaximumParallelInvocationsPerClient. The GET stream provides cleanup on disconnect, not rate-limiting during the connection.2. Obsolete 2-arg RequestContext constructor #1462
The
RequestContext(McpServer, JsonRpcRequest)constructor is now[Obsolete]with diagnosticMCP9003, producing build warnings. TheParamsproperty is also changed fromTParams?toTParams.Migration: Use the new 3-arg constructor:
new RequestContext(server, request, parameters).What's Changed
... (truncated)
1.1.0
Highlights of v1.1.0 include client completion details for understanding when and why a client connection ended, auto-populated completion handlers from
AllowedValuesAttribute, and bug fixes for server-initiated ping handling, server capabilities initialization, and in-flight message handler cleanup.What's Changed
Documentation Updates
Repository Infrastructure Updates
EnablePackageValidationfor all src packages with1.0.0baseline #1330 by @jeffhandley (co-authored by @Copilot @stephentoub)Acknowledgements
Full Changelog: modelcontextprotocol/csharp-sdk@v1.0.0...v1.1.0
1.0.0
This is the first stable release of the ModelContextProtocol C# SDK. Thank you to all of the contributors who helped us achieve this milestone!
Breaking Changes
Refer to the C# SDK Versioning documentation for details on versioning and breaking change policies.
HttpServerTransportOptions.RunSessionHandleris now annotated with[Experimental("MCPEXP002")]RunSessionHandlerwill produce a compile-time warning (or error withTreatWarningsAsErrors); suppress with#pragma warning disable MCPEXP002ConfigureSessionOptionsas an alternative;RunSessionHandlermay be removed or change signatures in a future releaseWhat's Changed
RunSessionHandlerexperimental (MCPEXP002) #1383 by @halter73 (co-authored by @Copilot @jeffhandley)Documentation Updates
Repository Infrastructure Updates
Acknowledgements
Full Changelog: modelcontextprotocol/csharp-sdk@v1.0.0-rc.1...v1.0.0
1.0.0-rc.1
This release candidate completes a full API surface area audit ahead of the 1.0.0 stable release, with more changes to public APIs to ensure consistency and long-term maintainability. Protocol DTO types are updated to match the MCP specification, deprecated filter APIs are removed, and bug fixes improve transport reliability and JSON handling.
Breaking Changes
Refer to the C# SDK Versioning documentation for details on versioning and breaking change policies.
Address asymmetry in McpServerHandlers/McpClientHandlers and make all filter properties settable #1337
McpClientHandlersto match the already-sealedMcpServerHandlersMcpServerOptions.Handlers,McpServerOptions.Filters, and allIList<T>filter properties settable with null validationRemove server back-references from protocol DTO types #1345
Tool.McpServerTool,Prompt.McpServerPrompt,Resource.McpServerResource, andResourceTemplate.McpServerResourcepropertiesMcpServerPrimitiveCollection.TryGetPrimitive()for name-based lookups insteadMake Tool.Name required to match other protocol types #1351
requiredmodifier toTool.Name, matchingPrompt.Name,Resource.Name, and otherIBaseMetadataimplementationsNamein object initializersMake LoggingMessageNotificationParams.Data required per MCP spec #1353
LoggingMessageNotificationParams.DatafromJsonElement?torequired JsonElementper the MCP specificationFix CreateMessageRequestParams.Metadata type to JsonObject #1354
CreateMessageRequestParams.MetadatafromJsonElement?toJsonObject?to match all other_meta/Metaproperties in the SDKNormalize CallToolResult.StructuredContent to JsonElement? #1357
CallToolResult.StructuredContentfromJsonNode?toJsonElement?for consistency with the rest of the SDKJsonSerializer.SerializeToElement()to produce aJsonElementUnify service configuration for
ISseEventStreamStore,IMcpTaskStore, andISessionMigrationHandler#1362Add explicit [Experimental] protected constructors to McpClient and McpServer #1363
McpClientandMcpServernow require suppressingMCPEXP002to subclassRemove MCP9002 obsolete APIs and document obsolete diagnostics #1366
AddXxxFilterextension methods onIMcpServerBuilder(e.g.AddCallToolFilter,AddListToolsFilter) that were deprecated under diagnosticMCP9002WithRequestFilters()andWithMessageFilters()insteadFix McpClientPrompt/Resource types to use RequestOptions like McpClientTool does #1370
JsonSerializerOptionswithRequestOptionsparameter for consistency acrossMcpClientPrompt,McpClientResource, andMcpClientToolWhat's Changed
... (truncated)
0.9.0-preview.2
This release focuses on API surface consistency and correctness ahead of 1.0.0. Public collection properties are now typed as
IList<T>instead of concreteList<T>orT[], andRoot.Metais aligned with the rest of the protocol DTOs by usingJsonObject?. Other improvements include new experimental Extensions support for capabilities, missingResourceLinkBlockproperties, improved mimeType handling, and several documentation and test reliability fixes.We plan to release the stable 1.0.0 release early in the week of February 23, 2026.
Breaking Changes
Refer to the C# SDK Versioning documentation for details on versioning and breaking change policies.
Replace concrete collection types with interfaces in public API surface #1326
List<T>andT[]properties onProtectedResourceMetadata,ToolResultContentBlock,ListTasksResult, andDynamicClientRegistrationResponsechanged toIList<T>. Replace.Lengthwith.Countand cast toList<T>ifList<T>-specific members are needed.Fix
Root.Metato useJsonObjectinstead ofJsonElement#1341Root.Metachanged fromJsonElement?toJsonObject?. Replacemeta.Value.GetProperty("key").GetString()with(string?)meta["key"].Make
UrlElicitationRequiredErrorData.Elicitationsconsistent with other Protocol DTOs #1335Elicitationschanged fromIReadOnlyList<ElicitRequestParams>withinittoIList<ElicitRequestParams>withset. Code usingList<T>is unaffected since it implements both interfaces.What's Changed
options ??= new()in McpServerImpl constructor #1322 by @stephentoub (co-authored by @Copilot)_connectCtsfield fromMcpClientImpl#1323 by @stephentoub (co-authored by @Copilot)Documentation Updates
Test Improvements
Repository Infrastructure Updates
Acknowledgements
... (truncated)
0.9.0-preview.1
The 0.9.0-preview.1 release includes multiple breaking changes focused on quality, extensibility, usability, and API consistency as we continue refining the SDK in preparation for a stable 1.0.0 release.
We plan to release the stable 1.0.0 release early in the week of February 23, 2026.
Breaking Changes
Refer to the C# SDK Versioning documentation for details on versioning and breaking change policies.
Use ReadOnlyMemory<byte> for binary data to eliminate UTF-16 transcoding #1070
ImageContentBlock.Data,AudioContentBlock.Data, andBlobResourceContents.Blobchanged fromstringtoReadOnlyMemory<byte>;FromImage/FromAudiorenamed toFromBytes;BlobResourceContents.Datarenamed toDecodedDataDecodedDatafor decoded bytes andFromBytes(...)factory methodsSplit configuration of request and message filters #1308
Add*Filterextension methods onIMcpServerBuilderreplaced byWithMessageFiltersandWithRequestFilterscallbacks with grouped builder instancesDon't treat McpServerHandlers as an independent options type #1313
McpServerHandlersno longer resolved viaIOptions<McpServerHandlers>; handlers set directly onMcpServerOptions.HandlersMcpServerOptionsdirectlyAdd
ISessionMigrationHandler#1270initializerequestModelContextProtocol.AspNetCore.AllowNewSessionForNonInitializeRequests=truerestores previous behaviorChange ProtectedResourceMetadata URI properties to strings #1264
Uri?/List<Uri>tostring?/List<string>to avoid unwanted URI normalizationUriobjectsHide experimental types from external source generators using internal property pattern #1301
[JsonIgnore]+ internal delegate pattern; external source generators no longer reference experimental typesValidate MCP-Protocol-Version header in Streamable HTTP handler #1277
Update McpErrorCode and fix error code usage to align with MCP spec #1291
MethodNotFoundtoInvalidParamsWhat's Changed
... (truncated)
0.8.0-preview.1
The 0.8.0-preview.1 release includes new server-side capabilities including message-level filters and a distributed cache-backed event stream store, along with several bug fixes for transport reliability. This release also includes a breaking change that seals public Protocol reference types to prevent external inheritance, reinforcing the SDK's API contract as we continue refining toward a stable 1.0.0 release.
Breaking Changes
Refer to the C# SDK Versioning documentation for details on versioning and breaking change policies.
JsonRpcMessageContext,ElicitRequestParams.RequestSchema,ElicitRequestParams.LegacyTitledEnumSchema,ContentBlock.Converter,ResourceContents.Converter,PrimitiveSchemaDefinition.ConverterElicitRequestParams.EnumSchemaremoved; useLegacyTitledEnumSchemadirectlyEnumSchemareferences withLegacyTitledEnumSchemaWhat's Changed
DistributedCacheEventStreamStore#1136 by @MackinnonBuck (co-authored by @halter73)Documentation Updates
Test Improvements
Repository Infrastructure Updates
... (truncated)
0.7.0-preview.1
The 0.7.0-preview.1 release adds MCP task support, Streamable HTTP resumability with SSE event stream storage, and support for the 2025-11-25 protocol version. This release also introduces user-defined
JsonSerializerOptionsthroughout SDK serialization APIs and includes several bug fixes for elicitation, source generator diagnostics, and URI template matching. The Streamable HTTP transport includes breaking changes toStreamableHttpServerTransportas part of the resumability implementation.Breaking Changes
Refer to the C# SDK Versioning documentation for details on versioning and breaking change policies.
StreamableHttpServerTransport.OnInitRequestReceivedproperty removed; replaced byEventStreamStorefor resumability supportStreamableHttpServerTransport.SessionIdsetter changed from{ get; set; }to{ get; init; }OnInitRequestReceivedusage; useISseEventStreamStoreviaEventStreamStorefor resumability. SetSessionIdin the object initializer instead of post-construction assignment.What's Changed
{+var}) when matching resources #1142 by @halter73Documentation Updates
Test Improvements
Client_CanResumePostResponseStream_AfterDisconnection#1179 by @MackinnonBuckRepository Infrastructure Updates
Acknowledgements
Full Changelog: modelcontextprotocol/csharp-sdk@v0.6.0-preview.1...v0.7.0-preview.1
... (truncated)
0.6.0-preview.1
This release includes improvements to source generator robustness, JSON-RPC deserialization performance, and OpenTelemetry semantic convention alignment. It also adds OAuth incremental scope consent support, fixes session timeout issues, and corrects tool result message handling for sampling with tools. Several documentation improvements and new client conformance tests round out the release.
What's Changed
Documentation Updates
Test Improvements
Repository Infrastructure Updates
... (truncated)
Commits viewable in compare view.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)