Skip to content

Commit 90c8531

Browse files
authored
Remove ExperimentalAttribute from official Extensions/Tasks/MRTR APIs and align MCPEXP001 usage (#1642)
1 parent e7b450e commit 90c8531

16 files changed

Lines changed: 9 additions & 62 deletions

docs/list-of-diagnostics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ If you use experimental APIs, you will get one of the diagnostics shown below. T
2727

2828
| Diagnostic ID | Description |
2929
| :------------ | :---------- |
30-
| `MCPEXP001` | Experimental APIs for features in the MCP specification itself, including Tasks and Extensions. Tasks provide a mechanism for asynchronous long-running operations that can be polled for status and results (see [SEP-2663](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/seps/2663-tasks-extension.md)). Extensions provide a framework for extending the Model Context Protocol while maintaining interoperability (see [SEP-2133](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2133)). |
30+
| `MCPEXP001` | Experimental APIs tied to MCP specification features. Reuse this ID for newly introduced experimental spec features, and add feature-specific messages/URLs in `Experimentals`. |
3131
| `MCPEXP002` | Experimental SDK APIs unrelated to the MCP specification itself, including subclassing `McpClient`/`McpServer` (see [#1363](https://github.com/modelcontextprotocol/csharp-sdk/pull/1363)) and `RunSessionHandler`, which may be removed or change signatures in a future release (consider using `ConfigureSessionOptions` instead). |
3232
| `MCPEXP003` | Experimental MCP Apps extension APIs. MCP Apps is the first official MCP extension (`io.modelcontextprotocol/ui`), enabling servers to deliver interactive UIs inside AI clients (see [MCP Apps specification](https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx)). |
3333

src/Common/Experimentals.cs

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ namespace ModelContextProtocol;
99
/// Experimental diagnostic IDs are grouped by category:
1010
/// <list type="bullet">
1111
/// <item><description>
12-
/// <c>MCPEXP001</c> covers APIs related to experimental features in the MCP specification itself,
13-
/// such as Extensions. These APIs may change as the specification evolves.
12+
/// <c>MCPEXP001</c> covers APIs related to experimental features in the MCP specification itself.
13+
/// These APIs may change as the specification evolves.
1414
/// </description></item>
1515
/// <item><description>
1616
/// <c>MCPEXP002</c> covers experimental SDK APIs that are unrelated to the MCP specification,
@@ -36,19 +36,13 @@ namespace ModelContextProtocol;
3636
internal static class Experimentals
3737
{
3838
/// <summary>
39-
/// Diagnostic ID for the experimental MCP Extensions feature.
39+
/// Diagnostic ID for experimental MCP specification features.
4040
/// </summary>
41-
public const string Extensions_DiagnosticId = "MCPEXP001";
42-
43-
/// <summary>
44-
/// Message for the experimental MCP Extensions feature.
45-
/// </summary>
46-
public const string Extensions_Message = "The Extensions feature is part of a future MCP specification version that has not yet been ratified and is subject to change.";
47-
48-
/// <summary>
49-
/// URL for the experimental MCP Extensions feature.
50-
/// </summary>
51-
public const string Extensions_Url = "https://github.com/modelcontextprotocol/csharp-sdk/blob/main/docs/list-of-diagnostics.md#mcpexp001";
41+
/// <remarks>
42+
/// When introducing a new experimental specification feature, add feature-specific message
43+
/// and URL constants that use this diagnostic ID.
44+
/// </remarks>
45+
public const string SpecificationFeature_DiagnosticId = "MCPEXP001";
5246

5347
/// <summary>
5448
/// Diagnostic ID for experimental MCP Apps extension APIs.
@@ -110,22 +104,4 @@ internal static class Experimentals
110104
/// </summary>
111105
public const string RunSessionHandler_Url = "https://github.com/modelcontextprotocol/csharp-sdk/blob/main/docs/list-of-diagnostics.md#mcpexp002";
112106

113-
/// <summary>
114-
/// Diagnostic ID for the experimental Multi Round-Trip Requests (MRTR) feature.
115-
/// </summary>
116-
/// <remarks>
117-
/// This uses the same diagnostic ID as <see cref="Extensions_DiagnosticId"/> because MRTR
118-
/// is an experimental feature in the MCP specification (SEP-2322).
119-
/// </remarks>
120-
public const string Mrtr_DiagnosticId = "MCPEXP001";
121-
122-
/// <summary>
123-
/// Message for the experimental MRTR feature.
124-
/// </summary>
125-
public const string Mrtr_Message = "The Multi Round-Trip Requests (MRTR) feature is experimental per the MCP specification (SEP-2322) and is subject to change.";
126-
127-
/// <summary>
128-
/// URL for the experimental MRTR feature.
129-
/// </summary>
130-
public const string Mrtr_Url = "https://github.com/modelcontextprotocol/csharp-sdk/blob/main/docs/list-of-diagnostics.md#mcpexp001";
131107
}

src/ModelContextProtocol.Core/Protocol/ClientCapabilities.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.ComponentModel;
2-
using System.Diagnostics.CodeAnalysis;
32
using System.Text.Json.Serialization;
43
using ModelContextProtocol.Client;
54
using ModelContextProtocol.Server;
@@ -84,7 +83,6 @@ public sealed class ClientCapabilities
8483
/// interoperability. Clients advertise extension support via this field during the initialization handshake.
8584
/// </para>
8685
/// </remarks>
87-
[Experimental(Experimentals.Extensions_DiagnosticId, UrlFormat = Experimentals.Extensions_Url)]
8886
[JsonIgnore]
8987
public IDictionary<string, object>? Extensions
9088
{

src/ModelContextProtocol.Core/Protocol/InputRequest.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System.Diagnostics.CodeAnalysis;
21
using System.Text.Json;
32
using System.Text.Json.Serialization;
43

@@ -20,7 +19,6 @@ namespace ModelContextProtocol.Protocol;
2019
/// parameters can be accessed via the typed accessor properties.
2120
/// </para>
2221
/// </remarks>
23-
[Experimental(Experimentals.Mrtr_DiagnosticId, UrlFormat = Experimentals.Mrtr_Url)]
2422
[JsonConverter(typeof(Converter))]
2523
public sealed class InputRequest
2624
{

src/ModelContextProtocol.Core/Protocol/InputRequiredException.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System.Diagnostics.CodeAnalysis;
2-
31
namespace ModelContextProtocol.Protocol;
42

53
/// <summary>
@@ -54,7 +52,6 @@ namespace ModelContextProtocol.Protocol;
5452
/// }
5553
/// </code>
5654
/// </example>
57-
[Experimental(Experimentals.Mrtr_DiagnosticId, UrlFormat = Experimentals.Mrtr_Url)]
5855
public class InputRequiredException : Exception
5956
{
6057
/// <summary>

src/ModelContextProtocol.Core/Protocol/InputRequiredResult.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System.Diagnostics.CodeAnalysis;
21
using System.Text.Json.Serialization;
32

43
namespace ModelContextProtocol.Protocol;
@@ -22,7 +21,6 @@ namespace ModelContextProtocol.Protocol;
2221
/// This type is part of the Multi Round-Trip Requests (MRTR) mechanism defined in SEP-2322.
2322
/// </para>
2423
/// </remarks>
25-
[Experimental(Experimentals.Mrtr_DiagnosticId, UrlFormat = Experimentals.Mrtr_Url)]
2624
public sealed class InputRequiredResult : Result
2725
{
2826
/// <summary>

src/ModelContextProtocol.Core/Protocol/InputResponse.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System.Diagnostics.CodeAnalysis;
21
using System.Text.Json;
32
using System.Text.Json.Serialization;
43
using System.Text.Json.Serialization.Metadata;
@@ -21,7 +20,6 @@ namespace ModelContextProtocol.Protocol;
2120
/// the corresponding <see cref="InputRequest.Method"/> key in the <see cref="InputRequiredResult.InputRequests"/> map.
2221
/// </para>
2322
/// </remarks>
24-
[Experimental(Experimentals.Mrtr_DiagnosticId, UrlFormat = Experimentals.Mrtr_Url)]
2523
[JsonConverter(typeof(Converter))]
2624
public sealed class InputResponse
2725
{

src/ModelContextProtocol.Core/Protocol/RequestParams.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System.Diagnostics.CodeAnalysis;
21
using System.Text.Json.Nodes;
32
using System.Text.Json.Serialization;
43

@@ -36,7 +35,6 @@ private protected RequestParams()
3635
/// the value is the client's response to that input request.
3736
/// </para>
3837
/// </remarks>
39-
[Experimental(Experimentals.Mrtr_DiagnosticId, UrlFormat = Experimentals.Mrtr_Url)]
4038
[JsonIgnore]
4139
public IDictionary<string, InputResponse>? InputResponses
4240
{
@@ -59,7 +57,6 @@ public IDictionary<string, InputResponse>? InputResponses
5957
/// exact value without modification.
6058
/// </para>
6159
/// </remarks>
62-
[Experimental(Experimentals.Mrtr_DiagnosticId, UrlFormat = Experimentals.Mrtr_Url)]
6360
[JsonIgnore]
6461
public string? RequestState
6562
{

src/ModelContextProtocol.Core/Protocol/ServerCapabilities.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.ComponentModel;
2-
using System.Diagnostics.CodeAnalysis;
32
using System.Text.Json.Serialization;
43
using ModelContextProtocol.Server;
54

@@ -82,7 +81,6 @@ public sealed class ServerCapabilities
8281
/// interoperability. Servers advertise extension support via this field during the initialization handshake.
8382
/// </para>
8483
/// </remarks>
85-
[Experimental(Experimentals.Extensions_DiagnosticId, UrlFormat = Experimentals.Extensions_Url)]
8684
[JsonIgnore]
8785
public IDictionary<string, object>? Extensions
8886
{

src/ModelContextProtocol.Core/Server/IMcpTaskStore.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using ModelContextProtocol.Protocol;
2-
using System.Diagnostics.CodeAnalysis;
32
using System.Text.Json;
43

54
namespace ModelContextProtocol.Server;
@@ -31,7 +30,6 @@ namespace ModelContextProtocol.Server;
3130
/// specification for details on the tasks extension.
3231
/// </para>
3332
/// </remarks>
34-
[Experimental(Experimentals.Extensions_DiagnosticId, UrlFormat = Experimentals.Extensions_Url)]
3533
public interface IMcpTaskStore
3634
{
3735
/// <summary>

0 commit comments

Comments
 (0)