Skip to content

docs(spec): clarify ui.domain is host-dependent - #309

Merged
ochafik merged 1 commit into
mainfrom
ochafik/spec-ui-domain-clarification
Jan 21, 2026
Merged

docs(spec): clarify ui.domain is host-dependent#309
ochafik merged 1 commit into
mainfrom
ochafik/spec-ui-domain-clarification

Conversation

@ochafik

@ochafik ochafik commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Clarifies that ui.domain format and validation rules are host-dependent, addressing the gap between the spec's previous implied flexibility and real-world constraints.

Fixes: Addresses feedback from https://github.com/anthropics/apps/pull/19201#issuecomment-3769736628

Changes

Updates the ui.domain field documentation to:

  1. Clarify host-dependency: The format and validation rules for ui.domain are determined by each host
  2. Add common patterns:
    • Hash-based subdomains (e.g., {hash}.claudemcpcontent.com)
    • URL-derived subdomains (e.g., www-example-com.oaiusercontent.com)
  3. Update examples: Replace unrealistic https://weather-widget.example.com with actual host-controlled domain patterns
  4. Improve description: Clarify purpose (OAuth callbacks, CORS policies, API key allowlists) and behavior when omitted

Rationale

The previous spec example https://weather-widget.example.com implied servers could specify arbitrary domains. In practice, hosts cannot serve UI from arbitrary domains - they must control the domain for security. Each host determines its own domain format and validation rules.

This change sets realistic expectations for server developers while keeping the spec generic enough to accommodate different host implementations.

@pkg-pr-new

pkg-pr-new Bot commented Jan 20, 2026

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/ext-apps

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

@modelcontextprotocol/server-basic-react

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-basic-react@309

@modelcontextprotocol/server-basic-vanillajs

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-basic-vanillajs@309

@modelcontextprotocol/server-budget-allocator

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-budget-allocator@309

@modelcontextprotocol/server-cohort-heatmap

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-cohort-heatmap@309

@modelcontextprotocol/server-customer-segmentation

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-customer-segmentation@309

@modelcontextprotocol/server-map

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-map@309

@modelcontextprotocol/server-pdf

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-pdf@309

@modelcontextprotocol/server-scenario-modeler

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-scenario-modeler@309

@modelcontextprotocol/server-shadertoy

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-shadertoy@309

@modelcontextprotocol/server-sheet-music

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-sheet-music@309

@modelcontextprotocol/server-system-monitor

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-system-monitor@309

@modelcontextprotocol/server-threejs

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-threejs@309

@modelcontextprotocol/server-transcript

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-transcript@309

@modelcontextprotocol/server-video-resource

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-video-resource@309

@modelcontextprotocol/server-wiki-explorer

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-wiki-explorer@309

commit: 8382c7d

Update the spec to clarify that:
- ui.domain format and validation rules are host-dependent
- Servers must consult host-specific documentation for expected format
- Common patterns: hash-based subdomains, URL-derived subdomains
- Updated examples to reflect realistic host-controlled domains

This addresses the gap between the spec's previous implied flexibility
(arbitrary domains like weather-widget.example.com) and real-world
constraints where hosts must control sandbox domains for security.
@ochafik
ochafik force-pushed the ochafik/spec-ui-domain-clarification branch from e2e256d to 8382c7d Compare January 20, 2026 13:39
@ochafik
ochafik requested review from antonpk1 and idosal January 20, 2026 13:42
@ochafik
ochafik marked this pull request as ready for review January 20, 2026 13:42

@jonathanhefner jonathanhefner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What mechanism should apps use to switch between different ui.domain values? For example, an MCP App written to run in either Claude or ChatGPT.

@ochafik

ochafik commented Jan 21, 2026

Copy link
Copy Markdown
Contributor Author

What mechanism should apps use to switch between different ui.domain values? For example, an MCP App written to run in either Claude or ChatGPT.

@jonathanhefner Servers should switch on server.getClientVersion().name to recognize the Claudes and ChatGPTs

@ochafik
ochafik merged commit 1781389 into main Jan 21, 2026
18 of 19 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.

2 participants