diff --git a/examples/simple-server/package-lock.json b/examples/simple-server/package-lock.json index fabbd73..3ceab94 100644 --- a/examples/simple-server/package-lock.json +++ b/examples/simple-server/package-lock.json @@ -8,7 +8,7 @@ "name": "simple-server", "version": "1.0.0", "dependencies": { - "@modelcontextprotocol/ext-apps": "file:../..", + "@modelcontextprotocol/ext-apps": "git+https://github.com/modelcontextprotocol/ext-apps.git", "@modelcontextprotocol/sdk": "^1.20.1", "react": "^19.2.0", "react-dom": "^19.2.0", @@ -22,33 +22,11 @@ "@vitejs/plugin-react": "^4.3.4", "cors": "^2.8.5", "express": "^5.1.0", - "tsx": "^4.20.6", "typescript": "^5.7.2", "vite": "^6.0.0", "vite-plugin-singlefile": "^2.3.0" } }, - "../..": { - "name": "@modelcontextprotocol/ext-apps", - "version": "1.0.0", - "dependencies": { - "@modelcontextprotocol/sdk": "^1.20.1", - "react": "^19.2.0", - "react-dom": "^19.2.0", - "zod": "^3.25 || ^4.0" - }, - "devDependencies": { - "@types/react": "^19.2.2", - "@types/react-dom": "^19.2.2", - "concurrently": "^9.2.1", - "cors": "^2.8.5", - "esbuild": "~0.19.10", - "express": "^5.1.0", - "prettier": "^3.6.2", - "tsx": "^4.20.6", - "typescript": "5.7.2" - } - }, "node_modules/@babel/code-frame": { "version": "7.27.1", "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/@babel/code-frame/-/code-frame-7.27.1.tgz", @@ -824,8 +802,29 @@ } }, "node_modules/@modelcontextprotocol/ext-apps": { - "resolved": "../..", - "link": true + "version": "1.0.0", + "resolved": "git+ssh://git@github.com/modelcontextprotocol/ext-apps.git#d07e6363a0d052202beb0e5fb703216121652ccc", + "dependencies": { + "@modelcontextprotocol/sdk": "^1.20.1", + "bun": "^1.3.2", + "react": "^19.2.0", + "react-dom": "^19.2.0", + "typescript": "5.7.2", + "zod": "^3.25" + } + }, + "node_modules/@modelcontextprotocol/ext-apps/node_modules/typescript": { + "version": "5.7.2", + "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } }, "node_modules/@modelcontextprotocol/sdk": { "version": "1.21.0", @@ -859,6 +858,149 @@ } } }, + "node_modules/@oven/bun-darwin-aarch64": { + "version": "1.3.2", + "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/@oven/bun-darwin-aarch64/-/bun-darwin-aarch64-1.3.2.tgz", + "integrity": "sha512-licBDIbbLP5L5/S0+bwtJynso94XD3KyqSP48K59Sq7Mude6C7dR5ZujZm4Ut4BwZqUFfNOfYNMWBU5nlL7t1A==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oven/bun-darwin-x64": { + "version": "1.3.2", + "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/@oven/bun-darwin-x64/-/bun-darwin-x64-1.3.2.tgz", + "integrity": "sha512-hn8lLzsYyyh6ULo2E8v2SqtrWOkdQKJwapeVy1rDw7juTTeHY3KDudGWf4mVYteC9riZU6HD88Fn3nGwyX0eIg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oven/bun-darwin-x64-baseline": { + "version": "1.3.2", + "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/@oven/bun-darwin-x64-baseline/-/bun-darwin-x64-baseline-1.3.2.tgz", + "integrity": "sha512-UHxdtbyxdtNJUNcXtIrjx3Lmq8ji3KywlXtIHV/0vn9A8W5mulqOcryqUWMFVH9JTIIzmNn6Q/qVmXHTME63Ww==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oven/bun-linux-aarch64": { + "version": "1.3.2", + "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/@oven/bun-linux-aarch64/-/bun-linux-aarch64-1.3.2.tgz", + "integrity": "sha512-5uZzxzvHU/z+3cZwN/A0H8G+enQ+9FkeJVZkE2fwK2XhiJZFUGAuWajCpy7GepvOWlqV7VjPaKi2+Qmr4IX7nQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-aarch64-musl": { + "version": "1.3.2", + "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/@oven/bun-linux-aarch64-musl/-/bun-linux-aarch64-musl-1.3.2.tgz", + "integrity": "sha512-OD9DYkjes7WXieBn4zQZGXWhRVZhIEWMDGCetZ3H4vxIuweZ++iul/CNX5jdpNXaJ17myb1ROMvmRbrqW44j3w==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64": { + "version": "1.3.2", + "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/@oven/bun-linux-x64/-/bun-linux-x64-1.3.2.tgz", + "integrity": "sha512-EoEuRP9bxAxVKuvi6tZ0ZENjueP4lvjz0mKsMzdG0kwg/2apGKiirH1l0RIcdmvfDGGuDmNiv/XBpkoXq1x8ug==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64-baseline": { + "version": "1.3.2", + "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/@oven/bun-linux-x64-baseline/-/bun-linux-x64-baseline-1.3.2.tgz", + "integrity": "sha512-m9Ov9YH8KjRLui87eNtQQFKVnjGsNk3xgbrR9c8d2FS3NfZSxmVjSeBvEsDjzNf1TXLDriHb/NYOlpiMf/QzDg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64-musl": { + "version": "1.3.2", + "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/@oven/bun-linux-x64-musl/-/bun-linux-x64-musl-1.3.2.tgz", + "integrity": "sha512-3TuOsRVoG8K+soQWRo+Cp5ACpRs6rTFSu5tAqc/6WrqwbNWmqjov/eWJPTgz3gPXnC7uNKVG7RxxAmV8r2EYTQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64-musl-baseline": { + "version": "1.3.2", + "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/@oven/bun-linux-x64-musl-baseline/-/bun-linux-x64-musl-baseline-1.3.2.tgz", + "integrity": "sha512-q8Hto8hcpofPJjvuvjuwyYvhOaAzPw1F5vRUUeOJDmDwZ4lZhANFM0rUwchMzfWUJCD6jg8/EVQ8MiixnZWU0A==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-windows-x64": { + "version": "1.3.2", + "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/@oven/bun-windows-x64/-/bun-windows-x64-1.3.2.tgz", + "integrity": "sha512-nZJUa5NprPYQ4Ii4cMwtP9PzlJJTp1XhxJ+A9eSn1Jfr6YygVWyN2KLjenyI93IcuBouBAaepDAVZZjH2lFBhg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oven/bun-windows-x64-baseline": { + "version": "1.3.2", + "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/@oven/bun-windows-x64-baseline/-/bun-windows-x64-baseline-1.3.2.tgz", + "integrity": "sha512-s00T99MjB+xLOWq+t+wVaVBrry+oBOZNiTJijt+bmkp/MJptYS3FGvs7a+nkjLNzoNDoWQcXgKew6AaHES37Bg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@rolldown/pluginutils": { "version": "1.0.0-beta.27", "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", @@ -1506,6 +1648,39 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/bun": { + "version": "1.3.2", + "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/bun/-/bun-1.3.2.tgz", + "integrity": "sha512-x75mPJiEfhO1j4Tfc65+PtW6ZyrAB6yTZInydnjDZXF9u9PRAnr6OK3v0Q9dpDl0dxRHkXlYvJ8tteJxc8t4Sw==", + "cpu": [ + "arm64", + "x64" + ], + "hasInstallScript": true, + "license": "MIT", + "os": [ + "darwin", + "linux", + "win32" + ], + "bin": { + "bun": "bin/bun.exe", + "bunx": "bin/bunx.exe" + }, + "optionalDependencies": { + "@oven/bun-darwin-aarch64": "1.3.2", + "@oven/bun-darwin-x64": "1.3.2", + "@oven/bun-darwin-x64-baseline": "1.3.2", + "@oven/bun-linux-aarch64": "1.3.2", + "@oven/bun-linux-aarch64-musl": "1.3.2", + "@oven/bun-linux-x64": "1.3.2", + "@oven/bun-linux-x64-baseline": "1.3.2", + "@oven/bun-linux-x64-musl": "1.3.2", + "@oven/bun-linux-x64-musl-baseline": "1.3.2", + "@oven/bun-windows-x64": "1.3.2", + "@oven/bun-windows-x64-baseline": "1.3.2" + } + }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/bytes/-/bytes-3.1.2.tgz", @@ -1675,6 +1850,7 @@ "version": "1.0.1", "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", @@ -2051,19 +2227,6 @@ "node": ">= 0.4" } }, - "node_modules/get-tsconfig": { - "version": "4.13.0", - "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/get-tsconfig/-/get-tsconfig-4.13.0.tgz", - "integrity": "sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/gopd/-/gopd-1.2.0.tgz", @@ -2578,16 +2741,6 @@ "node": ">=0.10.0" } }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, "node_modules/rollup": { "version": "4.52.5", "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/rollup/-/rollup-4.52.5.tgz", @@ -2882,26 +3035,6 @@ "node": ">=0.6" } }, - "node_modules/tsx": { - "version": "4.20.6", - "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/tsx/-/tsx-4.20.6.tgz", - "integrity": "sha512-ytQKuwgmrrkDTFP4LjR0ToE2nqgy886GpvRSpU0JAnrdBYppuY5rLkRUYPU1yCryb24SsKBTL/hlDQAEFVwtZg==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "~0.25.0", - "get-tsconfig": "^4.7.5" - }, - "bin": { - "tsx": "dist/cli.mjs" - }, - "engines": { - "node": ">=18.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - } - }, "node_modules/type-is": { "version": "2.0.1", "resolved": "https://artifactory.infra.ant.dev:443/artifactory/api/npm/npm-all/type-is/-/type-is-2.0.1.tgz", diff --git a/examples/simple-server/package.json b/examples/simple-server/package.json index 9d61039..8c7d51b 100644 --- a/examples/simple-server/package.json +++ b/examples/simple-server/package.json @@ -7,11 +7,11 @@ "dev": "vite", "build": "rm -rf dist && VITE_ENTRY=ui-vanilla vite build && VITE_ENTRY=ui-react vite build", "preview": "vite preview", - "server": "tsx server.ts", + "server": "bun server.ts", "start": "npm run build && npm run server" }, "dependencies": { - "@modelcontextprotocol/ext-apps": "file:../..", + "@modelcontextprotocol/ext-apps": "git+https://github.com/modelcontextprotocol/ext-apps.git", "@modelcontextprotocol/sdk": "^1.20.1", "react": "^19.2.0", "react-dom": "^19.2.0", @@ -25,7 +25,6 @@ "@vitejs/plugin-react": "^4.3.4", "cors": "^2.8.5", "express": "^5.1.0", - "tsx": "^4.20.6", "typescript": "^5.7.2", "vite": "^6.0.0", "vite-plugin-singlefile": "^2.3.0" diff --git a/examples/simple-server/src/ui-vanilla.ts b/examples/simple-server/src/ui-vanilla.ts index 79b3669..78ecf0f 100644 --- a/examples/simple-server/src/ui-vanilla.ts +++ b/examples/simple-server/src/ui-vanilla.ts @@ -22,7 +22,6 @@ window.addEventListener("load", async () => { { style: "color: red;" }, ); - const transport = new PostMessageTransport(window.parent); const app = new App({ name: "MCP UI Client (Vanilla)", version: "1.0.0", @@ -139,5 +138,5 @@ window.addEventListener("load", async () => { }), ); - await app.connect(transport); + await app.connect(new PostMessageTransport(window.parent)); });