migrate-oai-app

Migrate OpenAI Apps SDK applications to MCP Apps SDK with API mapping.

Updated May 13, 2026
One-click install
npx skills add https://github.com/OptimusPi/OpenSCAD-MCP-App-Extension --skill migrate-oai-app-optimuspi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-oai-app
Source: https://github.com/OptimusPi/OpenSCAD-MCP-App-Extension/tree/main/.agents/skills/migrate-oai-app
Command: npx skills add https://github.com/OptimusPi/OpenSCAD-MCP-App-Extension --skill migrate-oai-app-optimuspi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Migrating an existing OpenAI Apps SDK application to the MCP Apps SDK can be confusing because the UI lifecycle, client APIs, and server registration model change substantially between platforms.

Core Features & Use Cases

  • Server migration guidance: Replace server.registerTool() / server.registerResource() patterns with registerAppTool() and registerAppResource() mapping so your MCP App metadata is generated correctly.
  • Client-side event model conversion: Move from synchronous window.openai.* globals to the MCP App instance lifecycle with async handlers like ontoolinput and ontoolresult.
  • Practical migration guardrails: Include CSP investigation and CORS configuration steps to ensure the sandboxed MCP App iframe can load assets and communicate successfully.

Quick Start

Ask your AI assistant to migrate your OpenAI Apps SDK project to MCP Apps SDK by generating the server-side and client-side before/after mapping, including CSP and CORS updates.

Frequently Asked Questions about migrate-oai-app

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate an OpenAI Apps SDK project to MCP Apps SDK?

Migrating an OpenAI Apps SDK project to MCP Apps SDK requires replacing server.registerTool() and server.registerResource() patterns with registerAppTool() and registerAppResource() mapping. It also involves moving from window.openai.* globals to async handlers like ontoolinput and ontoolresult.

Why does my migrated MCP App fail to load assets in a sandboxed iframe?

Migrated MCP Apps failing to load assets in sandboxed iframes usually have unresolved CSP or CORS issues. You must investigate Content Security Policy and configure cross-origin resource sharing to allow the MCP App iframe to load assets and communicate with cross-origin MCP client traffic.

What is the difference between OpenAI Apps SDK and MCP Apps SDK server registration?

The difference between OpenAI Apps SDK and MCP Apps SDK server registration is the API model. OpenAI uses server.registerTool() and server.registerResource(), while MCP requires registerAppTool() and registerAppResource() mapping to correctly generate MCP App metadata.

How do I convert synchronous window.openai client calls to the MCP App lifecycle?

Converting synchronous window.openai client calls to the MCP App lifecycle requires adopting the MCP App instance event model. You replace synchronous global API calls with asynchronous handlers such as ontoolinput and ontoolresult to manage the UI lifecycle properly.

Do I need to update CSP and CORS configurations when porting OpenAI Apps to MCP?

You need to update CSP and CORS configurations when porting OpenAI Apps to MCP because MCP Apps render in sandboxed iframes. These updates ensure cross-origin MCP client traffic and asset loading succeed without violating Content Security Policy assumptions.

What are the limitations of migrating OpenAI Apps SDK to MCP Apps SDK?

Limitations of migrating OpenAI Apps SDK to MCP Apps SDK include the complexity of UI lifecycle changes and the need for accurate API mapping. You must manually handle CSP and CORS fixes for sandboxed iframe rendering and cross-origin traffic, as OpenAI-specific metadata assumptions do not transfer directly.