MCP Apps explained: how tools put interactive screens in chat
MCP Apps lets a tool return a small interactive screen inside the chat. What it is, how it works, and a table-booking example, checked against the spec.
· Jeremy

Ask an assistant to book a table and it answers with a paragraph of text. MCP Apps lets the same tool answer with a floor plan you can tap.
A tool in MCP, the Model Context Protocol (the standard way for outside software to hand tools to an AI assistant), normally gives back text and structured data. That is enough to say "your parcel is in Lyon". It is a poor way to pick one of twelve tables on a floor plan, drag a budget slider or read a chart.
With MCP Apps, a tool can point to a web page that a supporting chat client can display inline. When you tap a table, the page can ask the server to hold it.
What is an MCP App?
MCP Apps is an extension of MCP. It adds an optional capability to the core protocol. The host needs to support the extension to render a View. This one is named io.modelcontextprotocol/ui. It started as a proposal (SEP-1865, created on 2025-11-21) and is marked Stable as of 2026-01-26.
- A host is the chat application: the one that talks to the model and draws the conversation.
- A View is the small web page the server provides, drawn by the host.
- A UI resource is how the server hands over that page: a normal MCP resource whose address starts with
ui://.
The extension defines an HTML resource type. Servers should provide a meaningful text result for clients that lack UI support.
What the interface adds
The format gives supporting hosts a common way to display a floor plan or an adjustable chart inside the conversation. The extension builds on MCP-UI and the OpenAI Apps SDK.
The tool can return a short summary in content and provide floor plan coordinates in structuredContent for the View.
How a call travels
A resource URI links the tool to the UI resource.
- The server declares both. The tool carries
_meta.ui.resourceUri, which points at aui://resource. The resource holds the HTML, with the MIME typetext/html;profile=mcp-app. - The host can read the page early. It can fetch and cache the resource when it connects, before any tool is called. The spec lists the reason: the host can review the page before anything runs.
- The model calls the tool. The host sends the call to the server as usual.
- The host draws the page in a sandboxed iframe, a web page embedded in another with strict limits, and, after the View initializes, sends it the tool's arguments and result as notifications (
ui/notifications/tool-inputandui/notifications/tool-result). - The page talks back. It can call tools on its own server, read resources, send a message into the conversation, or ask the host to open a link. All of it goes through the host, as JSON-RPC messages over
postMessage(the browser's way for an embedded page to talk to the page around it).

Two pieces, one address. Everything the page does goes through the host.
An example: picking a table
Say a restaurant runs an MCP server with a tool called find_tables. Without MCP Apps, it returns a list: "Table 4, 2 seats, 19:30. Table 7, 4 seats, 19:30." With MCP Apps, the same tool also points at a floor plan page.
This abbreviated server example follows the official quickstart. The restaurant’s data functions and schemas are omitted.
import {
registerAppResource,
registerAppTool,
RESOURCE_MIME_TYPE,
} from "@modelcontextprotocol/ext-apps/server"
const resourceUri = "ui://tables/floor-plan.html"
// The tool the model can call. `_meta.ui.resourceUri` ties it to the page.
registerAppTool(server, "find_tables", {
description: "List free tables for a date, time and party size.",
inputSchema: { /* date, time, partySize */ },
_meta: { ui: { resourceUri } },
}, async (args) => ({
content: [{ type: "text", text: "3 tables free at 19:30: 4, 7, 9." }],
structuredContent: { tables: await loadTables(args) },
}))
// The tool only the page can call, hidden from the model.
registerAppTool(server, "hold_table", {
description: "Hold a table for 10 minutes.",
inputSchema: { /* tableId */ },
_meta: { ui: { resourceUri, visibility: ["app"] } },
}, async (args) => holdTable(args))
// The page itself.
registerAppResource(server, resourceUri, resourceUri,
{ mimeType: RESOURCE_MIME_TYPE },
async () => ({
contents: [{ uri: resourceUri, mimeType: RESOURCE_MIME_TYPE, text: floorPlanHtml }],
}),
)- The text answer, "3 tables free at 19:30: 4, 7, 9.", is still there. A host that does not support MCP Apps shows it and the tool works as a plain tool. The spec says a server should provide that fallback.
visibility: ["app"]makeshold_tableinvisible to the model. The spec says a host must not put it in the agent's tool list, and must refuse a page that tries to call a tool that is not marked for apps. A "hold" button is a screen action; it is not something the model should decide to do.- The page never ships with the result baked in. It receives the result as a notification, so the same page serves every call.
On the wire, the tool definition the host sees is plain JSON:
{
"name": "find_tables",
"_meta": { "ui": { "resourceUri": "ui://tables/floor-plan.html" } }
}and the page reads the result like this, using the official client library:
import { App } from "@modelcontextprotocol/ext-apps"
const app = new App({ name: "Floor plan", version: "1.0.0" })
// Set before connect(), so the first result is not missed.
app.ontoolresult = (result) => drawTables(result.structuredContent)
button.onclick = async () => {
await app.callServerTool({ name: "hold_table", arguments: { tableId } })
}
app.connect()When the guest taps table 7, the page calls hold_table through the host, and the host forwards the call to the server. The model is not involved in that tap. If the page wants the model to know, it can send a message into the conversation (ui/message) or update what the model will see next turn (ui/update-model-context).
What keeps it safe
You are running a web page written by a server you may not control, inside a chat. The spec treats that as the main risk and answers in layers:
- A sandboxed iframe, always. "All View content MUST be rendered in sandboxed iframes." If the host is itself a web page, it also has to wrap the View in an intermediate proxy served from a different origin.
- A strict default policy. If the page declares nothing, it cannot call out: the spec's default is
connect-src 'none', so no network requests. To reach an API, the page declares the domains it needs in_meta.ui.csp(connectDomains,resourceDomains,frameDomains,baseUriDomains), and the host must block any domain not declared. - Permissions are requests. The page can ask for the camera, microphone, location or clipboard write, and the host may grant them. The spec tells apps not to assume they were.
- Everything goes through the host. The page has no direct line to the server. Its messages are JSON-RPC, which the host can log, block or hold for the user's approval.
None of this makes a page harmless. The spec itself lists the leftovers: a page can still show misleading content, and it can burn CPU. Hosts are expected to mark clearly where the sandbox begins and to cap resources.
Where it works today
MCP Apps is optional on both sides. A client says it supports the extension, with the MIME types it can draw, and a server can check that before registering a screen-enabled version of a tool. The official extension support matrix, which I read on 2 December 2026, marks MCP Apps as supported by Claude on the web, Claude Desktop, ChatGPT, VS Code with GitHub Copilot, Microsoft 365 Copilot, Cursor, Goose, Postman, MCPJam, Glean, Kiro Crew, Archestra.AI and mcp-use, and as partial in MCP Inspector. It shows no support for Claude Code, the command-line agent, or for the other terminal clients it lists. The page says the list is maintained by the community, and the README says "host support varies", so check before you promise a screen to a user.
The extension's own repository ships an SDK for the three roles: the page (@modelcontextprotocol/ext-apps), the server (@modelcontextprotocol/ext-apps/server) and the host (@modelcontextprotocol/ext-apps/app-bridge). The README says it has no supported host implementation beyond a basic example, and points to MCP-UI's client SDK as the fuller option.
What agentproto does with it
agentproto is an open-source, local-first runtime for coding agents. @agentproto/mcp-server has a registerUiResource helper that serves a page as a ui:// resource with the right MIME type, border preference and security policy. The daemon, acting as the client for a session, fetches a server's UI resources for the chat and refuses a page's call to any tool not marked visible to apps. Its app format (AIP-53) lets an app declare the ui:// views it offers. Those helpers are part of the agentproto runtime.
Start here
- Build the text-only tool first. It is your fallback.
- Add one
ui://page and one_meta.ui.resourceUri. Run it in a host that supports the extension. - Put screen-only actions behind
visibility: ["app"]. - Declare the smallest set of domains your page needs. The default is none.
- Send the screen what it needs in
structuredContent, and keep the text short.
The first time a tool answers with something you can tap, you stop thinking of it as a function that returns a string.
MCP Apps specification · Official quickstart · AIP-53 · Runtime source