Migrate existing OpenAI Apps SDK applications to the MCP Apps SDK (@modelcontextprotocol/ext-apps). The MCP Apps SDK provides a standardized, open protocol for interactive UIs in conversational clients.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionmigrate-oai-appExecute the skills CLI command in your project's root directory to begin installation:
Fetches migrate-oai-app from modelcontextprotocol/ext-apps and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate migrate-oai-app. Access via /migrate-oai-app in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
2.0K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
2.0K
stars
Migrate existing OpenAI Apps SDK applications to the MCP Apps SDK (@modelcontextprotocol/ext-apps). The MCP Apps SDK provides a standardized, open protocol for interactive UIs in conversational clients.
npm install, pnpm add, yarn add) instead of manually writing version numbers. This lets the package manager resolve the latest compatible versions. Never specify version numbers from memory.Clone the SDK repository for complete migration documentation and working examples:
git clone --branch "v$(npm view @modelcontextprotocol/ext-apps version)" --depth 1 https://github.com/modelcontextprotocol/ext-apps.git /tmp/mcp-ext-apps
Read the migration reference guide with "before/after" mapping tables: /tmp/mcp-ext-apps/docs/migrate_from_openai_apps.md
Read JSDoc documentation directly from /tmp/mcp-ext-apps/src/*:
| File | Contents |
|---|---|
src/app.ts |
App class, handlers, lifecycle |
src/server/index.ts |
registerAppTool, registerAppResource |
src/spec.types.ts |
Type definitions |
src/react/useApp.tsx |
useApp hook for React apps |
src/react/use*.ts* |
Other use* hooks for React apps |
See /tmp/mcp-ext-apps/examples/basic-server-{framework}/ for basic SDK usage examples organized by front-end framework:
| Template | Key Files |
|---|---|
basic-server-vanillajs/ |
server.ts, src/mcp-app.ts, mcp-app.html |
basic-server-react/ |
server.ts, src/mcp-app.tsx (uses useApp hook) |
basic-server-vue/ |
server.ts, src/App.vue |
basic-server-svelte/ |
server.ts, src/App.svelte |
basic-server-preact/ |
server.ts, src/mcp-app.tsx |
basic-server-solid/ |
server.ts, src/mcp-app.tsx |
MCP Apps HTML is served as an MCP resource, not as a web page, and runs in a sandboxed iframe with no same-origin server. Every origin must be declared in CSP—including the origin serving your JS/CSS bundles (localhost in dev, your CDN in production). Missing origins fail silently.
Before writing any migration code, build the app and investigate all origins it references:
Document your findings as three lists, and note for each origin whether it's universal, dev-only, or prod-only:
If no origins are found, the app may not need custom CSP domains.
MCP clients make cross-origin requests. If using Express, app.use(cors()) handles this.
For raw HTTP servers, configure standard CORS and additionally:
mcp-session-id, mcp-protocol-version, last-event-idmcp-session-idUse registerAppTool() and registerAppResource() helpers instead of raw server.registerTool() / server.registerResource(). These helpers handle the MCP Apps metadata format automatically.
See /tmp/mcp-ext-apps/docs/migrate_from_openai_apps.md for server-side mapping tables.
The fundamental paradigm shift: OpenAI uses a synchronous global object (window.openai.toolInput, window.openai.theme) that's pre-populated before your code runs. MCP Apps uses an App instance with async event handlers.
Key differences:
App instance and register handlers (ontoolinput, ontoolresult, onhostcontextchanged) before calling connect(). (Events may fire immediately after connection, so handlers must be registered first.)app.ontoolinput for window.openai.toolInput, app.ontoolresult for window.openai.toolOutput.app.getHostContext().For React apps, the useApp hook manages this lifecycle automatically—see basic-server-react/ for the pattern.
See /tmp/mcp-ext-apps/docs/migrate_from_openai_apps.md for client-side mapping tables.
These OpenAI features don't have MCP equivalents yet:
Server-side:
| OpenAI Feature | Status/Workaround |
|---|---|
_meta["openai/toolInvocation/invoking"] / _meta["openai/toolInvocation/invoked"] |
Progress indicators not yet available |
_meta["openai/widgetDescription"] |
Use app.updateModelContext() for dynamic context |
Client-side:
| OpenAI Feature | Status/Workaround |
|---|---|
window.openai.widgetState / setWidgetState() |
Use localStorage or server-side state |
window.openai.uploadFile() / getFileDownloadUrl() |
File operations not yet available |
window.openai.requestModal() / requestClose() |
Modal management not yet available |
window.openai.view |
Not yet available |
Slow down and carefully follow each item in this checklist:
Search for and migrate any remaining server-side OpenAI patterns:
| Pattern | Indicates |
|---|---|
"openai/ |
Old metadata keys → _meta.ui.* |
text/html+skybridge |
Old MIME type → RESOURCE_MIME_TYPE constant |
text/html;profile=mcp-app |
New MIME type, but prefer RESOURCE_MIME_TYPE constant |
_domains" or _domains: |
snake_case CSP → camelCase (connect_domains → connectDomains) |
Search for and migrate any remaining client-side OpenAI patterns:
| Pattern | Indicates |
|---|---|
window.openai.toolInput |
Old global → params.arguments in ontoolinput handler |
window.openai.toolOutput |
Old global → params.structuredContent in ontoolresult |
window.openai |
Old global API → App instance methods |
For each origin from your CSP investigation, show where it appears in the registerAppResource() CSP config. Every origin from the CSP investigation (universal, dev-only, prod-only) must be included in the CSP config—MCP Apps HTML runs in a sandboxed iframe with no same-origin server. If an origin was not included in the CSP config, add it now.
For each conditional (dev-only, prod-only) origin from your CSP investigation, show the code where the same configuration setting (env var, config file, etc.) controls both the runtime URL and the CSP entry. If the CSP has a hardcoded origin that should be conditional, fix it now—the app must be production-ready.
Test the migrated app with the basic-host example:
# Terminal 1: Build and run your server
npm run build && npm run serve
# Terminal 2: Run basic-host (from cloned repo)
cd /tmp/mcp-ext-apps/examples/basic-host
npm install
SERVERS='["http://localhost:3001/mcp"]' npm run start
# Open http://localhost:8080
Once the app loads in basic-host, confirm:
ontoolinput handler fires with tool argumentsontoolresult handler fires with tool resultPrerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
ceorkm/mobile-app-ui-design
uni-helper/skills
skillcreatorai/ai-agent-skills
davila7/claude-code-templates
truongduy2611/app-store-preflight-skills
davila7/claude-code-templates
migrate-oai-app fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Solid pick for teams standardizing on skills: migrate-oai-app is focused, and the summary matches what you get after install.
Registry listing for migrate-oai-app matched our evaluation — installs cleanly and behaves as described in the markdown.
Keeps context tight: migrate-oai-app is the kind of skill you can hand to a new teammate without a long onboarding doc.
migrate-oai-app fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
I recommend migrate-oai-app for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
migrate-oai-app has been reliable in day-to-day use. Documentation quality is above average for community skills.
migrate-oai-app reduced setup friction for our internal harness; good balance of opinion and flexibility.
migrate-oai-app fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
migrate-oai-app is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
showing 1-10 of 41