Skip to content

fix: preserve experimental capability settings#721

Merged
idosal merged 1 commit into
modelcontextprotocol:mainfrom
victor-openai:dev/victor/preserve-experimental
Jul 22, 2026
Merged

fix: preserve experimental capability settings#721
idosal merged 1 commit into
modelcontextprotocol:mainfrom
victor-openai:dev/victor/preserve-experimental

Conversation

@victor-openai

Copy link
Copy Markdown
Contributor

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.

@victor-openai
victor-openai marked this pull request as ready for review July 20, 2026 23:20
@pkg-pr-new

pkg-pr-new Bot commented Jul 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/ext-apps

npm i https://pkg.pr.new/@modelcontextprotocol/ext-apps@721

@modelcontextprotocol/server-basic-preact

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-preact@721

@modelcontextprotocol/server-basic-react

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-react@721

@modelcontextprotocol/server-basic-solid

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-solid@721

@modelcontextprotocol/server-basic-svelte

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-svelte@721

@modelcontextprotocol/server-basic-vanillajs

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-vanillajs@721

@modelcontextprotocol/server-basic-vue

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-vue@721

@modelcontextprotocol/server-budget-allocator

npm i https://pkg.pr.new/@modelcontextprotocol/server-budget-allocator@721

@modelcontextprotocol/server-cohort-heatmap

npm i https://pkg.pr.new/@modelcontextprotocol/server-cohort-heatmap@721

@modelcontextprotocol/server-customer-segmentation

npm i https://pkg.pr.new/@modelcontextprotocol/server-customer-segmentation@721

@modelcontextprotocol/server-debug

npm i https://pkg.pr.new/@modelcontextprotocol/server-debug@721

@modelcontextprotocol/server-lazy-auth

npm i https://pkg.pr.new/@modelcontextprotocol/server-lazy-auth@721

@modelcontextprotocol/server-map

npm i https://pkg.pr.new/@modelcontextprotocol/server-map@721

@modelcontextprotocol/server-pdf

npm i https://pkg.pr.new/@modelcontextprotocol/server-pdf@721

@modelcontextprotocol/server-scenario-modeler

npm i https://pkg.pr.new/@modelcontextprotocol/server-scenario-modeler@721

@modelcontextprotocol/server-shadertoy

npm i https://pkg.pr.new/@modelcontextprotocol/server-shadertoy@721

@modelcontextprotocol/server-sheet-music

npm i https://pkg.pr.new/@modelcontextprotocol/server-sheet-music@721

@modelcontextprotocol/server-system-monitor

npm i https://pkg.pr.new/@modelcontextprotocol/server-system-monitor@721

@modelcontextprotocol/server-threejs

npm i https://pkg.pr.new/@modelcontextprotocol/server-threejs@721

@modelcontextprotocol/server-transcript

npm i https://pkg.pr.new/@modelcontextprotocol/server-transcript@721

@modelcontextprotocol/server-video-resource

npm i https://pkg.pr.new/@modelcontextprotocol/server-video-resource@721

@modelcontextprotocol/server-wiki-explorer

npm i https://pkg.pr.new/@modelcontextprotocol/server-wiki-explorer@721

commit: b7e9d5b

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

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 experimental as a keyed map instead of an empty object.
  • Regenerated Zod and JSON schemas so experimental is a record (preserving keys/settings) rather than z.object({}) (which strips unknown keys).
  • Extended the App ↔ Host initialization integration test to include experimental entries 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.

Comment thread src/spec.types.ts
Comment thread specification/draft/apps.mdx

@idosal idosal 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.

Awesome. Thanks @victor-openai !

@idosal
idosal merged commit c55a3a2 into modelcontextprotocol:main Jul 22, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants