Migration Checklist
- Replace OpenAI tool metadata keys with
_meta.ui. - Replace
text/html+skybridgewithRESOURCE_MIME_TYPE, which istext/html;profile=mcp-app. - Convert resource CSP keys from snake case to camel case.
- Register UI tools and resources with
registerAppTool()andregisterAppResource(). - Keep readable
contentin tool results and put model-safe View data instructuredContent. - Replace
window.openaireads and methods with theAppclass or ReactuseApp()hook. - Register App event handlers before
app.connect()when using the plainAppclass. - Test in a host that supports MCP Apps, then verify text fallback behavior for clients without UI support.
Server Metadata Mapping
MCP Apps visibility is an array. A normal UI-launching tool usually uses the default
["model", "app"]. A UI helper such as pagination or autosave uses ["app"] so it stays out of the model tool list.
Resource Mapping
Before and After
Before, an OpenAI Apps SDK tool links its UI with a flat metadata key:Client Runtime Mapping
OpenAI Apps SDK Views usually read a pre-populatedwindow.openai object. MCP Apps Views create an App instance, register handlers, and connect to the host.
useApp(), which manages the connection lifecycle for you.
Features Without Direct Equivalents
Some OpenAI Apps SDK APIs do not have direct MCP Apps equivalents. Keep these migrations explicit so the app fails predictably during review:Validate the Migration
Run these checks before testing in a real host:- Search for
"openai/in server code. Remaining hits should be deliberate host-specific compatibility code. - Search for
text/html+skybridge. Replace it withRESOURCE_MIME_TYPE. - Search for
resource_domains,connect_domains, andframe_domains. Replace them with MCP Apps camel-case fields. - Search for
window.openaiin View code. Replace common runtime calls withAppor React hooks. - Call
tools/listand confirm the UI tool includes_meta.ui.resourceUri. - Call
resources/readand confirm the resource returnsmimeType: "text/html;profile=mcp-app". - Call the UI tool and confirm the result includes readable
contentand model-safestructuredContent. - Open the app in the sunpeak inspector and verify the iframe can load every declared external origin.