spec(draft): add split display mode - #739
Open
caseprince wants to merge 1 commit into
Open
Conversation
caseprince
force-pushed
the
case/split-display-mode-prototype
branch
3 times, most recently
from
August 4, 2026 14:43
f5cb287 to
a2a5f0d
Compare
Add a fourth McpUiDisplayMode, "split": the View is displayed in a persistent, non-overlapping region while the host's primary conversational interface remains visible and interactive. This keeps interactive Views (spreadsheets, maps, dashboards) referenceable as the conversation scrolls on, instead of losing them off-screen. - spec.types.ts + draft spec: define "split" semantics and non-goals - regenerate Zod/JSON schemas via `npm run generate:schemas` - debug-server: add a "Split" display-mode control - basic-host: advertise "split" and render the View in a resizable, docked region without remounting the iframe, so View state survives inline <-> split transitions - unit + E2E coverage for negotiation and transitions Prototype for modelcontextprotocol#684; relates to modelcontextprotocol#412 and modelcontextprotocol#430. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
caseprince
force-pushed
the
case/split-display-mode-prototype
branch
from
August 4, 2026 15:19
a2a5f0d to
a940210
Compare
caseprince
marked this pull request as ready for review
August 4, 2026 18:26
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 and Context
Rich Interactive Views (spreadsheets, maps, dashboards, CAD viewers) scroll out of sight as a conversation continues, so users lose the UI they're actively working with. #684 asks for a pinned/split-screen presentation; #412 wants the same outcome via
pip/side panels. The existinginline-alternative modes don't satisfy these use-cases:fullscreenhides the conversation, andpips floating overlay is too small for complex, information-dense visualizations or interfaces.This is a runnable design prototype - happy to redirect it into an Extensions Track SEP if maintainers prefer.
Relates to #684, #412, and #430.
Proposed semantics
splitomit it fromavailableDisplayModes, and apps accept whatever mode the host returns.splitSHOULD NOT recreate the View — it's a presentation change, and View state SHOULD survive the transition.Prototype Screenshot
Open question: how should a new display mode be introduced?
Adding a mode looks additive, but it raises two distinct compatibility questions with different roots:
split→ older host. The 2026-01-26 spec defines the app's declared mode list as a fixed set of known values, so a host that checks strictly may reject the initialization request outright — hosts built on this SDK do. Independent implementations may be more lenient; failure isn't universal, but the spec permits it.split→ older app. Here the spec is already forward-compatible (the host's advertised list isstring[]), but the SDK restricts it to the known modes. Apps built with existing SDK releases therefore reject a spec-valid initialization response from any host advertising an unknown mode — even apps that never use display modes. (Reproduced with an in-memory host/app pair:connect()rejects during initialization.)This PR also widens what the SDK accepts while
LATEST_PROTOCOL_VERSIONstays2026-01-26, so two SDK releases claiming the same protocol version would disagree about which messages are valid — and with the current SDK, a version bump alone wouldn't fix the first direction, since messages are validated before the version is selected.For maintainers: should new modes arrive via
experimentalcapabilities or a new protocol version? Should the app's declared list also become forward-compatible? And — separately fromsplit— should the SDK's host-advertised list be loosened to thestring[]the spec already defines? Happy to rework this PR to whichever shape is preferred.Changes
src/spec.types.ts: add"split"toMcpUiDisplayMode;src/generated/*regenerated vianpm run generate:schemasspecification/draft/apps.mdx: document the mode (dated stable spec untouched)examples/debug-server: add a "Split" display-mode buttonexamples/basic-host: advertisesplitand dock the View in a resizable right-hand region; only the panel's className changes, so the iframe never remounts and View state survives inline ↔ split. Demonstrates one active split View; multi-view arbitration is not implementedTesting
npm run build,npm test(375 pass),npm run prettier, typedoc validation — all greenEXAMPLE=debug-server npx playwright test tests/e2e/display-mode-split.spec.ts✅EXAMPLE=debug-server npx playwright test tests/e2e/servers.spec.ts✅ (existing goldens still match)To try it:
npm start, pick Debug MCP App Server, Call Tool, then click Split. Drag the region's left edge to resize.AI disclosure
Written primarily by Claude Code (Claude Fable 5) from my design direction and cross-checked with Codex (gpt-5.6-sol).
I reviewed the full diff and test results per the AI contribution policy.
🤖 Generated with Claude Code