Repository navigation
[Schema][Client][Server] Close MCP Apps gaps: extension negotiation checks - #429
Merged
Merged
Conversation
…hecks Add ClientGateway::supportsExtension(), Client\Builder::enableExtension() and ClientCapabilities::withExtensions(); introduce side-agnostic ExtensionInterface and deprecate ServerExtensionInterface; document attribute-based UI linkage.
chr-hertel
requested review from
CodeWithKyrian,
Nyholm and
soyuka
as code owners
August 17, 2026 23:33
This was referenced Aug 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds client-side extension negotiation and generalizes extension support across clients and servers.
Changes:
- Adds client extension registration and capability checks.
- Introduces a side-agnostic extension interface.
- Expands MCP Apps examples, discovery tests, and documentation.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/Client/Builder.php |
Adds client extension registration. |
src/Schema/ClientCapabilities.php |
Adds immutable extension merging. |
src/Server/ClientGateway.php |
Adds client extension detection. |
src/Server/Builder.php |
Accepts side-agnostic extensions. |
src/Schema/Extension/ExtensionInterface.php |
Defines the shared extension contract. |
src/Schema/Extension/ServerExtensionInterface.php |
Deprecates the server-only contract. |
src/Schema/Extension/Apps/McpApps.php |
Adopts the shared contract. |
examples/server/mcp-apps/WeatherApp.php |
Attempts text-only fallback behavior. |
docs/extensions.md |
Documents negotiation and attributes. |
CHANGELOG.md |
Records the public API changes. |
tests/Unit/Client/BuilderTest.php |
Tests client registration. |
tests/Unit/Server/ClientGatewayTest.php |
Tests extension detection. |
tests/Unit/Schema/Extension/CapabilitiesExtensionsTest.php |
Tests capability merging. |
tests/Unit/Schema/Extension/Apps/McpAppsTest.php |
Tests the shared interface. |
tests/Unit/Capability/Discovery/Fixtures/DiscoverableUiHandler.php |
Adds an attribute-discovery fixture. |
tests/Unit/Capability/Discovery/DiscoveryTest.php |
Verifies UI metadata discovery. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Follow-up to #281, closing what is left of the SEP-1865 sub-issues:
ClientGateway::supportsExtension(string $id)— check whether the client negotiated an extension (e.g.McpApps::EXTENSION_ID) before offering UI-linked tools; the mcp-apps example now degrades to text-only otherwiseClient\Builder::enableExtension()+ClientCapabilities::withExtensions()— hosts advertise extensions the same way servers doMcp\Schema\Extension\ExtensionInterfacereplacesServerExtensionInterface_meta.uilinkage (#[McpResource]/#[McpTool]withnew UiToolMeta(...)), no extra attribute neededCloses #350, closes #351, closes #352
Gap analysis: #281 already covers the schema (#350),
enableExtension()registration and example/inspector tests (#352).addUiResource(),#[McpUiResource]andUiResourceReferencefrom #351 are not needed —addResource(..., meta:)and the existing attributes carry_meta.uias-is. Nothing in the newer ext-apps draft requires server-side changes; the core spec still references ext-apps2026-01-26.