[GH-ISSUE #20995] feat: Support for MCP Apps Extension (Interactive UI in Chat) #34884

Closed
opened 2026-04-25 09:03:53 -05:00 by GiteaMirror · 12 comments
Owner

Originally created by @IngoKiy on GitHub (Jan 28, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20995

Check Existing Issues

  • I have searched for all existing open AND closed issues and discussions for similar requests. I have found none that is comparable to my request.

Verify Feature Scope

  • I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions.

Problem Description

Currently, OpenWebUI's MCP integration is limited to tool calls that return text/structured data. As noted in the documentation:

"MCP tools exposed via mcpo cannot use Open WebUI's event system for real-time UI updates (status messages, notifications, user input prompts). These features are only available for native Python tools."

This means MCP servers cannot render interactive UI elements like charts, forms, dashboards, or media players directly in the chat. Users have been asking about this capability (see #16327).

Desired Solution you'd like

Add support for the MCP Apps Extension (SEP-1865), the official standard for interactive UIs in MCP.
MCP Apps allows MCP servers to:

Return interactive HTML/JS UIs that render in sandboxed iframes
Enable bidirectional communication between the UI and the host via JSON-RPC
Support use cases like data visualization, forms, media players, multi-step workflows

Alternatives Considered

No response

Additional Context

Why now?

MCP Apps is now official – The spec was finalized and the SDK (@modelcontextprotocol/ext-apps) is published (v1.0.1)
Industry adoption – Claude, ChatGPT, VS Code, and Goose already support MCP Apps
Collaborative standard – Developed jointly by Anthropic, OpenAI, and the MCP-UI community
SDK available for hosts – @modelcontextprotocol/ext-apps/app-bridge provides the host-side implementation
Reference implementation exists – MCP-UI has contributed iframe/sandboxing logic that OSS clients can use

Technical Overview
MCP Apps uses a two-part pattern:

Tool with UI metadata – Tools include _meta.ui.resourceUri pointing to a UI resource
UI Resource – HTML content served via ui:// scheme, rendered in sandboxed iframe

typescript// Server registers tool with UI link
registerAppTool(server, "visualize-data", {
description: "Show interactive chart",
inputSchema: { /* ... / },
_meta: { ui: { resourceUri: "ui://charts/interactive" } }
}, async () => { /
... */ });
The host:

Detects _meta.ui.resourceUri in tool response
Fetches the UI resource
Renders it in a sandboxed iframe
Bridges communication via postMessage using MCP JSON-RPC

Resources

Specification: https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/draft/apps.mdx
SDK & Examples: https://github.com/modelcontextprotocol/ext-apps
Host Bridge SDK: https://modelcontextprotocol.github.io/ext-apps/api/modules/app-bridge.html
MCP-UI (reference implementation): https://github.com/MCP-UI-Org/mcp-ui
Announcement blog post: https://modelcontextprotocol.io/blog/mcp-apps

Additional context
This would make OpenWebUI one of the first open-source chat interfaces to support the full MCP Apps standard, significantly expanding what MCP servers can do. The existing MCP Streamable HTTP support in OpenWebUI is a great foundation to build on.

Originally created by @IngoKiy on GitHub (Jan 28, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/20995 ### Check Existing Issues - [x] I have searched for all existing **open AND closed** issues and discussions for similar requests. I have found none that is comparable to my request. ### Verify Feature Scope - [x] I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions. ### Problem Description Currently, OpenWebUI's MCP integration is limited to tool calls that return text/structured data. As noted in the [documentation](https://docs.openwebui.com/features/plugin/tools/openapi-servers/mcp/): "MCP tools exposed via mcpo cannot use Open WebUI's event system for real-time UI updates (status messages, notifications, user input prompts). These features are only available for native Python tools." This means MCP servers cannot render interactive UI elements like charts, forms, dashboards, or media players directly in the chat. Users have been asking about this capability (see [#16327](https://github.com/open-webui/open-webui/discussions/16327)). ### Desired Solution you'd like Add support for the MCP Apps Extension ([SEP-1865](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/1865)), the official standard for interactive UIs in MCP. MCP Apps allows MCP servers to: Return interactive HTML/JS UIs that render in sandboxed iframes Enable bidirectional communication between the UI and the host via JSON-RPC Support use cases like data visualization, forms, media players, multi-step workflows ### Alternatives Considered _No response_ ### Additional Context Why now? MCP Apps is now official – The spec was finalized and the SDK ([@modelcontextprotocol/ext-apps](https://github.com/modelcontextprotocol/ext-apps)) is published (v1.0.1) Industry adoption – Claude, ChatGPT, VS Code, and Goose already support MCP Apps Collaborative standard – Developed jointly by Anthropic, OpenAI, and the MCP-UI community SDK available for hosts – [@modelcontextprotocol/ext-apps/app-bridge](https://modelcontextprotocol.github.io/ext-apps/api/modules/app-bridge.html) provides the host-side implementation Reference implementation exists – [MCP-UI has contributed iframe/sandboxing logic](https://github.com/MCP-UI-Org/mcp-ui/pull/147) that OSS clients can use Technical Overview MCP Apps uses a two-part pattern: Tool with UI metadata – Tools include _meta.ui.resourceUri pointing to a UI resource UI Resource – HTML content served via ui:// scheme, rendered in sandboxed iframe typescript// Server registers tool with UI link registerAppTool(server, "visualize-data", { description: "Show interactive chart", inputSchema: { /* ... */ }, _meta: { ui: { resourceUri: "ui://charts/interactive" } } }, async () => { /* ... */ }); The host: Detects _meta.ui.resourceUri in tool response Fetches the UI resource Renders it in a sandboxed iframe Bridges communication via postMessage using MCP JSON-RPC Resources Specification: https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/draft/apps.mdx SDK & Examples: https://github.com/modelcontextprotocol/ext-apps Host Bridge SDK: https://modelcontextprotocol.github.io/ext-apps/api/modules/app-bridge.html MCP-UI (reference implementation): https://github.com/MCP-UI-Org/mcp-ui Announcement blog post: https://modelcontextprotocol.io/blog/mcp-apps Additional context This would make OpenWebUI one of the first open-source chat interfaces to support the full MCP Apps standard, significantly expanding what MCP servers can do. The existing MCP Streamable HTTP support in OpenWebUI is a great foundation to build on.
Author
Owner

@owui-terminator[bot] commented on GitHub (Jan 28, 2026):

🔍 Similar Issues Found

I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:

  1. #20969 feat: Add Host Capability for MCP Apps (Interactive UI Components)
    by paulelvers • Jan 27, 2026

💡 Tips:

  • If this is a duplicate, please consider closing this issue and adding any additional details to the existing one
  • If you found a solution in any of these issues, please share it here to help others

This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.

<!-- gh-comment-id:3811439828 --> @owui-terminator[bot] commented on GitHub (Jan 28, 2026): 🔍 **Similar Issues Found** I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions: 1. [#20969](https://github.com/open-webui/open-webui/issues/20969) **feat: Add Host Capability for MCP Apps (Interactive UI Components)** *by paulelvers • Jan 27, 2026* --- 💡 **Tips:** - If this is a duplicate, please consider closing this issue and adding any additional details to the existing one - If you found a solution in any of these issues, please share it here to help others *This comment was generated automatically by a bot.* Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
Author
Owner

@yannj-fr commented on GitHub (Mar 20, 2026):

https://github.com/open-webui/open-webui/pull/21639

<!-- gh-comment-id:4097758716 --> @yannj-fr commented on GitHub (Mar 20, 2026): https://github.com/open-webui/open-webui/pull/21639
Author
Owner

@ThalesMMS commented on GitHub (Mar 26, 2026):

#21639

Wasn't it merged after all? Why?

<!-- gh-comment-id:4137629363 --> @ThalesMMS commented on GitHub (Mar 26, 2026): > [#21639](https://github.com/open-webui/open-webui/pull/21639) Wasn't it merged after all? Why?
Author
Owner

@Classic298 commented on GitHub (Mar 26, 2026):

@ThalesMMS the PR is very large and messy, extremely difficult to review in scope

semi-unrelated question: why is it even needed? tools already offer Rich UI

<!-- gh-comment-id:4137984269 --> @Classic298 commented on GitHub (Mar 26, 2026): @ThalesMMS the PR is very large and messy, extremely difficult to review in scope semi-unrelated question: why is it even needed? tools already offer Rich UI
Author
Owner

@yannj-fr commented on GitHub (Mar 26, 2026):

This is the standard, MCPApps is the official extension to support UI in tools

<!-- gh-comment-id:4137991605 --> @yannj-fr commented on GitHub (Mar 26, 2026): This is the standard, MCPApps is the official extension to support UI in tools
Author
Owner

@yannj-fr commented on GitHub (Mar 26, 2026):

This is large because it has to implement security model, visibility and so on to follow the specifications

https://modelcontextprotocol.io/extensions/apps/overview

https://github.com/modelcontextprotocol/ext-apps/

<!-- gh-comment-id:4138001721 --> @yannj-fr commented on GitHub (Mar 26, 2026): This is large because it has to implement security model, visibility and so on to follow the specifications https://modelcontextprotocol.io/extensions/apps/overview https://github.com/modelcontextprotocol/ext-apps/
Author
Owner

@yannj-fr commented on GitHub (Mar 26, 2026):

Also please advise, we are eager to improve it

<!-- gh-comment-id:4138003198 --> @yannj-fr commented on GitHub (Mar 26, 2026): Also please advise, we are eager to improve it
Author
Owner

@Classic298 commented on GitHub (Mar 26, 2026):

ok let me check it out. I'll be back

<!-- gh-comment-id:4138031632 --> @Classic298 commented on GitHub (Mar 26, 2026): ok let me check it out. I'll be back
Author
Owner

@Classic298 commented on GitHub (Mar 26, 2026):

I will comment my findings to the discussion later: https://github.com/open-webui/open-webui/discussions/20915

<!-- gh-comment-id:4138034515 --> @Classic298 commented on GitHub (Mar 26, 2026): I will comment my findings to the discussion later: https://github.com/open-webui/open-webui/discussions/20915
Author
Owner

@Classic298 commented on GitHub (Mar 26, 2026):

Following up on my review — I built a proof of concept that demonstrates Open WebUI's existing Rich UI system can render MCP App ui:// resources without any core changes.

It's a single Tool file (~250 lines) that:

  • Discovers MCP tools dynamically via list/call (following MCP's tools/list + tools/call)
  • Detects _meta.ui.resourceUri on tools
  • Fetches the HTML resource from the MCP server
  • Injects server-declared CSP per the MCP Apps spec
  • Returns it as an HTMLResponse, which OWUI already renders in a sandboxed iframe

The security model (CSP directives, iframe sandbox) maps directly to what Open WebUI already provides — no double-iframe proxy or additional npm dependencies needed.

Available here: https://github.com/Classic298/open-webui-plugins/tree/main/mcp-app-bridge

Detailed findings (including a code review of the PR) are posted to the discussion at #20915.

<!-- gh-comment-id:4138760950 --> @Classic298 commented on GitHub (Mar 26, 2026): Following up on my review — I built a proof of concept that demonstrates Open WebUI's existing Rich UI system can render MCP App ui:// resources without any core changes. It's a single Tool file (~250 lines) that: - Discovers MCP tools dynamically via list/call (following MCP's tools/list + tools/call) - Detects _meta.ui.resourceUri on tools - Fetches the HTML resource from the MCP server - Injects server-declared CSP per the MCP Apps spec - Returns it as an HTMLResponse, which OWUI already renders in a sandboxed iframe The security model (CSP directives, iframe sandbox) maps directly to what Open WebUI already provides — no double-iframe proxy or additional npm dependencies needed. Available here: https://github.com/Classic298/open-webui-plugins/tree/main/mcp-app-bridge Detailed findings (including a code review of the PR) are posted to the discussion at #20915.
Author
Owner

@yannj-fr commented on GitHub (Mar 26, 2026):

Do you dispatch ui/notifications/tool-result

<!-- gh-comment-id:4138767411 --> @yannj-fr commented on GitHub (Mar 26, 2026): Do you dispatch ui/notifications/tool-result
Author
Owner

@Classic298 commented on GitHub (Mar 26, 2026):

Yes @yannj-fr — the tool now dispatches ui/notifications/tool-result per the spec.

Since a Tool can only control what goes inside the iframe (not the parent page), I implemented it as a shim: after OMContentLoaded, a synthetic MessageEvent is dispatched with source set to window.parent, carrying the JSON-RPC notification with the tool result in both content and structuredContent (if parseable as JSON).

This means apps built with the official AppBridge SDK receive the tool result via the standard protocol — no iframe same-origin needed.

The one thing that can't be done from inside the iframe alone is the app calling tools back through the host. But that maps to Open WebUI's existing sendPrompt bridge, which works without same-origin since 0.8.11 (via HITL confirmation) and with auto-submit when same-origin is enabled. Different mechanism, same outcome, and arguably better because the user sees what's happening.

Updated: https://github.com/Classic298/open-webui-plugins/tree/main/mcp-app-bridge

<!-- gh-comment-id:4138893405 --> @Classic298 commented on GitHub (Mar 26, 2026): Yes @yannj-fr — the tool now dispatches ui/notifications/tool-result per the spec. Since a Tool can only control what goes inside the iframe (not the parent page), I implemented it as a shim: after OMContentLoaded, a synthetic MessageEvent is dispatched with source set to window.parent, carrying the JSON-RPC notification with the tool result in both content and structuredContent (if parseable as JSON). This means apps built with the official AppBridge SDK receive the tool result via the standard protocol — no iframe same-origin needed. The one thing that can't be done from inside the iframe alone is the app calling tools back through the host. But that maps to Open WebUI's existing sendPrompt bridge, which works without same-origin since 0.8.11 (via HITL confirmation) and with auto-submit when same-origin is enabled. Different mechanism, same outcome, and arguably better because the user sees what's happening. Updated: https://github.com/Classic298/open-webui-plugins/tree/main/mcp-app-bridge
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#34884