Repository navigation
Description
Summary
Give the MCP Apps examples a real second origin for the sandbox proxy, so the spec-compliant path in SEP-1865 is something we run and test, not only something we document.
This is the opt-in half of the #6910 decision. The library default will be an opaque origin with no hosted dependency. The sandboxOrigin option exists for apps that want a genuine cross-origin sandbox, and our own examples are the reference deployment for it.
Why the examples cannot just use public/sandbox.html
Both showcases already contain a public/sandbox.html. It is served from the example's own origin, so a host page at https://<example> loading https://<example>/sandbox.html is same-origin. That demonstrates nothing, and it is the same failure mode as srcdoc with one extra network round trip.
The example needs an origin that is not the example's own. One small static deployment is enough, for example mcp-sandbox.copilotkit.dev, serving a single versioned proxy.html.
Dead code to clean up in the same change
public/sandbox.html is orphaned in both showcases today. Nothing loads it. The only references anywhere on origin/main are one .gitignore line and two CLAUDE.md lines that describe it as required:
examples/showcases/mcp-apps/public/sandbox.html
examples/showcases/generative-ui-playground/public/sandbox.html
examples/showcases/generative-ui-playground/CLAUDE.md:44
"**CRITICAL**: Requires `public/sandbox.html` ... Without it, iframes show 404."
.gitignore:43 showcase/angular/public/mcp-apps-sandbox.html (nothing generates this)
#6707 replaced the URL-loaded proxy with srcdoc and left the file and the instruction behind. The instruction is now wrong: the examples render fine without the file. Either point these at the new second origin or delete them, but do not leave a CRITICAL note on a file nothing reads.
Scope
- One static deployment serving a versioned
proxy.htmlon an origin distinct from every example. examples/showcases/mcp-appsandexamples/showcases/generative-ui-playgroundsetsandboxOriginto it.- Delete or repoint the two orphaned
public/sandbox.htmlfiles and correct bothCLAUDE.mdentries. - Drop the stale
.gitignoreline forshowcase/angular/public/mcp-apps-sandbox.html. - A showcase probe that asserts the widget's
window.originis the sandbox origin and not the host origin.
Acceptance
With the examples deployed, a widget loaded in either showcase must report:
window.originequal to the sandbox origin, not the example's origin.SecurityErroron every attempt to read the host'sdocument.cookie,localStorage, or DOM.- Its own
localStorageworking, which is the property the opaque-origin default gives up.
Blocked on the sandboxOrigin option from #6910. Refs #6910, #6707, #6884, #6823.
Activity
copilotkit-outpost-bot commentedon Sep 14, 2026
This is a tracking/planning issue for the engineering team, not a support question — I don't have anything useful to add on top of what's already written here.
The referenced PRs (#6910, #6707, #6884, #6823) and the
sandboxOriginoption are the right place to watch for progress. The docs note thatsandboxProxyUrlis the current config key inMCPAppsConfig(reference), so if the naming changes between #6910 landing and this work starting, that's worth a quick sync.🤖 Generated by CopilotKit AI Support · Documentation
Was this helpful? React with 👍 or 👎
fix(mcp-apps)!: give MCP App widgets an opaque origin by default (Cop…