scaledockhq/scaledock-skills/mcp-apps
Claude Code and agent skill by scaledockhq/scaledock-skills
- community
Checking that the SKILL.md file is still in the repository.
MCP Apps 2026-01-26: build and review interactive UI for MCP servers and hosts with the io.modelcontextprotocol/ui extension. Use when adding a ui:// HTML resource (text/html;profile=mcp-app) to an MCP tool, rendering MCP Apps views in a host, or reviewing their security: _meta.ui.resourceUri and visibility on tools; csp (connectDomains, resourceDomains, frameDomains, baseUriDomains), permissions, domain and prefersBorder on resources; the postMessage JSON-RPC bridge (ui/initialize, hostContext, hostCapabilities, ui/notifications/tool-input, tool-result, tool-cancelled, ui/message, ui/open-link, ui/update-model-context, ui/request-display-mode, ui/resource-teardown, size-changed); sandbox proxy iframes, CSP construction, display modes, theming variables, capability negotiation and text fallback; and the @modelcontextprotocol/ext-apps SDK (App, AppBridge, registerAppTool). Targets MCP Apps 2026-01-26, names the MCP Apps draft (app tools, sampling, ui/download-file), and upgrades from pre-stable drafts.
Install
npx vskill@latest install scaledockhq/scaledock-skills/mcp-appsSKILL.md
The same SKILL.md was published earlier as scaledockhq/scaledock-skills/mcp-apps.
MCP Apps
MCP Apps (SEP-1865, extension id io.modelcontextprotocol/ui) is the official Model Context Protocol extension that lets an MCP server ship an interactive HTML view for a tool. The host renders the view in a sandboxed iframe and talks to it over JSON-RPC on postMessage. It is published in the modelcontextprotocol/ext-apps repository. This skill pins the Stable specification dated 2026-01-26 and produces a server, host or view (the app inside the iframe), or a review of one, that meets its MUST-level rules.
Follow the workflow below step by step. Every rule here comes from a source in Sources, with the section it cites. The specification has no section numbers, so citations name its headings, for example (UI Resource Format, Content Requirements). When a rule and the pinned source disagree, the source wins; when the source has a newer revision than the pin, follow the refresh steps.
Inputs (fill in, or ask before starting)
- Role: MCP server that offers UI, host (an MCP client that renders views; a web host or a desktop or native host), or view author. Many tasks touch all three.
- Base MCP revision: the core revision the server and host speak. It changes where the extension capability is negotiated (see `references/ui-resources.md`). The base protocol itself is covered by the
mcpskill. - Network needs of the view: which origins it fetches from, loads scripts, styles, fonts or media from, embeds as frames, and whether it needs camera, microphone, geolocation or clipboard write.
- Target version: MCP Apps 2026-01-26 (current, the default; the version the ext-apps README marks Stable). MCP Apps pre-stable drafts are legacy: read them and upgrade from them, never author them. The MCP Apps draft is a preview (posture: name): know its message names and shapes, but do not send draft-only messages. See `references/versions.md`.
- Revision:
specification/2026-01-26/apps.mdxat ext-apps v2.0.3 (commit 82221c0), unless the user names another. - Sources: when refreshing this skill or when a rule looks out of date, list
specification/in ext-apps for a new dated folder, read the latest release notes and the commit history ofspecification/draft, then re-read every URL in Sources. Update the pins and bump the version.
Invariants
- The extension is negotiated. MCP Apps is optional and MUST be negotiated through the extensions capability under
io.modelcontextprotocol/ui; the host's settings MUST listmimeTypes, for example["text/html;profile=mcp-app"](Overview; Client<>Server Capability Negotiation, Client (Host) Capabilities). - UI resources are `ui://` HTML. The URI MUST start with
ui://,mimeTypeMUST betext/html;profile=mcp-app, content MUST be intextor base64blob, and it MUST be a valid HTML5 document (UI Resource Format, Content Requirements). - Tools link by `_meta.ui.resourceUri`. The referenced resource MUST exist on the server, and the host MUST fetch it with
resources/read. The flat_meta["ui/resourceUri"]key is deprecated (Resource Discovery, Behavior and Deprecation notice). - Text still works. Tools MUST return a meaningful
contentarray even when UI is available, and servers SHOULD provide text-only fallback for every UI-enabled tool (Client<>Server Capability Negotiation, Graceful Degradation). - Visibility is enforced by the host. The host MUST NOT list a tool to the agent unless its
visibilityincludes"model", MUST reject a view'stools/callfor a tool whosevisibilitylacks"app", and app-only tools are never callable across servers (Resource Discovery, Visibility). - Views run sandboxed. All view content MUST be rendered in sandboxed iframes (Security Implications, Iframe Sandboxing). A web host MUST put a sandbox proxy with a different origin between itself and the view, and the proxy MUST have
allow-scriptsandallow-same-origin(Sandbox proxy, items 1 and 2). - CSP comes from declared domains only. The host MUST build the CSP from
_meta.ui.csp, MUST use the restrictive default when it is omitted, MUST NOT allow undeclared domains, and MUST block connections to them (UI Resource Format, Host Behavior; Security Implications, Content Security Policy Enforcement). - The view initializes first. The view MUST send
ui/initializewithappCapabilities; the host MUST NOT send any request or notification to the view before it receivesui/notifications/initialized(App Capabilities inui/initialize; Sandbox proxy, item 6). - Tool data is delivered in order. The host MUST send
ui/notifications/tool-inputwith the complete arguments after initialization, at most once and beforetool-result; MUST stoptool-input-partialoncetool-inputis sent; MUST sendtool-resultwhen execution completes while the view is displayed; and MUST sendtool-cancelledon cancellation for any reason (MCP Apps Specific Messages, Notifications (Host → View)). - Partial input is not trusted. The view MUST NOT rely on
tool-input-partialarguments for critical operations (Notifications (Host → View),ui/notifications/tool-input-partial). - Teardown is announced. The host MUST send
ui/resource-teardownbefore tearing down a view for any reason, and SHOULD wait for the response to prevent data loss (Notifications (Host → View),ui/resource-teardown). - Display modes are declared on both sides. The view MUST declare its modes in
appCapabilities.availableDisplayModes, MUST check the host'savailableDisplayModesbefore requesting a change, and MUST handle a different mode in the reply; the host MUST NOT switch to an undeclared mode and MUST return the resulting mode (Display Modes, Requirements). - Flexible containers follow the view. When
containerDimensionshas no fixedheightorwidth, the host MUST listen forui/notifications/size-changedand resize the iframe (Container Dimensions, Host Behavior). - The sandbox proxy relays, the host decides. The proxy MUST forward every message whose method does not start with
ui/notifications/sandbox-, and SHOULD NOT create requests itself; the host MAY forward non-ui/methods to the MCP server and MAY block them or ask the user (Sandbox proxy, items 6 to 8).
Workflow
- Pick the version. Target MCP Apps 2026-01-26. If the code uses
text/vnd.mcp.ui+html,text/html+mcp, the flatui/resourceUrikey orviewport, it was written against a pre-stable draft: plan an upgrade.
-> `references/versions.md` ✓ The target is recorded as MCP Apps 2026-01-26, not a pre-stable or draft text.
- Negotiate the extension. Host: advertise
io.modelcontextprotocol/uiwithmimeTypes. Server: check it before offering UI, and advertise the extension where the base revision expects server capabilities.
-> `references/ui-resources.md` ✓ A host without the extension still gets usable text results from every tool.
- Declare the UI resource (server). Serve a
ui://resource with the profile MIME type and an HTML5 document, and putcsp,permissions,domainandprefersBorderunder_meta.uion theresources/readcontent item.
-> `references/ui-resources.md` ✓ resources/read on the URI returns one content item with mimeType: "text/html;profile=mcp-app" and every origin the view uses is declared.
- Link tools to the resource (server). Set
_meta.ui.resourceUri, choosevisibility, and splitcontent(for the model),structuredContent(for the view) and_metain results.
-> `references/ui-resources.md` ✓ Every resourceUri resolves, and app-only tools carry visibility: ["app"].
- Render in a sandbox (host). Fetch the resource, build the CSP and Permission Policy, and render it in a sandboxed iframe; on the web, through a sandbox proxy on a separate origin.
-> `references/security-and-sandbox.md` ✓ A fetch from the view to an undeclared origin is blocked, and the view cannot reach the host's DOM.
- Run the bridge (host and view). Answer
ui/initializewithprotocolVersion,hostInfo,hostCapabilitiesandhostContext; wait forinitialized; send tool input, result or cancellation; proxytools/callandresources/read; handle teardown.
-> `references/host-bridge.md` ✓ A message trace shows ui/initialize, ui/notifications/initialized, tool-input, then tool-result or tool-cancelled, and nothing sent to the view before initialized.
- Build the view. Declare
appCapabilities, applyhostContext(theme, styles, fonts, container dimensions, display mode), report size changes, and useui/message,ui/open-link,ui/update-model-contextandui/request-display-modeonly where the host advertises support.
-> `references/host-bridge.md` ✓ The view renders with its own fallback CSS variables when the host passes no styles.
- Review security. Walk the threat model: malicious HTML, sandbox escape, unauthorized tool calls, exfiltration, phishing, resource exhaustion; plus
postMessagesource checks and logging.
-> `references/security-and-sandbox.md` ✓ Each threat has a mitigation or a reason it does not apply.
- Map to the SDK if it is used. Use
registerAppToolandregisterAppResourceon servers,Appin views andAppBridgein hosts, at ext-apps 2.x on the split MCP SDK 2.x packages.
-> `references/sdk.md` ✓ The installed packages match the role table, and no code depends on @modelcontextprotocol/sdk 1.x next to ext-apps 2.x.
- Upgrade (only when asked). Follow the upgrade section from the pre-stable drafts to MCP Apps 2026-01-26, or the SDK 1.x to 2.x checklist.
-> `references/versions.md` ✓ The upgraded server, host or view passes the Verify list below and renders the same view.
Verify before done
- [ ] Every UI resource URI starts with
ui://, andresources/readreturnsmimeTypeexactlytext/html;profile=mcp-appwithtextorblob. - [ ] Every tool with
_meta.ui.resourceUripoints at an existing resource and returns meaningfulcontenttext. - [ ] The host hides tools without
"model"from the agent and rejects view calls to tools without"app"or on another server. - [ ] With no
_meta.ui.csp, the view runs under the restrictive default policy; with it, only the declared origins are allowed. - [ ] The web host serves the sandbox proxy from an origin different from the host's.
- [ ] No message reaches the view before
ui/notifications/initialized;tool-inputarrives once, beforetool-result. - [ ]
ui/resource-teardownis sent and awaited before the iframe is removed. - [ ]
ui/request-display-modereturns the mode actually set, and never an undeclared one. - [ ] Both ends check
event.source(or use a transport that does) before handling apostMessage. - [ ] Nothing that exists only in the MCP Apps draft (app tools,
sampling/createMessage,ui/download-file,ui/notifications/request-teardown) is required for the app to work.
Reference index
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/mcp-apps/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/scaledockhq/scaledock-skills/mcp-apps)