You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Obsolete Roots, Sampling, and Logging surface area per SEP-2577
Mark all public API surface for the Roots, Sampling, and Logging features as
[Obsolete] in line with SEP-2577. This covers protocol DTOs, capability
properties, method-name constants, convenience methods, handlers, builders,
filters, and the related sampling/roots helpers on the input request/response
types. There is no functional or wire behavior change; the features continue to
work exactly as before.
All three features share a single diagnostic ID (MCP9005) so consumers can opt
out with one suppression, while feature-specific messages keep the diagnostics
distinguishable. Documents the new diagnostic in docs/list-of-diagnostics.md and
suppresses MCP9005 where the SDK, tests, and samples exercise the deprecated
APIs internally.
Copy file name to clipboardExpand all lines: docs/list-of-diagnostics.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,3 +38,4 @@ When APIs are marked as obsolete, a diagnostic is emitted to warn users that the
38
38
|`MCP9002`| Removed | The `AddXxxFilter` extension methods on `IMcpServerBuilder` (e.g., `AddListToolsFilter`, `AddCallToolFilter`, `AddIncomingMessageFilter`) were superseded by `WithRequestFilters()` and `WithMessageFilters()`. |
39
39
|`MCP9003`| In place | The `RequestContext<TParams>(McpServer, JsonRpcRequest)` constructor is obsolete. Use the overload that accepts a `parameters` argument: `RequestContext<TParams>(McpServer, JsonRpcRequest, TParams)`. |
40
40
|`MCP9004`| In place |<xref:ModelContextProtocol.AspNetCore.HttpServerTransportOptions.EnableLegacySse> opts into the legacy SSE transport which has no built-in HTTP-level backpressure. Use Streamable HTTP instead. See [Stateless — Legacy SSE transport](xref:stateless#legacy-sse-transport) for details. |
41
+
|`MCP9005`| In place | The Roots, Sampling, and Logging features are deprecated as of specification version 2026-07-28 and may be removed in a future version. See SEP-2577 for more information. |
publicconststringEnableLegacySse_Message="Legacy SSE transport has no built-in request backpressure and should only be used with completely trusted clients in isolated processes. Use Streamable HTTP instead.";
publicconststringDeprecatedRoots_Message="The Roots feature is deprecated as of specification version 2026-07-28 and may be removed in a future version. See SEP-2577 for more information.";
43
+
publicconststringDeprecatedSampling_Message="The Sampling feature is deprecated as of specification version 2026-07-28 and may be removed in a future version. See SEP-2577 for more information.";
44
+
publicconststringDeprecatedLogging_Message="The Logging feature is deprecated as of specification version 2026-07-28 and may be removed in a future version. See SEP-2577 for more information.";
Copy file name to clipboardExpand all lines: src/ModelContextProtocol.Core/Client/McpClient.Methods.cs
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1208,6 +1208,7 @@ public async ValueTask<ResultOrCreatedTask<CallToolResult>> CallToolRawAsync(
1208
1208
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
1209
1209
/// <returns>A task representing the asynchronous operation.</returns>
1210
1210
/// <exception cref="McpException">The request failed or the server returned an error response.</exception>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
1220
1221
/// <returns>A task representing the asynchronous operation.</returns>
1221
1222
/// <exception cref="McpException">The request failed or the server returned an error response.</exception>
0 commit comments