MCP Apps: Extending servers with interactive user interfaces
MCP应用:通过交互式用户界面扩展服务器
Introducing the MCP Apps Extension proposal (SEP-1865) to standardize interactive user interfaces in MCP, developed with the MCP-UI creators and maintainers from OpenAI and Anthropic.
November 21, 2025 · 5 min · Anton Pidkuiko (Maintainer), Olivier Chafik (Maintainer), Ido Salomon (MCP-UI), Liad Yosef (MCP-UI), Nick Cooper (Core Maintainer), Sean Strong (Anthropic), Jerome Swannack (Anthropic), Alexi Christakis (OpenAI), Bryan Ashley (OpenAI)
Today we’re introducing the proposal for the MCP Apps Extension (SEP-1865) to standardize support for interactive user interfaces in the Model Context Protocol.
This extension addresses one of the most requested features from the MCP community and builds on proven work from MCP-UI and OpenAI Apps SDK - theability for MCP servers to deliver interactive user interfaces to hosts.
2025年11月21日 · 5分钟阅读 · 安东·皮德库伊科(维护者)、奥利维尔·查菲克(维护者)、伊多·萨洛蒙(MCP-UI)、利亚德·约瑟夫(MCP-UI)、尼克·库珀(核心维护者)、肖恩·斯特朗(Anthropic)、杰罗姆·斯万纳克(Anthropic)、亚历克西·克里斯塔基斯(OpenAI)、布莱恩·阿什利(OpenAI)
今天我们正式推出《MCP应用扩展提案》(SEP-1865),旨在标准化模型上下文协议中对交互式用户界面的支持。
该扩展解决了MCP社区最迫切需求的功能之一,并基于MCP-UI和OpenAI应用SDK的成熟技术——使MCP服务器能够向主机交付交互式用户界面。
MCP Apps Extension introduces a standardized pattern for declaring UI resources, linking them to tools, and enabling bidirectional communication between embedded interfaces and the host application.
MCP Apps扩展引入了一种标准化模式,用于声明UI资源、将其与工具链接,并实现嵌入式界面与宿主应用程序之间的双向通信。
The SEP was authored by MCP Core Maintainers at OpenAI and Anthropic, together with the MCP-UI creators and lead maintainers of the MCP UI Community Working Group.
Standardization for interactive interfaces
Currently, MCP servers are limited to exchanging text and structured data with hosts. While this works well for many use cases, it creates friction when tools need to present visual information or gather complex user input.
For example, consider a data visualization MCP server that returns chart data as JSON. The host application must interpret that data and render it. Handling all kinds of specialized data in this scenario translates to a significant burden for client developers, who would need to build their own logic to render the UI. As more UI requirements come up, like the need to collect multiple related settings from users, the complexity balloons. Alternatively, without UI support, these interactions become awkward exchanges of text prompts and responses.
The MCP community has been creative in working around these limitations, but different implementations using varying conventions and architectures make it harder for servers to work consistently across clients. This lack of standardization creates a real risk of ecosystem fragmentation - something we’re working to proactively prevent.
交互界面标准化
目前,MCP服务器仅限于与主机交换文本和结构化数据。虽然这在许多场景下运作良好,但当工具需要呈现可视化信息或收集复杂的用户输入时,就会产生摩擦。
例如,假设一个数据可视化MCP服务器以JSON格式返回图表数据,主机应用必须解析这些数据并进行渲染。在这种情况下,处理各类专用数据会给客户端开发者带来沉重负担——他们需要自行构建UI渲染逻辑。随着更多界面需求的涌现(例如需要从用户处收集多个关联设置),复杂度会急剧膨胀。反之,若缺乏UI支持,这些交互就会退化为笨拙的文本提示与响应交换。
MCP社区已发挥创意来应对这些限制,但不同实现采用各异的约定和架构,导致服务器难以跨客户端保持一致性。这种标准化缺失确实存在生态系统碎片化的风险——我们正积极致力于预防这种情况。
Building together
The MCP-UI project, created by Ido Salomon and Liad Yosef and maintained by a dedicated community, spearheaded the vision of agentic apps with interactive interfaces. The project developed patterns for delivering rich user interfaces as first-class MCP resources, proving that agentic apps fit naturally within the MCP architecture. The project is backed by a large community and provides rich SDKs, adopted at leading companies and projects such as Postman, Shopify, Hugging Face, Goose, and ElevenLabs.
The OpenAI Apps SDK further validated the demand for rich UI experiences within conversational AI interfaces. The SDK enables developers to build rich, interactive applications inside ChatGPT using MCP as its backbone. To ensure interoperability and establish consistent security and usage patterns across the ecosystem, Anthropic, OpenAI, and MCP-UI are collaborating to create an official MCP extension for interactive interfaces.
共同构建 MCP-UI项目由Ido Salomon和Liad Yosef创建,并由一个专注的社区维护,率先提出了具有交互界面的代理应用愿景。该项目开发了将丰富用户界面作为一等MCP资源交付的模式,证明了代理应用天然契合MCP架构。该项目得到大型社区支持,提供丰富的SDK,已被Postman、Shopify、Hugging Face、Goose和ElevenLabs等领先企业和项目采用。
OpenAI应用SDK进一步验证了对话式AI界面中对丰富UI体验的需求。该SDK使开发者能够以MCP为骨干,在ChatGPT内部构建丰富的交互式应用程序。为确保生态系统的互操作性并建立统一的安全和使用模式,Anthropic、OpenAI和MCP-UI正在合作创建用于交互界面的官方MCP扩展。
MCP Apps Extension specification
We’re proposing a specification for UI resources in MCP, but the implications go further than just a set of schema changes. The MCP Apps Extension is starting to look like an agentic app runtime: a foundation for novel interactions between AI models, users, and applications. The proposal is intentionally lean, starting with core patterns that we plan on expanding over time.
MCP应用扩展规范
我们提出了一项针对MCP中UI资源的规范,但其影响远不止于一组模式变更。MCP应用扩展正逐渐演变为一个智能应用运行时环境:为AI模型、用户和应用程序之间实现新型交互奠定基础。该提案有意保持精简,从核心模式入手,并计划随时间推移逐步扩展。
Key design decisions
Pre-declared resources
UI templates are resources with theui://URI scheme, referenced in tool metadata.
// Server registers UI resource { uri: "ui://charts/bar-chart", name: "Bar Chart Viewer", mimeType: "text/html+mcp" } // Tool references it in metadata { name: "visualize_data_as_bar_chart", description: "Plots some data as a bar chart", inputSchema: { type: "object", properties: { series: { type: "array", items: .... } } }, _meta: { "ui/resourceUri": "ui://charts/bar-chart", } }This approach enables hosts to prefetch and review templates before tool execution, improving both performance and security. It also separates static presentation (the template) from dynamic data (tool results), enabling better caching.
MCP transport for communication
Instead of inventing a custom message protocol, UI components communicate with hosts using existing MCP JSON-RPC base protocol overpostMessage. This means that:
- UI developers can use the standard
@modelcontextprotocol/sdkto build their applications - All communication is structured and auditable
- Future MCP features automatically work with the UI extension
MCP通信传输
UI组件无需创建自定义消息协议,而是通过现有的MCP JSON-RPC基础协议,利用postMessage与主机进行通信。这意味着:
- UI开发者可以使用标准的@modelcontextprotocol/sdk来构建应用程序
- 所有通信都是结构化的且可审计
- 未来的MCP功能将自动与UI扩展兼容
Starting with HTML
The initial extension specification supports onlytext/htmlcontent, rendered in sandboxed iframes. This provides:
- Universal browser support
- Well-understood security model
- Screenshot and preview generation capabilities
- A clear baseline for future extensions
Other content types such as external URLs, remote DOM, and native widgets are explicitly deferred to future iterations.
从HTML开始
初始扩展规范仅支持在沙盒iframe中渲染的text/html内容。这提供了:
- 通用的浏览器支持
- 易于理解的安全模型
- 截图和预览生成功能
- 为未来扩展奠定清晰基准
其他内容类型(如外部URL、远程DOM和原生组件)明确推迟至后续迭代实现。
Security-first
Hosting interactive content from MCP servers requires careful security consideration. The proposal addresses this through multiple layers:
- Iframe sandboxing: All UI content runs in sandboxed iframes with restricted permissions
- Predeclared templates: Hosts can review HTML content before rendering
- Auditable messages: All UI-to-host communication goes through loggable JSON-RPC
- User consent: Hosts can require explicit approval for UI-initiated tool calls
These mitigations create defense in depth against malicious servers while preserving the flexibility developers need.
Backward compatibility
MCP Apps is an optional extension. Existing implementations continue working without changes, and hosts can gradually adopt UI support at their own pace. Servers should provide text-only fallback for all UI-enabled tools and return meaningful content even when UI is unavailable, so they can serve both UI-capable and text-only hosts.
安全优先
托管来自MCP服务器的交互式内容需要谨慎考虑安全性。该提案通过多层防护措施解决这个问题:
Iframe沙盒:所有UI内容都在权限受限的沙盒iframe中运行 预声明模板:主机在渲染前可以审查HTML内容 可审计消息:所有UI到主机的通信都通过可记录的JSON-RPC协议 用户授权:主机可以要求对UI发起的工具调用进行显式批准 这些缓解措施在保持开发者所需灵活性的同时,构建了针对恶意服务器的深度防御体系。
向后兼容性 MCP应用是可选扩展功能。现有实现无需修改即可继续运行,主机可以按自身节奏逐步采用UI支持。服务器应为所有支持UI的工具提供纯文本回退方案,即使在UI不可用时也返回有意义的内容,从而同时服务于支持UI和仅支持纯文本的主机。
What’s next
The UI Community Working Group has been instrumental in shaping this proposal through extensive feedback and discussion. We have built an early access SDK to demonstrate the patterns and types described in the specification proposal. The MCP-UI client and server SDKs support these patterns.
https://github.com/modelcontextprotocol-community/working-groups/issues/35
If you are interested in contributing to this effort, we invite you to:
- Review the full specification in SEP-1865
- Share feedback and concerns in GitHub Issues
- Join the discussion in the
#ui-wgchannel in the MCP Contributors Discord - Test prototype implementations and share your experience
接下来是什么 UI社区工作组通过广泛的反馈和讨论,在制定这一提案中发挥了重要作用。我们构建了一个早期访问SDK,以演示规范提案中描述的模式和类型。MCP-UI客户端和服务器SDK支持这些模式。
如果您有兴趣参与这项工作,我们邀请您:
在SEP-1865中查看完整的规范 在GitHub Issues中分享反馈和意见 加入MCP贡献者Discord中的#ui-wg频道讨论 测试原型实现并分享您的体验
Acknowledgements
This proposal wouldn’t exist without the work of the maintainers at MCP-UI, OpenAI, and Anthropic.
Ido SalomonandLiad Yosef, through MCP-UI and moderation of#ui-wg, incubated and championed many of the patterns that MCP Apps now standardizes, and together with contributors demonstrated that UI resources can be a natural part of MCP.
Sean Strong,Olivier Chafik,Anton Pidkuiko, andJerome Swannackfrom Anthropic helped steer the initiative and drive the collaboration.
Nick Cooper,Alexei Christakis, andBryan Ashleyfrom OpenAI have provided valuable direction from their experience building the Apps SDK.
Special thanks to theUI Community Working Groupmembers and everyone who contributed to the discussions that shaped this proposal.
致谢
如果没有MCP-UI、OpenAI和Anthropic维护团队的工作,就不会有这份提案的诞生。
Ido Salomon和Liad Yosef通过MCP-UI以及对#ui-wg频道的主持,孵化并推动了许多如今被MCP Apps标准化的模式。他们与贡献者们共同证明了UI资源可以成为MCP的自然组成部分。
来自Anthropic的Sean Strong、Olivier Chafik、Anton Pidkuiko和Jerome Swannack帮助引导了这一倡议并推动了合作。
来自OpenAI的Nick Cooper、Alexei Christakis和Bryan Ashley根据他们在构建Apps SDK方面的经验,提供了宝贵的方向性指导。
特别感谢UI社区工作组的成员以及所有参与讨论并塑造了这份提案的人。
---