MCP & ChatGPT Apps: The Double Iframe Strategy
Frédéric Barthelet of Alpic explains how MCP and ChatGPT apps use double iframes and CSP for secure, interactive UI embedding within chat interfaces.

Visual TL;DR
apps using AI for discoverability within chat interfaces
From the article 4 mentionsIt provides insights into allowed domains, connected resources, and potential issues, making it easier for developers to build secure and functional MCP apps.
embedding rich, interactive UIs directly within conversational context
From the articleBarthelet discussed the `srcdoc` attribute, which allows embedding HTML content directly into the iframe.
employing two nested iframes for secure content integration
From the article 3 mentionsIn his presentation, Barthelet explained that the double iframe strategy is employed to effectively embed rich, interactive user interfaces directly within the conversational context of AI platforms like ChatGPT and Claude.
CSP controls which resources the browser is allowed to load
From the article 3 mentionsA significant portion of Barthelet's talk focused on the importance of Content Security Policy (CSP) in managing these interactive elements.
From the articleThis approach is designed to boost discoverability of these applications and provide a more seamless and engaging user experience.
controlling subdomains for enhanced security and iframe isolation
From the article 4 mentionsThis method allows for greater control over resource loading and script execution, mitigating potential security risks.
comparing `srcdoc` vs. `src` for iframe content loading
From the article 9+ mentionsThe presentation then delved into the security implications of different iframe implementation strategies.
CSP acting as the new standard for cross-origin resource sharing
From the article 9+ mentionsBarthelet drew an analogy between Content Security Policy (CSP) and Cross-Origin Resource Sharing (CORS), suggesting that CSP is becoming the new CORS in terms of its importance for web security and development.
Contents(7)
© 2026 StartupHub.ai. All rights reserved. You may not republish this article in full without a license. Search engines and AI research tools may crawl and summarize for reference. Bulk reproduction or model training requires a license. See our terms.
Written by
Daniel SingerEditor, StartupHub.ai
Daniel Singer is the editor of StartupHub.ai, a technology expert and thought leader on AI and its applications across sectors, from fintech and healthcare to developer tooling and consumer software. He writes and tests the tools covered here thoroughly and regularly, and built StartupHub.ai to give founders, operators and buyers a clearer read on what they are actually being sold.