Skip to content

[Schema][Client][Server] Close MCP Apps gaps: extension negotiation checks - #429

Merged
chr-hertel merged 2 commits into
modelcontextprotocol:mainfrom
chr-hertel:mcp-apps-gaps
Aug 17, 2026
Merged

chr-hertel merged 2 commits into
modelcontextprotocol:mainfrom
chr-hertel:mcp-apps-gaps

Conversation

@chr-hertel

@chr-hertel chr-hertel commented Aug 17, 2026 •

Copy link
Copy Markdown
Member

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 otherwise
  • Client\Builder::enableExtension() + ClientCapabilities::withExtensions() — hosts advertise extensions the same way servers do
  • [BC Break] side-agnostic Mcp\Schema\Extension\ExtensionInterface replaces ServerExtensionInterface
  • docs + discovery test for attribute-based _meta.ui linkage (#[McpResource] / #[McpTool] with new UiToolMeta(...)), no extra attribute needed

Closes #350, closes #351, closes #352

Gap analysis: #281 already covers the schema (#350), enableExtension() registration and example/inspector tests (#352). addUiResource(), #[McpUiResource] and UiResourceReference from #351 are not needed — addResource(..., meta:) and the existing attributes carry _meta.ui as-is. Nothing in the newer ext-apps draft requires server-side changes; the core spec still references ext-apps 2026-01-26.

…hecks

Add ClientGateway::supportsExtension(), Client\Builder::enableExtension() and
ClientCapabilities::withExtensions(); introduce side-agnostic ExtensionInterface
and deprecate ServerExtensionInterface; document attribute-based UI linkage.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/Schema/Extension/Apps/McpApps.php
Comment thread docs/extensions.md
Comment thread examples/server/mcp-apps/WeatherApp.php
@chr-hertel
chr-hertel merged commit 6f58fe5 into modelcontextprotocol:main Aug 17, 2026
23 checks passed
@chr-hertel
chr-hertel deleted the mcp-apps-gaps branch August 17, 2026 23:46
@chr-hertel chr-hertel added this to the 0.8.0 milestone Aug 18, 2026
@chr-hertel chr-hertel added the Schema Issues & PRs related to the Schema component label Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Schema Issues & PRs related to the Schema component

Projects

None yet

2 participants