ChatGPT is changing the subdomain used to host your app’s widget UI. The new subdomain will be derived from your configured MCP server URL, using a deterministic hash. If your app, an API it calls, or a page it embeds depends on the current widget origin, update that configuration before December 15.
This guide applies to remote MCP apps registered with ChatGPT. MCP servers configured directly in Codex Desktop use registration-based widget origins.
What is changing
Today, apps that declare _meta.ui.domain or its compatibility alias, _meta["openai/widgetDomain"], can have a widget subdomain derived from that domain. For example, https://example.com maps to:
https://example-com.web-sandbox.oaiusercontent.com
After migration, the widget origin will have this format:
https://mcp-endpoint-<first 32 hex characters of SHA-256 of the MCP server URL>.web-sandbox.oaiusercontent.com
For the MCP server URL https://example.com/mcp, the widget origin is:
https://mcp-endpoint-c3d80a4ed901ee05b21755a88273b4a4.web-sandbox.oaiusercontent.com
MCP server URLs that match exactly produce the same subdomain across app registrations. This means a development version of your app will have the same widget subdomain as the production version as long as both use the identical MCP server URL.
For apps without a declared widget domain, the previous subdomain was derived from connection details, including the app registration, user, and account. It was stable for the same connection details, but could vary across registrations, users, and accounts. These apps also move to the endpoint-derived subdomain when migrated.
Keep your existing _meta.ui.domain or _meta["openai/widgetDomain"] metadata. It still supports features such as “Open in app” and link handling, but will no longer determine the widget’s hosted subdomain. Do not replace it with the generated widget origin. You do not need to change your MCP server URL to migrate.
How to tell whether your app needs changes
If your app has no widget UI, this change does not apply to it. If it does, check for these dependencies on the current widget origin:
-
API origin allowlists or CORS configuration. Your widget makes browser requests to your backend, and that backend only accepts requests from specific origins.
-
Embedded pages with a
frame-ancestorspolicy. Your widget loads another page in an iframe, and that page’sContent-Security-Policyresponse header restricts which origins may embed it. If the policy allows the old widget origin but excludes the new one, the browser will block the embedded page after migration. This can happen even when your API requests succeed. -
Third-party domain or referrer restrictions. An embedded service, such as a maps provider, is configured to accept your current widget hostname or referrer.
-
Widget origins in code. Your code or integration configuration compares against the old widget origin or uses it to construct URLs.
-
Browser storage. Your widget relies on
localStorage, IndexedDB, or other data tied to the old origin. That data will not be available to the widget at its new origin. Make sure the widget can initialize with empty storage and reload any needed state from your backend.
Search the relevant application, backend, and third-party settings for your current widget hostname, including web-sandbox.oaiusercontent.com. Declaring a widget domain alone does not mean you need to change your app. If your widget has none of these dependencies, no application changes are expected.
Determine your app’s new widget origin
You have two options: read the generated origin from your app’s widget in ChatGPT using DevTools, or calculate it from the exact MCP server URL configured for your app.
Option 1: Find the origin in DevTools
You can find the new generated widget origin today by looking at the data attribute data-mcp-app-origin-generated on the host wrapper of your widget UI. The same attribute is used in web, desktop, and mobile widget hosts. The steps below use ChatGPT on the web.
-
Open your app in ChatGPT on the web and run a tool that displays its widget.
-
Open your browser’s developer tools and select Elements (Chrome or Safari) or Inspector (Firefox).
-
In the ChatGPT host page DOM, search for
data-mcp-app-origin-generatedand select your app’s widget wrapper. Confirm that it belongs to your app if several widgets are visible. -
Copy the full value of
data-mcp-app-origin-generatedinto the applicable origin allowlists, including embedded pages’frame-ancestorspolicies. It is a complete origin, not just a hash.
You can also read the generated origins from the Console in Chrome DevTools, Firefox Developer Tools, or Safari Web Inspector:
-
Render your app’s widget in ChatGPT first.
-
Open the Console and select the top-level ChatGPT page as the execution context, rather than the widget iframe.
-
Paste this one-liner and press Enter:
Array.from(document.querySelectorAll("[data-mcp-app-origin-generated]"), (el) =>
el.getAttribute("data-mcp-app-origin-generated")
);Representative output for the example endpoint:
[
"https://mcp-endpoint-c3d80a4ed901ee05b21755a88273b4a4.web-sandbox.oaiusercontent.com"
]
The result contains one value per matching wrapper. If several apps are rendered, use Elements or Inspector to match an origin to the correct widget. The command uses standard DOM APIs supported by all three browsers.
Here is a simplified example of the DOM during the transition, with unrelated elements and the iframe path and query omitted:
<!-- Generated origin to add to your allowlists. -->
<div
data-mcp-app-frame="true"
data-mcp-app-origin-generated="https://mcp-endpoint-c3d80a4ed901ee05b21755a88273b4a4.web-sandbox.oaiusercontent.com"
>
<!-- The running iframe can still use the old origin. -->
<iframe src="https://example-com.web-sandbox.oaiusercontent.com"></iframe>
</div>
The generated origin can differ from the active origin during the transition. The attribute reports the generated destination even when the iframe still uses the domain derived from your declared metadata. Its presence does not mean your app has migrated. Confirm migration by checking the actual origin of the running iframe; once it uses the generated origin, the two values match. The attribute does not switch the iframe origin.
The attribute belongs to the host wrapper, outside your widget HTML. An empty array ([]) means the selected document contains no matching attributes. Check the execution context, refresh or update the client, and render a fresh widget. The attribute can also be absent when generated-origin metadata is unavailable. Absence does not establish that your app is unaffected; for a remote MCP app, you can calculate the endpoint-derived origin below.
Option 2: Calculate the origin
Use the exact MCP server URL configured for your app. Hash its UTF-8 bytes with SHA-256, take the first 32 lowercase hexadecimal characters, and add the mcp-endpoint- prefix.
Run the example with Node.js 22.6 or later: save it as widget-origin.mts and run node --experimental-strip-types widget-origin.mts. For Python 3, save the example as widget_origin.py and run python3 widget_origin.py.
import { createHash } from "node:crypto";
const mcpServerUrl = "https://example.com/mcp";
const urlHash = createHash("sha256")
.update(mcpServerUrl, "utf8")
.digest("hex")
.slice(0, 32);
console.log(`https://mcp-endpoint-${urlHash}.web-sandbox.oaiusercontent.com`);Output for the example:
https://mcp-endpoint-c3d80a4ed901ee05b21755a88273b4a4.web-sandbox.oaiusercontent.com
The hash step does not normalize the URL. Preserve its scheme, hostname spelling, port if present, path, trailing slash, and query string exactly. Do not hash only the hostname, your website URL, the widget resource URI, or the URL reached after a redirect. For example, https://example.com/mcp, https://example.com/mcp/, and https://example.com/mcp?x=1 produce different hashes.
Update embedded pages that use frame-ancestors
For example, your widget HTML might embed a page like this:
<!-- Inside your widget UI. -->
<iframe src="https://app.example.com/embed" title="Example app"></iframe>
Inspect the document response for https://app.example.com/embed in DevTools Network → Response Headers. Check the frame-ancestors directive in its Content-Security-Policy header. This is the response served by the embedded page, not an API response or the outer sandbox document. Repeat this for any further nested pages.
The embedded page’s frame-ancestors policy must allow every ancestor origin, including the widget sandbox origin and the top-level ChatGPT origin. Allowing https://chatgpt.com alone does not cover the intermediate sandbox frames.
If there is no frame-ancestors directive, or its existing sources already allow the new origin and all other ancestors, no change to this directive is needed. Otherwise, update the existing frame-ancestors directive on the server or CDN that serves the embedded page. For a third-party page, ask its provider to update that policy. Use the full origin from data-mcp-app-origin-generated or the calculation above, and keep the old origin allowed during the transition.
For example, an app moving from https://example-com.web-sandbox.oaiusercontent.com to the origin calculated for https://example.com/mcp could use:
Content-Security-Policy: frame-ancestors https://chatgpt.com https://example-com.web-sandbox.oaiusercontent.com https://mcp-endpoint-c3d80a4ed901ee05b21755a88273b4a4.web-sandbox.oaiusercontent.com;
This example shows only the frame-ancestors directive. Preserve the rest of your existing policy and any other required ancestor origins. Configure this in the embedded page’s HTTP response header; frame-ancestors is not supported in an HTML <meta> tag.
Your widget’s _meta.ui.csp.frameDomains setting (or the legacy _meta["openai/widgetCSP"].frame_domains field) controls which pages the widget may embed through frame-src. It does not update the embedded page’s frame-ancestors policy. API CORS settings do not update that policy either. Keep the embedded page’s origin in your widget frame configuration, and add the new widget origin to the embedded page’s ancestor allowlist where needed.
Update and verify your app
-
Add the new origin before December 15. Update the allowed origins for your API, embedded pages’ CSP
frame-ancestorsdirectives as described above, any applicable third-party domain or referrer settings, and origin checks in your code. For an origin allowlist, use the fullhttps://…origin without an iframe path, query string, or trailing slash. For a hostname or referrer setting, use the format that service expects. -
Keep the current origin allowed during the transition. Add the new value alongside the existing one so your app continues to work before it switches.
-
Prepare for empty browser storage. Verify that a fresh widget can load its initial state and complete its main interactions without data saved under the old origin.
-
Verify requests once the new origin is active. Render a fresh widget and exercise the features that call your API or third-party services. In DevTools, confirm the iframe uses the new hostname and inspect a widget-initiated request: its
Originheader should match the new origin. Where CORS applies, check that the preflight, if present, and the actual request succeed and that the widget can read and display the response. -
Verify embedded pages once the new origin is active. Confirm that the widget iframe uses the new hostname, then open and interact with each page it embeds. In Network, inspect the embedded page’s final document response and confirm its
frame-ancestorspolicy allows the new widget origin and all other ancestors. Check the Console forframe-ancestorsviolations and confirm that the embedded content actually renders; a successful HTTP status alone does not establish that the browser displayed it. -
Retire the old allowlist entry after migration is complete for the clients you support. If you change your configured MCP server URL later, calculate and allow its new origin before switching endpoints.