Models & Comparisons

MCP and Double Iframes

Last updated 2026-07-28

What's new

2026-07-28
  • OpenAI's new ChatGPT voice mode (AI assistant you talk to) lets you speak and listen at the same time, like talking to a human, instead of waiting for it to finish like a walkie-talkie.
  • It can now run on your computer and use it to control tools like Gmail, your calendar, or Slack (programs you use every day), and even see your screen to help you navigate websites or apps.
  • You can use voice mode on your phone to control your computer, pulling files or running tasks, making it super handy for multitasking.
  • The full capabilities, like running tasks and using your screen, only work in the ChatGPT desktop app, not on the website or mobile app.
2026-07-22
  • AI tools (computer programs that use artificial intelligence) often struggle with large amounts of information, as performance can degrade after using just 25% of their context window (the amount of data they can process at once).
  • Documentation (instruction manuals) for AI tools is often written for humans, not AI, making it difficult for AI to understand and use effectively without additional context engines (tools that help AI understand information better).
  • In the future, AI tools may focus on creating a "fluency mode" (a smooth, easy-to-use experience) rather than a "friction mode" (making it hard for users to switch to a different tool), with skills (specialized abilities) playing a key role in this shift.
  • When evaluating AI platforms, users often consider factors like security, data governance (how data is managed and protected), and integration (how well it works with other systems) capabilities.
2026-07-13
  • OpenAI launched ChatGPT Work, a new tool (similar to Claude Co-work) that helps non-technical people automate tasks, available on web, mobile, and desktop apps.
  • It's powered by the new GPT 5.6 model, offering different versions for speed or capability, and syncs tasks across devices.
  • ChatGPT Work includes features like skills (automated tasks), sites (live outputs), and scheduled tasks, similar to Claude Co-work.
  • You can easily migrate skills from Claude Co-work to ChatGPT Work, making it simple to switch between the two.
2026-07-07
  • Claude Fable 5 (an AI tool) can now create animated websites using a free skill and Higgsfield (an all-in-one creative AI platform).
  • To get started, you'll need the Claude desktop app, the animated website skill (free download), and a Higgsfield account.
  • Connect Higgsfield to Claude by adding a custom connector with the MCP (a type of connection link) URL.
  • Use the animated website skill to turn videos into scrollable, animated websites by processing and optimizing video frames.
2026-07-01
  • Anthropic updated Claude design (a tool for creating web and mobile app prototypes, slideshows, and animations) to version 2.0, introducing a new platform design and four new features.
  • Usage is now shared across all Claude tools (Claude code, Claude co-work, and Claude design) under one plan, removing separate limits for Claude design.
  • You can now edit designs directly in Claude design, like in Canva, instead of using tokens to describe changes, saving money and time.
  • Existing Claude code users can import design systems directly from Claude code using a command called design sync, automating the process and improving design fidelity.

Key points

What it is

  • MCP (Model Context Protocol) is a universal standard that lets AI agents talk directly to external tools like a CRM, Gmail, or a database, acting as a bridge.
  • A "double iframe" is a web page embedded inside another iframe, creating a secure, isolated environment that prevents scripts from interfering with the host.
  • This setup enforces a content security policy, blocking unauthorized scripts or embedded content, and is the default delivery mechanism for third-party generative UI (AI-generated interfaces).
  • Over 1,500 MCP servers exist today, working alongside WebMCP, a separate front-end protocol for connecting agents directly to web pages.

How to use it

  • When building an app for ChatGPT using MCP, the app’s interface appears inside two nested iframes for security.
  • You must declare every external domain your app depends on, like an API endpoint, inside the app’s metadata under the `connect-src` directive.
  • The double iframe setup allows for live, interactive UI within the chat, where users can move diagrams or update text, and the app can fetch fresh data.
  • Design your app to communicate with the host through the official message-passing API rather than trying to bypass the iframe boundaries.

Watch out for

  • Forgetting to declare external domains your app depends on, which will cause the browser to block the request inside the nested iframe.
  • Assuming the inner iframe shares the parent origin, as it does not due to the sandbox attribute, meaning your app cannot access ChatGPT's cookies or data.
  • Over 1,500 MCP servers exist today, working alongside WebMCP, a separate front-end protocol for connecting agents directly to web pages.
  • Every MCP connection you add eats into your token budget (tokens are cost units for AI processing), so you want to keep your setup lean.

