Skip to content

Commit 9ff24d0

Browse files
halter73Copilot
andcommitted
Merge origin/main into halter73/remove-session-id-draft
Brings in PR #1579 SEP-2663 Tasks (squash dbb7a20), SEP-990 Enterprise Managed Authorization (8202bcc), SEP-2243 alignment (ed19286), ttlMs renames in McpSessionHandler (711e5bb), and several quality-of-life fixes that landed between the previous merge and today. Conflict resolutions: - src/ModelContextProtocol.Core/McpJsonUtilities.cs: keep both sides' JsonSerializable additions. Our draft additions (JsonElement, Implementation, ClientCapabilities, ServerCapabilities, LoggingLevel) coexist with origin/main's IDictionary<string,object> addition. - src/ModelContextProtocol.Core/Protocol/NotificationMethods.cs: take origin/main's renamed TaskStatusNotification value ('notifications/tasks', formerly 'notifications/tasks/status') and the updated XML docs from PR #1579. Keep all our draft additions (RelatedTaskMetaKey, SubscriptionsAcknowledgedNotification, ProtocolVersionMetaKey, ClientInfoMetaKey, ClientCapabilitiesMetaKey, LogLevelMetaKey, SubscriptionIdMetaKey). - tests/ModelContextProtocol.AspNetCore.Tests/HttpTaskIntegrationTests.cs: removed. Our pre-rebase tweak to the old SEP-1686 file is moot now that PR #1579's reimplementation deleted it; the new task tests live elsewhere. PR #1579 author addressed the reconciliation items predicted in the preview-merge analysis: '17f95f79 Fix _meta' nests tasks opt-in inside the SEP-2575 capabilities envelope (preview commit 89295fb3 no longer needed); '8b47086d Address PR feedback' fixes Failed task payload shape + JsonDocument lifetime (preview commit 8817c9fc no longer needed); '0b8944f9 Address PR feedback: docs' adds the IMcpTaskStore lifetime/ stateless docs (preview commit 072222db no longer needed). The only preview reconciliation that may still be required is gating per-request capability merge to stateful sessions only (preview commit 8b95d2ca), which is evaluated separately after this merge by re-running StatelessServerTests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2 parents c4662a2 + dbb7a20 commit 9ff24d0

121 files changed

Lines changed: 8945 additions & 11881 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<!-- Product dependencies .NET Standard -->
2626
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
2727
<PackageVersion Include="Microsoft.Bcl.Memory" Version="$(System10Version)" />
28+
<PackageVersion Include="System.Collections.Immutable" Version="$(System10Version)" />
2829
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="$(System10Version)" />
2930
<PackageVersion Include="System.IO.Pipelines" Version="$(System10Version)" />
3031
<PackageVersion Include="System.Text.Json" Version="$(System10Version)" />

ModelContextProtocol.slnx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
<Project Path="samples/ChatWithTools/ChatWithTools.csproj" />
4646
<Project Path="samples/EverythingServer/EverythingServer.csproj" />
4747
<Project Path="samples/InMemoryTransport/InMemoryTransport.csproj" />
48-
<Project Path="samples/LongRunningTasks/LongRunningTasks.csproj" />
4948
<Project Path="samples/ProtectedMcpClient/ProtectedMcpClient.csproj" />
5049
<Project Path="samples/ProtectedMcpServer/ProtectedMcpServer.csproj" />
5150
<Project Path="samples/QuickstartClient/QuickstartClient.csproj" />
5251
<Project Path="samples/QuickstartWeatherServer/QuickstartWeatherServer.csproj" />
52+
<Project Path="samples/TasksExtension/TasksExtension.csproj" />
5353
<Project Path="samples/TestServerWithHosting/TestServerWithHosting.csproj" />
5454
</Folder>
5555
<Folder Name="/Solution Items/">

docs/concepts/stateless/stateless.md

Lines changed: 504 additions & 496 deletions
Large diffs are not rendered by default.

docs/concepts/tasks/tasks.md

Lines changed: 290 additions & 519 deletions
Large diffs are not rendered by default.

docs/experimental.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Add the diagnostic ID to `<NoWarn>` in your project file:
2626
Use `#pragma warning disable` around specific call sites:
2727

2828
```csharp
29-
#pragma warning disable MCPEXP001 // The Tasks feature is experimental per the MCP specification and is subject to change.
30-
tool.Execution = new ToolExecution { ... };
29+
#pragma warning disable MCPEXP001 // The Extensions feature is part of a future MCP specification version that has not yet been ratified and is subject to change.
30+
capabilities.Extensions = new Dictionary<string, object> { ... };
3131
#pragma warning restore MCPEXP001
3232
```
3333

@@ -67,4 +67,3 @@ By placing the SDK's resolver first, MCP types are serialized using the SDK's co
6767

6868
- [Versioning](versioning.md)
6969
- [List of diagnostics](list-of-diagnostics.md#experimental-apis)
70-
- [Tasks](concepts/tasks/tasks.md) (an experimental feature)

docs/list-of-diagnostics.md

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

2424
| Diagnostic ID | Description |
2525
| :------------ | :---------- |
26-
| `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 [MCP Tasks specification](https://modelcontextprotocol.io/seps/1686-tasks)). Extensions provide a framework for extending the Model Context Protocol while maintaining interoperability (see [SEP-2133](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2133)). |
26+
| `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)). |
2727
| `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). |
2828

2929
## Obsolete APIs

docs/roadmap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The C# SDK tracks implementation of MCP spec components using the [modelcontextp
1212

1313
### Next Spec Revision
1414

15-
The next MCP specification revision is being developed in the [protocol repository](https://github.com/modelcontextprotocol/modelcontextprotocol). The C# SDK already has experimental support for [Tasks](concepts/tasks/tasks.md) (experimental in the specification), which will be updated as the specification is revised.
15+
The next MCP specification revision is being developed in the [protocol repository](https://github.com/modelcontextprotocol/modelcontextprotocol).
1616

1717
### Feedback and End-to-End Scenarios
1818

0 commit comments

Comments
 (0)