Add Extensions support to ClientCapabilities and ServerCapabilities (SEP-2133)#1292
Open
Add Extensions support to ClientCapabilities and ServerCapabilities (SEP-2133)#1292
Conversation
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement support for MCP Extensions framework
Add Extensions support to ClientCapabilities and ServerCapabilities (SEP-2133)
Feb 17, 2026
stephentoub
reviewed
Feb 17, 2026
stephentoub
reviewed
Feb 17, 2026
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
stephentoub
reviewed
Feb 17, 2026
…message Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
stephentoub
reviewed
Feb 17, 2026
| public static class CapabilitiesTests | ||
| { | ||
| [Fact] | ||
| public static void ClientCapabilities_ExtensionsProperty_SerializationRoundTrip() |
Contributor
There was a problem hiding this comment.
@copilot these should be split into test files by type, one for client, one for server
Contributor
Author
There was a problem hiding this comment.
Done in b19aefd. Split into ClientCapabilitiesTests.cs (5 tests) and ServerCapabilitiesTests.cs (5 tests).
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
halter73
reviewed
Feb 17, 2026
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.
docs/list-of-diagnostics.mdto include Extensions in MCPEXP001 descriptionExtensionsproperty toClientCapabilitieswith[Experimental]attribute using MCPEXP001Extensionsproperty toServerCapabilitieswith[Experimental]attribute using MCPEXP001Original prompt
Summary
Implement support for the MCP Extensions framework defined in SEP-2133. This SEP adds an
extensionsfield to bothClientCapabilitiesandServerCapabilitiesto allow clients and servers to advertise support for MCP extensions during the initialization handshake.What changed in the spec
The last commit of SEP-2133 (
f19398725c6ef464e1f3af0214cfde3ff4f80325) adds anextensionsfield to bothClientCapabilitiesandServerCapabilitiesin the draft schema:What needs to be done in the C# SDK
1. Add
Extensions_DiagnosticId,Extensions_Message, andExtensions_Urltosrc/Common/Experimentals.csFollow the existing pattern from
Tasks. Use diagnostic IDMCPEXP002. The message should mention that the Extensions feature is experimental per the MCP specification. The URL should point tohttps://github.com/modelcontextprotocol/csharp-sdk/blob/main/docs/list-of-diagnostics.md#mcpexp002.2. Update
docs/list-of-diagnostics.mdAdd a new row to the "Experimental APIs" table for
MCPEXP002describing the MCP Extensions feature and linking to the SEP-2133 PR.3. Add
Extensionsproperty toClientCapabilities(src/ModelContextProtocol.Core/Protocol/ClientCapabilities.cs)Add the following property:
4. Add
Extensionsproperty toServerCapabilities(src/ModelContextProtocol.Core/Protocol/ServerCapabilities.cs)Add the following property:
5. Suppress
MCPEXP002in project files that already suppressMCPEXP001Add
;MCPEXP002to the<NoWarn>in the following project files (these are the ones that already suppress MCPEXP001):src/ModelContextProtocol.Core/ModelContextProtocol.Core.csprojsrc/ModelContextProtocol/ModelContextProtocol.csprojsrc/ModelContextProtocol.AspNetCore/ModelContextProtocol.AspNetCore.csproj(if it suppresses MCPEXP001)tests/ModelContextProtocol.AotCompatibility.TestApp/ModelContextProtocol.AotCompatibility.TestApp.csprojsamples/LongRunningTasks/LongRunningTasks.csprojImportant patterns to follow
Extensionsshould beIDictionary<string, object>?— this matches the existingExperimentalproperty on both classes.[Experimental]attribute uses constants fromsrc/Common/Experimentals.cs— follow the same pattern as `Tasks_Diagno...This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.