---
schema: 1
type: video
title: 'Why MCP and ChatGPT Apps Use Double Iframes — Frédéric Barthelet, Alpic'
description: >-
  Inspect ChatGPT's DOM while an MCP app is rendering and you find an iframe
  nested inside another iframe. Frédéric Barthelet traces why each simpler
  approach fails: `srcdoc` shares the parent origin so ChatGPT's CSP blocks all
  third party scripts; relaxing that CSP lets any app read ChatGPT's
  localStorage and cookies; adding `sandbox` removes origin indexed storage;
  adding `allow-same-origin` to restore it is the classic sandbox escape. The
  double iframe is what remains after ruling all of that out. The outer iframe
  serves one lightweight script from a controlled subdomain (different subdomain
  per app to prevent cross app storage collisions), which loads the actual app
  HTML via `srcdoc` into the inner frame — the same pattern Facebook first
  shipped for their app marketplace. The practical implication: every external
  domain your view touches must be declared in your MCP app metadata or the
  submission gets rejected. Barthelet demos Skybridge's CSP inspector, which
  diffs declared domains against actual network calls live in dev. Speaker info:
  - https://x.com/bartheletf - https://www.linkedin.com/in/frederic-barthelet/ -
  https://github.com/fredericbarthelet --- Watch along with the corrected
  transcript, summary, timestamps and resources on this talk's official AIE
  page:
  https://ai.engineer/talks/c-2eEv2ou7Y-why-mcp-and-chatgpt-apps-use-double-iframes-frederic-barthelet-alpic
  Join our upcoming AI Engineer conferences (see https://ai.engineer landing
  page): - AIEi Shanghai, November 5–6 — the first for meeting top Chinese labs
  and engineers - AIE CODE in SF, November 10–12 — the top AI Coding conference
  returns - AIEi Sydney, December 7–8 — the first AIEi run alongside NeurIPS
  2026 in Sydney ---
canonical: >-
  https://liquidgold.cc/channel/aidotengineer/explore/video/why-mcp-and-chatgpt-apps-use-double-iframes-frederi-810ba0c07bc4
markdown: >-
  https://liquidgold.cc/channel/aidotengineer/video/why-mcp-and-chatgpt-apps-use-double-iframes-frederi-810ba0c07bc4.md
