What is MCP App?
Updated on
MCP Apps is an official optional Model Context Protocol extension that lets an MCP Server associate a Tool with an interactive HTML UI resource that a compatible Host renders inside the conversation.
Quick Facts
| Full Name | Model Context Protocol Application |
|---|---|
| Created | 2025 (concept emerged with MCP ecosystem growth) |
| Specification | Official Specification |
How It Works
Extension boundary
MCP Apps is the first official MCP extension, identified as io.modelcontextprotocol/ui rather than as a core Tool, Resource, or Transport primitive. It standardizes how a Server declares an interactive View and how a supporting Host embeds it. It does not define an app store, billing model, publisher trust program, business-object authorization, or universal client support.
Discovery and rendering lifecycle
The Server publishes a Tool whose _meta.ui.resourceUri points to a predeclared ui:// Resource. The Host discovers the metadata, fetches the HTML resource, creates a sandboxed iframe, completes the ui/initialize exchange, and delivers tool input and result data to the View. A resource can include UI-specific Content Security Policy and permission requests, but the Host decides what to grant.
Bidirectional data flow
The View and Host exchange a UI-specific JSON-RPC dialect over postMessage. The View can receive tool input and structured results, request an allowed Tool call, send a user-visible message, or update context when the Host exposes those capabilities. The Host remains the policy-enforcing proxy; the iframe should never receive credentials or direct authority merely because its Server supplied the HTML.
Security and consent
Iframe sandboxing blocks direct access to the Host DOM, cookies, storage, and parent execution context, but it is only one layer. Hosts should validate declared origins and CSP, minimize capabilities, require consent for consequential UI-initiated calls, apply server-side authentication and object authorization, constrain external links and data egress, log messages, and tear down the View when its lifecycle ends.
Compatibility and graceful fallback
Host support varies, and extension behavior can change independently of the core protocol. Servers should negotiate capabilities, pin and test the extension and SDK versions they ship, keep the non-UI Tool result meaningful, and test initialization, resize, reconnect, teardown, denied permissions, duplicate actions, and unsupported Hosts. Use a normal web app when the experience does not benefit from being embedded in conversational context.
Key Characteristics
- Official optional extension: a Host must advertise and implement UI support
- Tool-to-View binding: `_meta.ui.resourceUri` links a Tool to a predeclared `ui://` Resource
- Embedded interaction: compatible Hosts render HTML in a sandboxed iframe inside the conversation
- Mediated messaging: the View uses JSON-RPC over `postMessage` rather than direct Host or Server access
- Progressive enhancement: text or structured Tool results remain available when UI support is absent
- Application-owned controls: identity, authorization, consent, egress, audit, and side-effect safety remain deployment responsibilities
Common Use Cases
- Exploring charts, maps, tables, or other dense Tool results without leaving the conversation
- Collecting validated multi-field configuration that would be inefficient through repeated prompts
- Reviewing documents, media, code changes, or generated artifacts with interactive controls
- Monitoring long-running work with progress, logs, filters, and status updates
- Guiding approval or triage workflows while the Host mediates every consequential Tool call
Example
Loading code...Frequently Asked Questions
Is MCP Apps part of the official MCP standard?
Yes. MCP Apps is an official optional extension, not a mandatory core feature. A Server and Host must both support the extension for the interactive View to render, so implementations must negotiate capabilities and retain a non-UI fallback.
How is an MCP App different from an MCP Server?
An MCP Server exposes protocol capabilities such as Tools and Resources. An MCP App is the interactive UI extension layered on those capabilities: a Tool references a UI Resource, and a compatible Host renders its View. A Server can work without an App, and one Server can expose multiple UI-enabled Tools.
What happens when a Host does not support MCP Apps?
The Tool should still return useful text or structured content. The Server checks negotiated Host capabilities before relying on UI behavior, and the client simply presents the ordinary Tool result. This progressive-enhancement model prevents UI support from becoming a requirement for every MCP client.
Does the sandbox make an MCP App safe by itself?
No. The sandbox isolates browser capabilities, but the Host and Server must still enforce authentication, object-level authorization, consent, CSP, external-origin rules, result limits, audit logging, and idempotency for side effects. UI content and UI-initiated Tool arguments remain untrusted input.
When should I use a normal web app instead?
Use a normal web app when users need a standalone destination, broad browser capabilities, independent navigation, or an experience unrelated to the current conversation. MCP Apps fit best when conversational context, Tool results, and a compact interactive workflow should remain together.