Tools named

  • MCP (Model Context Protocol, a way for AI to connect to external tools), WebMCP (a separate front-end protocol for connecting agents directly to web pages)

Lesson 1: What is MCP and Double Iframes and why it matters

MCP (Model Context Protocol) is a universal standard that lets your AI agent talk directly to external tools like a CRM, Gmail, or a database. Think of it as a bridge — instead of connecting each tool with custom code, MCP provides one shared language. When you add an MCP server, it automatically loads its tool definitions (a manual of buttons and actions) into the AI’s context, so the agent knows exactly how to draft an email, fetch data, or send a message without you programming each step.

One common setup detail is the “double iframe” nesting. A double iframe means a web page is embedded inside another iframe, which itself sits inside the host application. This nesting creates a sandbox — a secure, isolated environment that prevents the MCP app’s scripts from interfering with the host. The inner iframe can call back to its server for fresh data and receive updated UIs, all without exposing the host to security risks. This is the default delivery mechanism for third-party generative UI (AI-generated interfaces) because it enforces a content security policy, blocking unauthorized scripts or embedded content.

Double iframes matter because they let AI apps serve interactive, live experiences — like data exploration dashboards — safely inside tools like VS Code or ChatGPT. Every MCP connection you add eats into your token budget (tokens are cost units for AI processing), so you want to keep your setup lean. Over 1,500 MCP servers exist today, and they work alongside WebMCP (a separate front-end protocol for connecting agents directly to web pages). Together, MCP handles backend tool integration, while double iframes keep the front end secure and responsive.

Sources

Lesson 2: How to use MCP and Double Iframes: step-by-step

When you build an app for ChatGPT using MCP (Model Context Protocol, a way for AI to connect to external tools), the app’s interface appears inside two nested iframes (inline frames, which load another webpage inside the current page). This “double iframe” setup exists because of security. ChatGPT uses a Content Security Policy (CSP) (a set of rules that controls what resources can load on a page). That policy lists only specific domains that are allowed to render iframes. If your app’s UI lived in a single iframe, OpenAI would have to update that CSP list every time a new app appeared — an impossible task.

To solve this, ChatGPT places your app inside a second iframe that is hosted on its own domain. That first iframe acts as a bridge: it loads a generic endpoint from OpenAI’s servers, and then that page uses a meta tag to point to your app’s actual URL. Your app gets loaded inside the second iframe, isolated from the main ChatGPT page. This nesting prevents your app from accessing ChatGPT’s cookies or sending data back to your server without permission. The outer iframe is sandboxed (restricted so it cannot share the parent origin) for extra safety.

When you build an app, you must declare every external domain your app depends on — for example, an API endpoint — inside the app’s metadata under the `connect-src` directive. If you omit a domain, the CSP will block the connection. The result is a live, interactive UI within the chat: a user can move a diagram or update text, and the app can call back to the MCP server to fetch fresh data. The double iframe keeps everything secure while allowing real-time interaction.

Sources

Lesson 3: Best practices and pitfalls

When building MCP apps (applications that let AI agents show interactive interfaces inside a chat), you will encounter a "double iframe" pattern. This means one iframe (an embedded web page) is nested inside another iframe. ChatGPT uses this structure for security and flexibility. The outer iframe acts as a sandbox (a restricted environment that prevents the app from accessing the host page). The inner iframe loads your actual app content. This double nesting exists because ChatGPT cannot list every possible third-party domain in its Content Security Policy (CSP — a security rule that controls which domains can be loaded). Instead, the outer iframe loads content from a single trusted domain, and that frame then loads your app in the inner frame. A common pitfall is forgetting to declare external domains your app depends on. If your app calls an external API, you must list that domain in the `connect-src` directive of your app's metadata. Otherwise, the browser will block the request inside the nested iframe. Another mistake is assuming the inner iframe shares the parent origin (the security context of the main page). It does not — the sandbox attribute forces a "no pack origin," meaning your app cannot access ChatGPT's cookies or data. This is intentional for security. The best practice is to always declare all required domains in your MCP app spec metadata. Also, design your app to communicate with the host through the official message-passing API rather than trying to bypass the iframe boundaries. This keeps the experience smooth and secure.

Sources