llms: null
parent: 'https://liquidgold.cc/channel/aidotengineer.md'
channel: aidotengineer
updated: '2026-10-24T09:41:09.832Z'
language: null
children: []
videoId: c-2eEv2ou7Y
durationSeconds: 1211
publishedAt: '2026-06-15T14:00:06.000Z'
searchChunks:
  - ordinal: 0
    text: null
    startSeconds: 26
    endSeconds: 159
    watch: 'https://liquidgold.cc/watch/c-2eEv2ou7Y?t=26'
    heldReason: rights
  - ordinal: 1
    text: null
    startSeconds: 26
    endSeconds: 159
    watch: 'https://liquidgold.cc/watch/c-2eEv2ou7Y?t=26'
    heldReason: rights
  - ordinal: 2
    text: null
    startSeconds: 170
    endSeconds: 263
    watch: 'https://liquidgold.cc/watch/c-2eEv2ou7Y?t=170'
    heldReason: rights
  - ordinal: 3
    text: null
    startSeconds: 170
    endSeconds: 263
    watch: 'https://liquidgold.cc/watch/c-2eEv2ou7Y?t=170'
    heldReason: rights
  - ordinal: 4
    text: null
    startSeconds: 274
    endSeconds: 374
    watch: 'https://liquidgold.cc/watch/c-2eEv2ou7Y?t=274'
    heldReason: rights
  - ordinal: 5
    text: null
    startSeconds: 386
    endSeconds: 486
    watch: 'https://liquidgold.cc/watch/c-2eEv2ou7Y?t=386'
    heldReason: rights
  - ordinal: 6
    text: null
    startSeconds: 496
    endSeconds: 576
    watch: 'https://liquidgold.cc/watch/c-2eEv2ou7Y?t=496'
    heldReason: rights
  - ordinal: 7
    text: null
    startSeconds: 496
    endSeconds: 576
    watch: 'https://liquidgold.cc/watch/c-2eEv2ou7Y?t=496'
    heldReason: rights
  - ordinal: 8
    text: null
    startSeconds: 587
    endSeconds: 699
    watch: 'https://liquidgold.cc/watch/c-2eEv2ou7Y?t=587'
    heldReason: rights
  - ordinal: 9
    text: null
    startSeconds: 587
    endSeconds: 699
    watch: 'https://liquidgold.cc/watch/c-2eEv2ou7Y?t=587'
    heldReason: rights
  - ordinal: 10
    text: null
    startSeconds: 711
    endSeconds: 843
    watch: 'https://liquidgold.cc/watch/c-2eEv2ou7Y?t=711'
    heldReason: rights
  - ordinal: 11
    text: null
    startSeconds: 711
    endSeconds: 843
    watch: 'https://liquidgold.cc/watch/c-2eEv2ou7Y?t=711'
    heldReason: rights
  - ordinal: 12
    text: null
    startSeconds: 853
    endSeconds: 942
    watch: 'https://liquidgold.cc/watch/c-2eEv2ou7Y?t=853'
    heldReason: rights
  - ordinal: 13
    text: null
    startSeconds: 953
    endSeconds: 1045
    watch: 'https://liquidgold.cc/watch/c-2eEv2ou7Y?t=953'
    heldReason: rights
  - ordinal: 14
    text: null
    startSeconds: 1045
    endSeconds: 1211
    watch: 'https://liquidgold.cc/watch/c-2eEv2ou7Y?t=1045'
    heldReason: rights
  - ordinal: 15
    text: null
    startSeconds: 1045
    endSeconds: 1211
    watch: 'https://liquidgold.cc/watch/c-2eEv2ou7Y?t=1045'
    heldReason: rights
---


# Why MCP and ChatGPT Apps Use Double Iframes — Frédéric Barthelet, Alpic

Inspect ChatGPT's DOM while an MCP app is rendering and you find an iframe nested inside another iframe. Frédéric Barthelet traces why each simpler approach fails: \`srcdoc\` shares the parent origin so ChatGPT's CSP blocks all third party scripts; relaxing that CSP lets any app read ChatGPT's localStorage and cookies; adding \`sandbox\` removes origin indexed storage; adding \`allow-same-origin\` to restore it is the classic sandbox escape. The double iframe is what remains after ruling all of that out. The outer iframe serves one lightweight script from a controlled subdomain (different subdomain per app to prevent cross app storage collisions), which loads the actual app HTML via \`srcdoc\` into the inner frame — the same pattern Facebook first shipped for their app marketplace. The practical implication: every external domain your view touches must be declared in your MCP app metadata or the submission gets rejected. Barthelet demos Skybridge's CSP inspector, which diffs declared domains against actual network calls live in dev. Speaker info: - https://x.com/bartheletf - https://www.linkedin.com/in/frederic-barthelet/ - https://github.com/fredericbarthelet --- Watch along with the corrected transcript, summary, timestamps and resources on this talk's official AIE page: https://ai.engineer/talks/c-2eEv2ou7Y-why-mcp-and-chatgpt-apps-use-double-iframes-frederic-barthelet-alpic Join our upcoming AI Engineer conferences (see https://ai.engineer landing page): - AIEi Shanghai, November 5–6 — the first for meeting top Chinese labs and engineers - AIE CODE in SF, November 10–12 — the top AI Coding conference returns - AIEi Sydney, December 7–8 — the first AIEi run alongside NeurIPS 2026 in Sydney ---

Canonical: https://liquidgold.cc/channel/aidotengineer/explore/video/why-mcp-and-chatgpt-apps-use-double-iframes-frederi-810ba0c07bc4 · Channel: [AI Engineer](https://liquidgold.cc/channel/aidotengineer.md)

> Search chunk text is held until public-source provenance is verified.

## Document chunks

> Missing: no stored document chunks are available.
