diff --git a/docs/migrate_from_openai_apps.md b/docs/migrate_from_openai_apps.md index d681c34..c7b43a0 100644 --- a/docs/migrate_from_openai_apps.md +++ b/docs/migrate_from_openai_apps.md @@ -1,3 +1,7 @@ +--- +title: Migrate OpenAI App +--- + # Migrating from OpenAI Apps SDK to MCP Apps SDK This guide helps you migrate from the OpenAI Apps SDK to the MCP Apps SDK (`@modelcontextprotocol/ext-apps`). @@ -50,7 +54,7 @@ This guide helps you migrate from the OpenAI Apps SDK to the MCP Apps SDK (`@mod ### Server-Side Migration Example -### Before (OpenAI) +#### Before (OpenAI) ```typescript import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; @@ -110,7 +114,7 @@ function createServer() { } ``` -### After (MCP Apps) +#### After (MCP Apps) ```typescript import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; @@ -184,7 +188,7 @@ function createServer() { 6. **Helper Functions**: MCP provides `registerAppTool()` and `registerAppResource()` helpers 7. **Not Yet Implemented**: `_meta["openai/toolInvocation/invoking"]`, `_meta["openai/toolInvocation/invoked"]`, and `_meta["openai/widgetDescription"]` don't have MCP equivalents yet -## Client-side +## Client-Side ### Quick Start Comparison @@ -302,7 +306,7 @@ function createServer() { | — | `app.getHostVersion()` | Returns `{ name, version }` of host | | — | `app.getHostCapabilities()` | Check `serverTools`, `openLinks`, `logging`, etc. | -### Full Migration Example +### Client-Side Migration Example #### Before (OpenAI) diff --git a/docs/patterns.md b/docs/patterns.md index 9e7cc35..06db187 100644 --- a/docs/patterns.md +++ b/docs/patterns.md @@ -98,17 +98,3 @@ Use {@link app!App.ontoolinputpartial ontoolinputpartial} to receive streaming t > [!IMPORTANT] > Partial arguments are "healed" JSON — the host closes unclosed brackets/braces to produce valid JSON. This means objects may be incomplete (e.g., the last item in an array may be truncated). Don't rely on partial data for critical operations; use it only for preview UI. - -## [TODO] Supporting both iframe & MCP Apps in same binary - -See recipe: https://github.com/modelcontextprotocol/ext-apps/issues/34 - -{@includeCode ./patterns.tsx#iframeAndMcpApps} - -## [TODO] Migrating from OpenAI to MCP Apps - -See [OpenAI -> MCP Apps](https://docs.google.com/document/d/13ROImOR9B8xc32yhqsFyC9Hh3_H63JFORDIyjyIPcU4/edit) migration guide. - -Also: [Managing State](https://platform.openai.com/docs/actions/managing-state) (OpenAI) - -{@includeCode ./patterns.tsx#migrateFromOpenai} diff --git a/docs/patterns.tsx b/docs/patterns.tsx index a0e1c2a..f21ff5c 100644 --- a/docs/patterns.tsx +++ b/docs/patterns.tsx @@ -305,25 +305,6 @@ function visibilityBasedPause( //#endregion visibilityBasedPause } -/** - * Example: Supporting both iframe & MCP Apps in same binary - */ -function iframeAndMcpApps() { - //#region iframeAndMcpApps - // TODO: See recipe: https://github.com/modelcontextprotocol/ext-apps/issues/34 - //#endregion iframeAndMcpApps -} - -/** - * Example: Migrating from OpenAI to MCP Apps - */ -function migrateFromOpenai() { - //#region migrateFromOpenai - // TODO: See OpenAI -> MCP Apps migration guide - // https://docs.google.com/document/d/13ROImOR9B8xc32yhqsFyC9Hh3_H63JFORDIyjyIPcU4/edit - //#endregion migrateFromOpenai -} - // Suppress unused variable warnings void chunkedDataServer; void chunkedDataClient; @@ -332,5 +313,3 @@ void hostStylingReact; void persistWidgetStateServer; void persistWidgetState; void visibilityBasedPause; -void iframeAndMcpApps; -void migrateFromOpenai; diff --git a/typedoc.config.mjs b/typedoc.config.mjs index 3761585..a109cf3 100644 --- a/typedoc.config.mjs +++ b/typedoc.config.mjs @@ -4,7 +4,11 @@ import { OptionDefaults } from "typedoc"; const config = { blockTags: [...OptionDefaults.blockTags, "@description"], intentionallyNotExported: ["AppOptions"], - projectDocuments: ["docs/quickstart.md", "docs/patterns.md"], + projectDocuments: [ + "docs/quickstart.md", + "docs/patterns.md", + "docs/migrate_from_openai_apps.md", + ], entryPoints: [ "src/server/index.ts", "src/app.ts",