What are MCP Apps, and what do they change about an MCP server's security model?
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
MCP Apps is an official MCP extension that lets a server ship interactive UI alongside its tools. A tool declares a UI resource, an HTML template. When the tool runs, the host renders that template in a sandboxed iframe inside the conversation and hands it the tool result. The UI talks to the host over postMessage using JSON-RPC, so a button can ask the host to call a tool or add a message to the conversation, but it never reaches the server or the model directly. It standardised a pattern that MCP-UI and OpenAI's Apps SDK had already shown people wanted.
Full worked answer
MCP Apps is an official MCP extension that lets a server ship interactive UI alongside its tools. A tool declares a UI resource, an HTML template. When the tool runs, the host renders that template in a sandboxed iframe inside the conversation and hands it the tool result. The UI talks to the host over postMessage using JSON-RPC, so a button can ask the host to call a tool or add a message to the conversation, but it never reaches the server or the model directly. It standardised a pattern that MCP-UI and OpenAI's Apps SDK had already shown people wanted.
Why it exists: some results are bad as text. A seat map, a chart you want to filter, a twelve-field form, a diff to approve line by line. Text-only tools force the model to describe what the user should simply see and click.
What changes for security is that a server now ships code that runs inside your host, in front of your user. The controls a host needs:
- Sandbox the iframe hard. Separate origin, restrictive CSP, network access only to domains the server declared up front. Undeclared egress is an exfiltration channel.
- Review templates, not just tools. Templates are declared ahead of time, so a host can fetch, cache and inspect them before rendering. A template that changes after approval is the UI version of a rug pull.
- Route every UI action through the normal consent path. A tool call triggered by a button gets the same approval gate as one the model proposed, or the UI becomes a way around your permissions.
- Keep trusted chrome outside the iframe. A server's UI can draw something that looks exactly like your approval dialog. Approvals and credential prompts must render where the iframe cannot imitate or overlay them.
- Treat UI-originated messages as untrusted content. Text the UI sends into the conversation is injection surface, same as a tool result.
The design point candidates miss is the two audiences. What the user sees and what the model sees are now different, and the model cannot act on a filter the user applied unless the UI reports it back. Decide explicitly what flows to the model, and keep a text fallback for hosts without Apps support.
What a good answer covers
- MCP Apps is an official MCP extension that lets a server ship interactive UI alongside its tools
- A tool declares a UI resource, an HTML template
- When the tool runs, the host renders that template in a sandboxed iframe inside the conversation and…
- The UI talks to the host over postMessage using JSON-RPC, so a button can ask the host to call a tool or…
- It standardised a pattern that MCP-UI and OpenAI's Apps SDK had already shown people wanted
Key terms: Sandbox the iframe hard · Review templates, not just tools
In the glossary: MCP Apps · MCP · Exfiltration channel · Rug pull · Tool call
Interviewer follow-ups to expect
The user filters a chart in the UI and then asks the model about "these results". How does the model know what they are?
Would you let a third-party server's UI trigger a write tool without a fresh approval?
Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep