What Are MCP Apps? Interactive UI in AI Chats

MCP Apps let a tool render an interactive HTML view in the chat. Learn how the UI resource and sandbox work, and when plain text is enough.

Updated · Markdown version

MCP Apps are an extension to the Model Context Protocol that let a tool declare an interactive HTML interface, such as a chart, form or viewer, for a supporting host to render inside the conversation. Traditional MCP responses may contain text, images, resources or structured data; an MCP App adds a declared UI resource that users can interact with.

What an MCP App is

MCP (Model Context Protocol) connects an AI application to outside systems: data sources, tools and reusable prompts. A standard tool returns a result that the host prints in the chat. An MCP App extends that pattern. The tool description points to a ui:// resource, and the host can fetch and render that resource as a small web page in place.

The tool description links the tool to the UI resource. The host may preload that resource, and a model may initiate the tool call. Once rendered, the app and host exchange JSON-RPC messages; the app can request calls to tools on the MCP server through the host's controlled channel. The host remains responsible for the capabilities it permits.

How it works

  1. Declare the UI. The tool description includes _meta.ui.resourceUri, which points to a ui:// resource on the server. The host can preload that resource before the tool runs.
  2. Fetch the resource. The resource holds an HTML page, usually with its JavaScript and CSS bundled in. External origins must be listed in _meta.ui.csp.
  3. Render in a sandbox. Web hosts usually place the page in a sandboxed iframe. The app cannot read the parent page's DOM, cookies or local storage. Extra capabilities, such as camera or microphone, must be requested through _meta.ui permissions, and the host decides whether to grant them.
  4. Exchange messages. The app and host talk over postMessage using JSON-RPC. Core calls such as tools/call are reused, and app-specific methods use the ui/ prefix.

Worked example

Suppose a server exposes a list_orders tool and associates it with a table UI. A supporting host fetches the declared ui:// resource and renders it in a sandbox. After the initial result populates the table, a filter interaction can request another list_orders call through the host. If the host permits the call, the app can update with the returned data without requiring a new natural-language prompt. This is an illustrative design, not a built-in list_orders behavior.

What it is not

  • Not a replacement for a web app. An MCP App renders inside the conversation and communicates with the host through a controlled channel; the host decides which capabilities the app may use. A standalone dashboard that many people open daily may still be simpler as a web page.
  • Not a new transport. The server still speaks MCP. Only the UI channel uses postMessage in place of stdio or HTTP.
  • Not available on every client. The host must implement the extension. The client matrix at modelcontextprotocol.io lists current support.

Pitfalls

  • The app renders as a blank box. The client does not support MCP Apps, or the resource URI does not match a ui:// resource on the server. Check the client matrix, then confirm the resourceUri string matches the resource exactly.
  • External scripts fail to load. The origin is missing from _meta.ui.csp, so the sandbox blocks it. Add the origin explicitly and reload the conversation.
  • Camera or microphone prompts never appear. The resource did not request the permission, or the host declined it. Request only what the feature needs.
  • Users see stale data. The app caches the first tool result. Have the app call the tool again on interaction, or push fresh results from the host.
  • The non-UI result is too thin. Host support varies, and the overview does not promise that every unsupported client will fetch or invoke an app-enabled tool in the same way. Where the client still calls the tool, return useful text or structured data as well as the UI metadata so the result is not dependent on visual interaction alone. Test the exact target host.

When to use a skill instead

Building an MCP App starts with a server that has sound tools, so the server design comes first. The mcp-server-builder skill covers that layer: it reviews tool inputs and outputs, the tool versus resource versus prompt choice, and the transport and auth decisions. Use it before you add a UI resource, because a poorly shaped tool output gives a UI nothing reliable to render. If your task is only a one-off question about what MCP is, no skill is needed.

FAQ

Which clients can display MCP Apps? The overview lists Claude, Claude Desktop, VS Code GitHub Copilot, Microsoft 365 Copilot, Goose, Postman, MCPJam and Archestra.AI as supporting MCP Apps. Host support varies, so check the client matrix at modelcontextprotocol.io before you build a view for one specific client.

How does an MCP App get camera or microphone access? The resource asks for the capability in its _meta.ui permissions, such as microphone or camera. The host decides whether to grant it, and the sandbox still keeps the app away from the parent page, cookies and local storage.

What happens when a client cannot render the app? The extension requires host support, and behavior on an unsupported client is not guaranteed by the overview. If that client still exposes and calls the underlying tool, its ordinary text or structured result may remain useful, but the interactive view will not be available. Test the target client and provide a meaningful non-UI result where possible.

Platform Score is our assessment under a published method. It is not a safety guarantee.

Next steps

  1. Debug an MCP Server with MCP Inspector Read next.
  2. MCP Tools, Resources, and Prompts: Which to Use Read next.
  3. All guides by topic Browse everything.

Sources