Controlling link punch-out behavior in ChatGPT Apps

Is there another way to control the link punch-out when it comes to the ChatGPT Apps? This is referring to the full-screen button and the redirect from clicking the app name when it’s rendered inline.

Right now, they are controlled by ui.domain, but this is not ideal for cross-platform applications. For example, Claude requires that the ui.domain be a hash of the MCP URL, such as mcp.example.com/mcp, or the app will just refuse to render. But I don’t want ChatGPT to redirect to my MCP URL; I want it to redirect to my homepage at www.example.com.

Thanks for the help!

Are you referring to window.openai.setOpenInAppUrl({ href })? From docs:

Hello, I’m referring to the little label that says “MCP Apps Local”. If ui.domain is set, it’ll properly link to whatever page you set. Will this setOpenInAppUrl also control that?

Oh for that one, no, you can’t override it. You may want to experiment with _meta["openai/widgetDomain"] to see if it does what you need, since that is an OpenAI-only variant.