fix: preserve experimental capability settings#721
Merged
idosal merged 1 commit intoJul 22, 2026
Merged
Conversation
victor-openai
marked this pull request as ready for review
July 20, 2026 23:20
mstoiber-oai
approved these changes
Jul 20, 2026
@modelcontextprotocol/ext-apps
@modelcontextprotocol/server-basic-preact
@modelcontextprotocol/server-basic-react
@modelcontextprotocol/server-basic-solid
@modelcontextprotocol/server-basic-svelte
@modelcontextprotocol/server-basic-vanillajs
@modelcontextprotocol/server-basic-vue
@modelcontextprotocol/server-budget-allocator
@modelcontextprotocol/server-cohort-heatmap
@modelcontextprotocol/server-customer-segmentation
@modelcontextprotocol/server-debug
@modelcontextprotocol/server-lazy-auth
@modelcontextprotocol/server-map
@modelcontextprotocol/server-pdf
@modelcontextprotocol/server-scenario-modeler
@modelcontextprotocol/server-shadertoy
@modelcontextprotocol/server-sheet-music
@modelcontextprotocol/server-system-monitor
@modelcontextprotocol/server-threejs
@modelcontextprotocol/server-transcript
@modelcontextprotocol/server-video-resource
@modelcontextprotocol/server-wiki-explorer
commit: |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the MCP Apps capability schema so experimental capabilities sent during ui/initialize preserve their namespaced keys and associated settings, instead of being parsed into empty objects.
Changes:
- Updated App and Host capability type definitions to model
experimentalas a keyed map instead of an empty object. - Regenerated Zod and JSON schemas so
experimentalis a record (preserving keys/settings) rather thanz.object({})(which strips unknown keys). - Extended the App ↔ Host initialization integration test to include
experimentalentries and assert they round-trip correctly.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/spec.types.ts | Changes experimental capability typing from {} to a keyed record type for both host and app capabilities. |
| src/generated/schema.ts | Updates Zod schemas to validate/preserve experimental as a record rather than stripping keys via z.object({}). |
| src/generated/schema.json | Updates the emitted JSON schema to allow arbitrary additionalProperties for experimental entries instead of rejecting/stripping them. |
| src/app-bridge.test.ts | Adds coverage ensuring experimental capabilities survive the initialization handshake intact. |
| specification/draft/apps.mdx | Updates the draft specification examples/types to document the new keyed experimental shape. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
idosal
approved these changes
Jul 22, 2026
idosal
left a comment
Contributor
There was a problem hiding this comment.
Awesome. Thanks @victor-openai !
ochafik
approved these changes
Jul 22, 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.
Motivation
Experimental App and Host capability entries are parsed as empty objects, stripping namespaced declarations during
ui/initialize. Preserve their keys and settings in both capability maps.