Skip to content

Mcp Apps 1 : Introducing McpApps A2UI Component#801

Merged
sugoi-yuzuru merged 8 commits intomainfrom
mcp_1_sample_agent
Mar 13, 2026
Merged

Mcp Apps 1 : Introducing McpApps A2UI Component#801
sugoi-yuzuru merged 8 commits intomainfrom
mcp_1_sample_agent

Conversation

@sugoi-yuzuru
Copy link
Collaborator

@sugoi-yuzuru sugoi-yuzuru commented Mar 9, 2026

Description

This PR introduces an Angular A2UI Component named McpApps. McpApps component leverages the McpApps API to create a double-layered iframe (iframe sandboxing) and inserts a HTML bundle (HTML/JS/CSS) passed into the component as an A2UI data input field into the inner-iframe to load arbitrary web-application into an A2UI component.

The idea is that A2UI Agent can load an MCP Application resource from an external MCP server and simply relay that application as a content of an McpApp A2UI Component.

The McpApp A2UI Component will take care of the double-layered iframing and the MCP Application's message-based communications to its host application and server. Attached is an overview of what this PR achieves.

image

In forthcoming changes, this McpApp A2UI component will integrate with the Orchestrator Agent sample and will be loading the Calculator MCP Application that was introduced in #791

Pre-launch Checklist

If you need help, consider asking for advice on the discussion board.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This PR introduces a new McpApps A2UI component for sandboxing web applications using a double iframe approach. However, the current implementation has several critical security flaws that undermine this isolation. Specifically, the sandbox iframe lacks origin validation for incoming messages, and the sandbox configuration for both the outer and inner iframes includes allow-same-origin, which allows untrusted content to potentially access the main application's DOM if they share the same origin. These issues could lead to Cross-Site Scripting (XSS) and sandbox escape. Additionally, there's a minor point about code brittleness due to bypassing type safety.

@dmandar
Copy link
Collaborator

dmandar commented Mar 9, 2026

Can we fix the Gemini code review comments first?

@sugoi-yuzuru sugoi-yuzuru force-pushed the mcp_1_sample_agent branch 3 times, most recently from ecc5226 to 773c1ac Compare March 10, 2026 14:45
Copy link
Collaborator

@jonsharkey jonsharkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, but I don't feel like I'm an expert enough in MCP or Angular to really know. I'll watch the other reviews come in too.

@sugoi-yuzuru sugoi-yuzuru requested a review from jgindin March 12, 2026 15:03
@sugoi-yuzuru sugoi-yuzuru requested a review from jgindin March 12, 2026 18:11
@sugoi-yuzuru sugoi-yuzuru requested a review from jgindin March 13, 2026 13:58
@sugoi-yuzuru sugoi-yuzuru merged commit ea53902 into main Mar 13, 2026
9 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in A2UI Mar 13, 2026
@sugoi-yuzuru sugoi-yuzuru deleted the mcp_1_sample_agent branch March 13, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants