Repository navigation
Conversation
Preserve capabilities.extensions in both legacy wire models and generated schemas, with round-trip coverage for every supported handshake version. Update extension documentation and affected initialization snapshots. Fixes modelcontextprotocol#3773 AI-assisted implementation and validation with Codex.
Contributor
|
@cubic-dev-ai review this PR |
@github-actions[bot] I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
1 issue found across 10 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/advanced/extensions.md">
<violation number="1" location="docs/advanced/extensions.md:29">
P2: This overstates the client-side guarantee: claim-bearing extensions are omitted from legacy advertisements when their claims are inactive, so their settings are not sent. Limit this statement to client extensions that remain advertised.</violation>
</file>
Reply to a comment to ask cubic a question or push back. It learns from your replies.
Re-trigger cubic
| `initialize` handshake has nowhere to put it, so a legacy client simply doesn't see | ||
| the extension. Design for that: an extension *augments* a server, it must not be the | ||
| The capability map rides `server/discover` on **2026-07-28** connections and the | ||
| `initialize` handshake on **2025-11-25 and earlier** connections. Both client and |
There was a problem hiding this comment.
P2: This overstates the client-side guarantee: claim-bearing extensions are omitted from legacy advertisements when their claims are inactive, so their settings are not sent. Limit this statement to client extensions that remain advertised.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docs/advanced/extensions.md, line 29:
<comment>This overstates the client-side guarantee: claim-bearing extensions are omitted from legacy advertisements when their claims are inactive, so their settings are not sent. Limit this statement to client extensions that remain advertised.</comment>
<file context>
@@ -25,9 +25,11 @@ Done. The server now advertises `io.modelcontextprotocol/ui` under
-`initialize` handshake has nowhere to put it, so a legacy client simply doesn't see
-the extension. Design for that: an extension *augments* a server, it must not be the
+The capability map rides `server/discover` on **2026-07-28** connections and the
+`initialize` handshake on **2025-11-25 and earlier** connections. Both client and
+server advertisements preserve `capabilities.extensions`, including extension
+settings, on every supported legacy version. Peers that do not support an extension
</file context>
This branch has not been deployed
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.
Legacy
initializeresponses dropcapabilities.extensionsduring wire serialization, preventing clients such as MCP Apps hosts from seeing the server's extension advertisement. Preserve the field on both legacy capability wire models, generated from a schema augmentation, across all four supported handshake versions.Adds client and server round-trip coverage for empty advertisements and nested extension settings, updates the affected initialization snapshots, and corrects the extension documentation. Unknown capability fields retain their existing filtering behavior.
Validation: 6,255 tests passed with 100% branch coverage;
strict-no-cover, Pyright, Ruff lint/format, and generated-model consistency checks passed. The full test run used cleared proxy environment variables to avoid the host's SOCKS proxy configuration affecting transport tests.Fixes #3773.
AI-assisted implementation and validation with Codex.