资讯动态

MCP应用:通过交互式用户界面扩展服务器 MCP Apps: Extending servers with interactive user interfaces —— Anthropic

发布时间:2026/9/12 4:28:56 来源:尧图企业网站定制
MCP Apps: Extending servers with interactive user interfacesMCP应用通过交互式用户界面扩展服务器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 interfacesCurrently, 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 togetherThe 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 specificationWe’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 decisionsPre-declared resourcesUI 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/htmlmcp } // 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 communicationInstead 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 standardmodelcontextprotocol/sdkto build their applicationsAll communication is structured and auditableFuture MCP features automatically work with the UI extensionMCP通信传输UI组件无需创建自定义消息协议而是通过现有的MCP JSON-RPC基础协议利用postMessage与主机进行通信。这意味着UI开发者可以使用标准的modelcontextprotocol/sdk来构建应用程序所有通信都是结构化的且可审计未来的MCP功能将自动与UI扩展兼容Starting with HTMLThe initial extension specification supports onlytext/htmlcontent, rendered in sandboxed iframes. This provides:Universal browser supportWell-understood security modelScreenshot and preview generation capabilitiesA clear baseline for future extensionsOther content types such as external URLs, remote DOM, and native widgets are explicitly deferred to future iterations.从HTML开始初始扩展规范仅支持在沙盒iframe中渲染的text/html内容。这提供了通用的浏览器支持易于理解的安全模型截图和预览生成功能为未来扩展奠定清晰基准其他内容类型如外部URL、远程DOM和原生组件明确推迟至后续迭代实现。Security-firstHosting 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 permissionsPredeclared templates: Hosts can review HTML content before renderingAuditable messages: All UI-to-host communication goes through loggable JSON-RPCUser consent: Hosts can require explicit approval for UI-initiated tool callsThese mitigations create defense in depth against malicious servers while preserving the flexibility developers need.Backward compatibilityMCP 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 nextThe 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/35If you are interested in contributing to this effort, we invite you to:Review the full specification in SEP-1865Share feedback and concerns in GitHub IssuesJoin the discussion in the#ui-wgchannel in the MCP Contributors DiscordTest prototype implementations and share your experience接下来是什么 UI社区工作组通过广泛的反馈和讨论在制定这一提案中发挥了重要作用。我们构建了一个早期访问SDK以演示规范提案中描述的模式和类型。MCP-UI客户端和服务器SDK支持这些模式。如果您有兴趣参与这项工作我们邀请您在SEP-1865中查看完整的规范 在GitHub Issues中分享反馈和意见 加入MCP贡献者Discord中的#ui-wg频道讨论 测试原型实现并分享您的体验AcknowledgementsThis 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社区工作组的成员以及所有参与讨论并塑造了这份提案的人。---MCP Apps: Extending servers with interactive user interfaces

读完文章,也想定制专属网站?

尧图设计师 24 小时内与您沟通定制方案

免费获取报价