From 95247157a7506a5bada766bf7916442fadac5145 Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Wed, 9 Sep 2026 10:35:55 +0100 Subject: [PATCH] chore: bump ext-apps + example servers to 2.0.0 ext-apps 2.0 and the 15 example server packages are built on the MCP TypeScript SDK 2.0 split packages, so the stateless example mounts in src/modules/example-apps now connect each server to NodeStreamableHTTPServerTransport from @modelcontextprotocol/node; the factory map is typed as the 2.0 McpServer. The rest of this host (OAuth, the root /mcp handlers, Redis transport) stays on @modelcontextprotocol/sdk 1.29, which installs alongside the 2.0 packages. zod moves to 4 for the whole tree: ext-apps 2.0 peers on ^4.2.0, sdk 1.29 accepts ^3.25 || ^4.0, and the host already imports zod/v4. The hello-world View takes CallToolResult from @modelcontextprotocol/client. --- package-lock.json | 479 +++++++++++++++--------------- package.json | 36 +-- src/apps/hello-world/App.tsx | 2 +- src/modules/example-apps/index.ts | 15 +- 4 files changed, 267 insertions(+), 265 deletions(-) diff --git a/package-lock.json b/package-lock.json index e2448b9..c6c807f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,23 +9,25 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@modelcontextprotocol/ext-apps": "^1.7.5", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "^2.0.0", "@modelcontextprotocol/sdk": "1.29.0", - "@modelcontextprotocol/server-budget-allocator": "^1.7.5", - "@modelcontextprotocol/server-cohort-heatmap": "^1.7.5", - "@modelcontextprotocol/server-customer-segmentation": "^1.7.5", - "@modelcontextprotocol/server-debug": "^1.7.5", - "@modelcontextprotocol/server-lazy-auth": "^1.7.5", - "@modelcontextprotocol/server-map": "^1.7.5", - "@modelcontextprotocol/server-pdf": "^1.7.5", - "@modelcontextprotocol/server-scenario-modeler": "^1.7.5", - "@modelcontextprotocol/server-shadertoy": "^1.7.5", - "@modelcontextprotocol/server-sheet-music": "^1.7.5", - "@modelcontextprotocol/server-system-monitor": "^1.7.5", - "@modelcontextprotocol/server-threejs": "^1.7.5", - "@modelcontextprotocol/server-transcript": "^1.7.5", - "@modelcontextprotocol/server-video-resource": "^1.7.5", - "@modelcontextprotocol/server-wiki-explorer": "^1.7.5", + "@modelcontextprotocol/server": "^2.0.0", + "@modelcontextprotocol/server-budget-allocator": "^2.0.0", + "@modelcontextprotocol/server-cohort-heatmap": "^2.0.0", + "@modelcontextprotocol/server-customer-segmentation": "^2.0.0", + "@modelcontextprotocol/server-debug": "^2.0.0", + "@modelcontextprotocol/server-lazy-auth": "^2.0.0", + "@modelcontextprotocol/server-map": "^2.0.0", + "@modelcontextprotocol/server-pdf": "^2.0.0", + "@modelcontextprotocol/server-scenario-modeler": "^2.0.0", + "@modelcontextprotocol/server-shadertoy": "^2.0.0", + "@modelcontextprotocol/server-sheet-music": "^2.0.0", + "@modelcontextprotocol/server-system-monitor": "^2.0.0", + "@modelcontextprotocol/server-threejs": "^2.0.0", + "@modelcontextprotocol/server-transcript": "^2.0.0", + "@modelcontextprotocol/server-video-resource": "^2.0.0", + "@modelcontextprotocol/server-wiki-explorer": "^2.0.0", "@redis/client": "^1.6.0", "cors": "^2.8.5", "dotenv": "^16.4.7", @@ -34,7 +36,7 @@ "raw-body": "^3.0.0", "react": "^19.2.1", "react-dom": "^19.2.1", - "zod": "^3.25.76" + "zod": "^4.2.0" }, "devDependencies": { "@eslint/js": "^9.15.0", @@ -1655,10 +1657,56 @@ "integrity": "sha512-M5UknZPHRu3DEDWoipU6sE8PdkZ6Z/S+v4dD+Ke8IaNlpdSQah50lz1KtcFBa2vsdOnwbbnxJwVM4wty6udA5w==", "license": "MIT" }, + "node_modules/@modelcontextprotocol/client": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/client/-/client-2.0.0.tgz", + "integrity": "sha512-8f1OghQ2rjzIOfqgUCP+8GiUWqRs89njoWLNqAe8kWmDePv3s1fZXseej+QXemssEuuOvLLmLO/kqM3IQHtISw==", + "license": "MIT", + "dependencies": { + "@modelcontextprotocol/core": "2.0.0", + "cross-spawn": "^7.0.5", + "eventsource": "^3.0.2", + "eventsource-parser": "^3.0.0", + "jose": "^6.1.3", + "pkce-challenge": "^5.0.0", + "zod": "^4.2.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@modelcontextprotocol/core": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/core/-/core-2.0.0.tgz", + "integrity": "sha512-pJCEwGG7Lfr/+PQp9ZTwKXNeO5wzbfKL7H3MYpCorM4oFBoQrdjnBgEoqG+RjhsvS1FKrDbKux+M1HhlnGWqcA==", + "license": "MIT", + "dependencies": { + "zod": "^4.2.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@modelcontextprotocol/express": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/express/-/express-2.0.0.tgz", + "integrity": "sha512-Snlr8j9FR9LcVvEJPF7qJ7d5zTL4Bes2dk7RcacN9eSZ7OLohwxqhEvWu1+UxELyScgLbLLOdeVEGdwKI1iwVQ==", + "license": "MIT", + "dependencies": { + "cors": "^2.8.5" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@modelcontextprotocol/server": "^2.0.0", + "express": "^4.18.0 || ^5.0.0" + } + }, "node_modules/@modelcontextprotocol/ext-apps": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/ext-apps/-/ext-apps-1.7.5.tgz", - "integrity": "sha512-TjPH2S2y5UEGKhmI6+XGFuqfqOV4ppe1x6DA3txnUaEWkgtA4G5vo14jGKFZmegdkZ1H4QMLyujLvoU1BEdnAg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/ext-apps/-/ext-apps-2.0.0.tgz", + "integrity": "sha512-a6tXzFcIbIIdnqumQ7W8Oxd8W/KAPkAKYpoxpD9nDgxZ24ywgxG5pK/8G9W5pOFUygS7gWHQhPv8cwRB44/8yg==", "license": "MIT", "workspaces": [ "examples/*" @@ -1670,12 +1718,17 @@ "node": ">=20" }, "peerDependencies": { - "@modelcontextprotocol/sdk": "^1.29.0", + "@modelcontextprotocol/client": "^2.0.0", + "@modelcontextprotocol/core": "^2.0.0", + "@modelcontextprotocol/server": "^2.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0", - "zod": "^3.25.0 || ^4.0.0" + "zod": "^4.2.0" }, "peerDependenciesMeta": { + "@modelcontextprotocol/server": { + "optional": true + }, "react": { "optional": true }, @@ -1684,6 +1737,27 @@ } } }, + "node_modules/@modelcontextprotocol/node": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/node/-/node-2.0.0.tgz", + "integrity": "sha512-Y4hAC2XdGDUdDOCbLDOCA4+aL3NUldjsOWlDL/YwpAxrPhRm1xHd7lZ+mLacvZ9t3PaH28wgNoaLQGrIk1P2pg==", + "license": "MIT", + "dependencies": { + "@hono/node-server": "^1.19.9" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@modelcontextprotocol/server": "^2.0.0", + "hono": "^4.11.4" + }, + "peerDependenciesMeta": { + "hono": { + "optional": true + } + } + }, "node_modules/@modelcontextprotocol/sdk": { "version": "1.29.0", "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.29.0.tgz", @@ -1986,18 +2060,33 @@ "node": ">= 0.6" } }, + "node_modules/@modelcontextprotocol/server": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server/-/server-2.0.0.tgz", + "integrity": "sha512-YhHWdHfpFMQfd0prsEnxKeS3Qz3ytIGmsS0sth4KDjnacIT7hxk6hXHkJ9KysxlkvTM+WZAtQbbcUhdoP4Hvtw==", + "license": "MIT", + "dependencies": { + "@modelcontextprotocol/core": "2.0.0", + "zod": "^4.2.0" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/@modelcontextprotocol/server-budget-allocator": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-budget-allocator/-/server-budget-allocator-1.7.5.tgz", - "integrity": "sha512-47XJYc6KHdLC7rA3tOGWC+SvJp3EOrmHWDuTc/KT1f+/u3h6S8dXrl4eZ99nPEZ3fjKRwaxJbpTpqQyMQ+GP/g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-budget-allocator/-/server-budget-allocator-2.0.0.tgz", + "integrity": "sha512-dIVM4gF6QDrU5oBmJHSPpkZjh74r9mW4MdRe+TLtXqFpzgxFo83QbbdipsPTSFiYfiIKc0s0BguCeBavYNP1Qg==", "license": "MIT", "dependencies": { - "@modelcontextprotocol/ext-apps": "^1.7.0", - "@modelcontextprotocol/sdk": "^1.29.0", + "@modelcontextprotocol/express": "2.0.0", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "2.0.0", + "@modelcontextprotocol/server": "2.0.0", "chart.js": "^4.4.0", "cors": "^2.8.5", "express": "^5.1.0", - "zod": "^4.1.13" + "zod": "^4.2.0" }, "bin": { "mcp-budget-allocator-server": "dist/index.js" @@ -2265,28 +2354,21 @@ "node": ">= 0.6" } }, - "node_modules/@modelcontextprotocol/server-budget-allocator/node_modules/zod": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.5.tgz", - "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@modelcontextprotocol/server-cohort-heatmap": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-cohort-heatmap/-/server-cohort-heatmap-1.7.5.tgz", - "integrity": "sha512-t1ZZAMabYidTIzdvlyckffNkp3w/us1j+PggzXQ+UP2tCmbgsIcJXJEaCfKDvLMU1sCClsBZXNXqaDViiGGAOg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-cohort-heatmap/-/server-cohort-heatmap-2.0.0.tgz", + "integrity": "sha512-nt1CnMPd0bthkWBCWxKkRbKxJaiaWbwvykLYXO8Kd88TsKRvcS7frNKzpYWHkke9WeooC4T6vlvtLyKiTaSnrg==", "license": "MIT", "dependencies": { - "@modelcontextprotocol/ext-apps": "^1.7.0", - "@modelcontextprotocol/sdk": "^1.29.0", + "@modelcontextprotocol/express": "2.0.0", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "2.0.0", + "@modelcontextprotocol/server": "2.0.0", "cors": "^2.8.5", "express": "^5.1.0", "react": "^19.2.0", "react-dom": "^19.2.0", - "zod": "^4.1.13" + "zod": "^4.2.0" }, "bin": { "mcp-cohort-heatmap-server": "dist/index.js" @@ -2554,27 +2636,20 @@ "node": ">= 0.6" } }, - "node_modules/@modelcontextprotocol/server-cohort-heatmap/node_modules/zod": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.5.tgz", - "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@modelcontextprotocol/server-customer-segmentation": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-customer-segmentation/-/server-customer-segmentation-1.7.5.tgz", - "integrity": "sha512-nfDrW8BKIOmb38q4jHwl2PgItjNsEmijrEq3algAvOFeUl+BzJKDUluvpFOxV+Z0ddMVwUD4ahFZ6tg6So8rBQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-customer-segmentation/-/server-customer-segmentation-2.0.0.tgz", + "integrity": "sha512-aTCS58wTQFQ+AWDgMTvgx9T+bFBwqwDuwqO5dVdEuZjpDj5fYHOnJcaWez3BDRGQVGpg3OgBfTYnf4GkzxHtww==", "license": "MIT", "dependencies": { - "@modelcontextprotocol/ext-apps": "^1.7.0", - "@modelcontextprotocol/sdk": "^1.29.0", + "@modelcontextprotocol/express": "2.0.0", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "2.0.0", + "@modelcontextprotocol/server": "2.0.0", "chart.js": "^4.4.0", "cors": "^2.8.5", "express": "^5.1.0", - "zod": "^4.1.13" + "zod": "^4.2.0" }, "bin": { "mcp-customer-segmentation-server": "dist/index.js" @@ -2842,49 +2917,35 @@ "node": ">= 0.6" } }, - "node_modules/@modelcontextprotocol/server-customer-segmentation/node_modules/zod": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.5.tgz", - "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@modelcontextprotocol/server-debug": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-debug/-/server-debug-1.7.5.tgz", - "integrity": "sha512-wXwWYXcdKNdcW0UQAty+XevStQdlLXUNqVrcMLZGi1C+K7Ltv/o2NuS6SWDDXx5HdM2qF/X4xIsvVjM8MjHIeg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-debug/-/server-debug-2.0.0.tgz", + "integrity": "sha512-/IebhDuoPnBtyjwXAAQf+hUBaTOUATvqWnvms75yZ85BCN3Y6RJbRoZQ08OO5B0Uki78+4WZmWPGMlBAlWdCiw==", "license": "MIT", "dependencies": { - "@modelcontextprotocol/ext-apps": "^1.7.0", - "@modelcontextprotocol/sdk": "^1.29.0", - "zod": "^4.1.13" + "@modelcontextprotocol/express": "2.0.0", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "2.0.0", + "@modelcontextprotocol/server": "2.0.0", + "zod": "^4.2.0" }, "bin": { "mcp-server-debug": "dist/index.js" } }, - "node_modules/@modelcontextprotocol/server-debug/node_modules/zod": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", - "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@modelcontextprotocol/server-lazy-auth": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-lazy-auth/-/server-lazy-auth-1.7.5.tgz", - "integrity": "sha512-0NgZuWcy1yDGGBJ8xGIkiOAkUU2Bq9gRIxRL2AUhJamziCrAC8lGkDxxec+WheyZZ36K5rXHtkbHxpgQ4cORrw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-lazy-auth/-/server-lazy-auth-2.0.0.tgz", + "integrity": "sha512-mF8PAUZjf3Sl6+o+3AGYy6J9KCLjz4N9cf1yJ9ZyWYgqoOgiNSkefrLLpIfmdI2qMCsp3BL7IngoLRFL9FtF0w==", "license": "MIT", "dependencies": { - "@modelcontextprotocol/ext-apps": "^1.7.0", - "@modelcontextprotocol/sdk": "^1.29.0", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "2.0.0", + "@modelcontextprotocol/server": "2.0.0", "cors": "^2.8.5", "express": "^5.1.0", - "jose": "^6.0.0" + "jose": "^6.0.0", + "zod": "^4.2.0" }, "bin": { "mcp-server-lazy-auth": "dist/index.js" @@ -3170,16 +3231,19 @@ } }, "node_modules/@modelcontextprotocol/server-map": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-map/-/server-map-1.7.5.tgz", - "integrity": "sha512-PSJboxZ4rt4NVy4JfxFdHSe78YLZTusB0qz3djZBD6W6tRazRGyMjVoUE0pvCmy8evVyKuvVy1w2PT4ljK1ZKw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-map/-/server-map-2.0.0.tgz", + "integrity": "sha512-1n2WBsce4MQv+aiX7tMOB7wQj1Xqddnrv4qpqrGEKEtpy9V+Mwg78HQo970nte+jS55SJm5BGXrbn4HODVbCRQ==", "license": "MIT", "dependencies": { - "@modelcontextprotocol/ext-apps": "^1.7.0", - "@modelcontextprotocol/sdk": "^1.29.0", + "@modelcontextprotocol/client": "2.0.0", + "@modelcontextprotocol/express": "2.0.0", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "2.0.0", + "@modelcontextprotocol/server": "2.0.0", "cors": "^2.8.5", "express": "^5.1.0", - "zod": "^4.1.13" + "zod": "^4.2.0" }, "bin": { "mcp-map-server": "dist/index.js" @@ -3447,28 +3511,22 @@ "node": ">= 0.6" } }, - "node_modules/@modelcontextprotocol/server-map/node_modules/zod": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.5.tgz", - "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@modelcontextprotocol/server-pdf": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-pdf/-/server-pdf-1.7.5.tgz", - "integrity": "sha512-JAlXoXvYUOKjzy6W9+kF8zrlvbscdvGcZusPpY1ZIvL5nam2lV8ZvlgWNTk54QGkXOGO9ZkhuB5IijmT9hi+YA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-pdf/-/server-pdf-2.0.0.tgz", + "integrity": "sha512-27eBFr871+Lo7rkGbJGVAxZLdyWmJDLda7/iLpT8J9OrwzT5Vfsw6/STgd87hrlPIE1Jj0fJfsCr9qAqvcoxmw==", "license": "MIT", "dependencies": { "@cantoo/pdf-lib": "^2.6.5", - "@modelcontextprotocol/ext-apps": "^1.7.0", - "@modelcontextprotocol/sdk": "^1.29.0", + "@modelcontextprotocol/client": "2.0.0", + "@modelcontextprotocol/express": "2.0.0", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "2.0.0", + "@modelcontextprotocol/server": "2.0.0", "cors": "^2.8.5", "express": "^5.1.0", "pdfjs-dist": "^5.0.0", - "zod": "^4.1.13" + "zod": "^4.2.0" }, "bin": { "mcp-pdf-server": "dist/index.js" @@ -3736,29 +3794,22 @@ "node": ">= 0.6" } }, - "node_modules/@modelcontextprotocol/server-pdf/node_modules/zod": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.5.tgz", - "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@modelcontextprotocol/server-scenario-modeler": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-scenario-modeler/-/server-scenario-modeler-1.7.5.tgz", - "integrity": "sha512-k+5GAJFIdAMlOwCjQ1qLqB+VWfEpGCPWXEPEwkN3Xr07S2jdyZb+TPESAi3AAkK4BJTiEl5yGOEkszZj9g5vLA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-scenario-modeler/-/server-scenario-modeler-2.0.0.tgz", + "integrity": "sha512-mmjwE9g/IGvb2zRk98HgHaXN86xX7KjNOgfp/VZwWVPV+q/S8KEk953yVnuPeQ/GNgkVxfgRnPyCcwmBFRYFNA==", "license": "MIT", "dependencies": { - "@modelcontextprotocol/ext-apps": "^1.7.0", - "@modelcontextprotocol/sdk": "^1.29.0", + "@modelcontextprotocol/express": "2.0.0", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "2.0.0", + "@modelcontextprotocol/server": "2.0.0", "chart.js": "^4.4.0", "cors": "^2.8.5", "express": "^5.1.0", "react": "^19.2.0", "react-dom": "^19.2.0", - "zod": "^4.1.13" + "zod": "^4.2.0" }, "bin": { "mcp-scenario-modeler-server": "dist/index.js" @@ -4026,26 +4077,19 @@ "node": ">= 0.6" } }, - "node_modules/@modelcontextprotocol/server-scenario-modeler/node_modules/zod": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.5.tgz", - "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@modelcontextprotocol/server-shadertoy": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-shadertoy/-/server-shadertoy-1.7.5.tgz", - "integrity": "sha512-ZQKj9VMgK/L+fBA6LfCUbfdpYFwWIH3t3+5DPrq8kz+EDX1h3cBHDRk3vUPHFg1C7R2cLkCTlVI0VY2hRLAkRA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-shadertoy/-/server-shadertoy-2.0.0.tgz", + "integrity": "sha512-YUeTXv0NwT/LJg02POuByH7xLVWXHs7fFbzoqGQ4Xj6nxL4TOyZV5oeowH4NmvAybmmv8YHdqFprit3rT7Auzg==", "license": "MIT", "dependencies": { - "@modelcontextprotocol/ext-apps": "^1.7.0", - "@modelcontextprotocol/sdk": "^1.29.0", + "@modelcontextprotocol/express": "2.0.0", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "2.0.0", + "@modelcontextprotocol/server": "2.0.0", "cors": "^2.8.5", "express": "^5.1.0", - "zod": "^4.1.13" + "zod": "^4.2.0" }, "bin": { "mcp-shadertoy-server": "dist/index.js" @@ -4313,27 +4357,20 @@ "node": ">= 0.6" } }, - "node_modules/@modelcontextprotocol/server-shadertoy/node_modules/zod": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.5.tgz", - "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@modelcontextprotocol/server-sheet-music": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-sheet-music/-/server-sheet-music-1.7.5.tgz", - "integrity": "sha512-Mnt4ikSsj1qJ1kMboXGHxA6H5PbydrsEf/3f9TFw1yABktkAFZmAY7ce+WhP4YCqWeSqPDCLARxkpJg0JvrRUQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-sheet-music/-/server-sheet-music-2.0.0.tgz", + "integrity": "sha512-orosXdIchuNHgQvrw2JZLZR/VF/DgVNFAqCRAl7eLsBOqL5VouD0NLBdx6RCE3AThzd/5aIh6FKhZPXW10CBUA==", "license": "MIT", "dependencies": { - "@modelcontextprotocol/ext-apps": "^1.7.0", - "@modelcontextprotocol/sdk": "^1.29.0", + "@modelcontextprotocol/express": "2.0.0", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "2.0.0", + "@modelcontextprotocol/server": "2.0.0", "abcjs": "^6.4.4", "cors": "^2.8.5", "express": "^5.1.0", - "zod": "^4.1.13" + "zod": "^4.2.0" }, "bin": { "mcp-sheet-music-server": "dist/index.js" @@ -4601,28 +4638,21 @@ "node": ">= 0.6" } }, - "node_modules/@modelcontextprotocol/server-sheet-music/node_modules/zod": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.5.tgz", - "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@modelcontextprotocol/server-system-monitor": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-system-monitor/-/server-system-monitor-1.7.5.tgz", - "integrity": "sha512-EMlXbtwzN8VL3DpvLVUxpWWvRsS630/gA8iNRERxRW2PwwTjVpbi8i+GYVipxvG/G6ujFjyrKlunhgFGjrjOOg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-system-monitor/-/server-system-monitor-2.0.0.tgz", + "integrity": "sha512-wbxgeNVdX3fr/H8/yHwPseUc8zVmEHbigCWDHpSJm9EswKK+e9K+4gyueoDWNDTjSdKEU+cN0E4V0JbB/HJPaA==", "license": "MIT", "dependencies": { - "@modelcontextprotocol/ext-apps": "^1.7.0", - "@modelcontextprotocol/sdk": "^1.29.0", + "@modelcontextprotocol/express": "2.0.0", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "2.0.0", + "@modelcontextprotocol/server": "2.0.0", "chart.js": "^4.4.0", "cors": "^2.8.5", "express": "^5.1.0", "systeminformation": "^5.31.6", - "zod": "^4.1.13" + "zod": "^4.2.0" }, "bin": { "mcp-system-monitor-server": "dist/index.js" @@ -4890,29 +4920,23 @@ "node": ">= 0.6" } }, - "node_modules/@modelcontextprotocol/server-system-monitor/node_modules/zod": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.5.tgz", - "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@modelcontextprotocol/server-threejs": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-threejs/-/server-threejs-1.7.5.tgz", - "integrity": "sha512-ymX6Bn0tD+1qzMEOy2pNLKc/umu2mz8XIQb+dUNg8fcbDAq1op/bJud8t/1lkt+31CHx0qS/uEJ9zBU4N8g4RA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-threejs/-/server-threejs-2.0.0.tgz", + "integrity": "sha512-P/0tzPMuBcTZXV1L1cVUljJQi+lZp+L0rqtUaNMMdcLp3uimnaxinz05Cyj5NGGEqEcAEqKGHzGr9KI6ZOqDJQ==", "license": "MIT", "dependencies": { - "@modelcontextprotocol/ext-apps": "^1.7.0", - "@modelcontextprotocol/sdk": "^1.29.0", + "@modelcontextprotocol/client": "2.0.0", + "@modelcontextprotocol/express": "2.0.0", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "2.0.0", + "@modelcontextprotocol/server": "2.0.0", "cors": "^2.8.5", "express": "^5.1.0", "react": "^19.2.0", "react-dom": "^19.2.0", "three": "^0.181.0", - "zod": "^4.1.13" + "zod": "^4.2.0" }, "bin": { "mcp-threejs-server": "dist/index.js" @@ -5180,26 +5204,19 @@ "node": ">= 0.6" } }, - "node_modules/@modelcontextprotocol/server-threejs/node_modules/zod": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.5.tgz", - "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@modelcontextprotocol/server-transcript": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-transcript/-/server-transcript-1.7.5.tgz", - "integrity": "sha512-xwGZBImuN8zga66x1VjQJUhc8bJQ55lB/oLh5Bk47227t0FvoxO4nN6ZSA+L/zCq49/ABc9b6z2Dy2vjEK1VvQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-transcript/-/server-transcript-2.0.0.tgz", + "integrity": "sha512-Kr7Qs1unNl87t3YOEoSVV7Ik00Crc51rdG6IxmxUC2EBd1CGYnemDOM+/7wbCSdokrwxhU7PkVL5ud418h3y1Q==", "license": "MIT", "dependencies": { - "@modelcontextprotocol/ext-apps": "^1.7.0", - "@modelcontextprotocol/sdk": "^1.29.0", + "@modelcontextprotocol/express": "2.0.0", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "2.0.0", + "@modelcontextprotocol/server": "2.0.0", "cors": "^2.8.5", "express": "^5.1.0", - "zod": "^4.1.13" + "zod": "^4.2.0" }, "bin": { "mcp-transcript-server": "dist/index.js" @@ -5467,26 +5484,20 @@ "node": ">= 0.6" } }, - "node_modules/@modelcontextprotocol/server-transcript/node_modules/zod": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", - "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@modelcontextprotocol/server-video-resource": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-video-resource/-/server-video-resource-1.7.5.tgz", - "integrity": "sha512-4z/AlVxKuC2UJKbugvT7jgCGnNsuH/wjAH7L8jy1UWxe/5FD987YnZamzShuqstdqrVsfyATLJhS9AFSOmFN2Q==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-video-resource/-/server-video-resource-2.0.0.tgz", + "integrity": "sha512-oSNUQwiJMNhiUMger9ByPIlo6/ixV8GsxNpb/PZuvgCDELCGE4ha46flfYDgY8rhf7UZr6P03E3ehz0PFX3snw==", "license": "MIT", "dependencies": { - "@modelcontextprotocol/ext-apps": "^1.7.0", - "@modelcontextprotocol/sdk": "^1.29.0", + "@modelcontextprotocol/client": "2.0.0", + "@modelcontextprotocol/express": "2.0.0", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "2.0.0", + "@modelcontextprotocol/server": "2.0.0", "cors": "^2.8.5", "express": "^5.1.0", - "zod": "^4.1.13" + "zod": "^4.2.0" }, "bin": { "mcp-video-resource-server": "dist/index.js" @@ -5754,27 +5765,21 @@ "node": ">= 0.6" } }, - "node_modules/@modelcontextprotocol/server-video-resource/node_modules/zod": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.5.tgz", - "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@modelcontextprotocol/server-wiki-explorer": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-wiki-explorer/-/server-wiki-explorer-1.7.5.tgz", - "integrity": "sha512-uT9daqEGDfSZv1KiqtoXn0kE+es/uH4yNo3dPplP4BcyG95haZjs+7WBQIrjdIRhZXVFTYBu3qLACu6ObI7AxA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server-wiki-explorer/-/server-wiki-explorer-2.0.0.tgz", + "integrity": "sha512-vfgrWpsq7APiUmyk5+6wZ1JE4XA8iFGI382BUO0NuooYlvgg2UMbgrRPjEFrc68uGjnpIDsTUAVdFEhxC89NrQ==", "license": "MIT", "dependencies": { - "@modelcontextprotocol/ext-apps": "^1.7.0", - "@modelcontextprotocol/sdk": "^1.29.0", + "@modelcontextprotocol/client": "2.0.0", + "@modelcontextprotocol/express": "2.0.0", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "2.0.0", + "@modelcontextprotocol/server": "2.0.0", "cheerio": "^1.0.0", "cors": "^2.8.5", "express": "^5.1.0", - "zod": "^4.1.13" + "zod": "^4.2.0" }, "bin": { "mcp-wiki-explorer-server": "dist/index.js" @@ -6042,15 +6047,6 @@ "node": ">= 0.6" } }, - "node_modules/@modelcontextprotocol/server-wiki-explorer/node_modules/zod": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.5.tgz", - "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@napi-rs/canvas": { "version": "0.1.88", "resolved": "https://registry.npmjs.org/@napi-rs/canvas/-/canvas-0.1.88.tgz", @@ -12708,9 +12704,10 @@ } }, "node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.5.4.tgz", + "integrity": "sha512-sC95tT5iHHH9gtpj6A81kh+NEaRAUFN+qlUPDUbRfOMvNf5QCBqsb3WgvnpVtK5Y+4UfA6KqufotuTvMGiTlsA==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/package.json b/package.json index 9b5feca..22b6713 100644 --- a/package.json +++ b/package.json @@ -23,23 +23,25 @@ "clean": "rm -rf dist" }, "dependencies": { - "@modelcontextprotocol/ext-apps": "^1.7.5", + "@modelcontextprotocol/ext-apps": "^2.0.0", + "@modelcontextprotocol/node": "^2.0.0", "@modelcontextprotocol/sdk": "1.29.0", - "@modelcontextprotocol/server-budget-allocator": "^1.7.5", - "@modelcontextprotocol/server-cohort-heatmap": "^1.7.5", - "@modelcontextprotocol/server-customer-segmentation": "^1.7.5", - "@modelcontextprotocol/server-debug": "^1.7.5", - "@modelcontextprotocol/server-lazy-auth": "^1.7.5", - "@modelcontextprotocol/server-map": "^1.7.5", - "@modelcontextprotocol/server-pdf": "^1.7.5", - "@modelcontextprotocol/server-scenario-modeler": "^1.7.5", - "@modelcontextprotocol/server-shadertoy": "^1.7.5", - "@modelcontextprotocol/server-sheet-music": "^1.7.5", - "@modelcontextprotocol/server-system-monitor": "^1.7.5", - "@modelcontextprotocol/server-threejs": "^1.7.5", - "@modelcontextprotocol/server-transcript": "^1.7.5", - "@modelcontextprotocol/server-video-resource": "^1.7.5", - "@modelcontextprotocol/server-wiki-explorer": "^1.7.5", + "@modelcontextprotocol/server": "^2.0.0", + "@modelcontextprotocol/server-budget-allocator": "^2.0.0", + "@modelcontextprotocol/server-cohort-heatmap": "^2.0.0", + "@modelcontextprotocol/server-customer-segmentation": "^2.0.0", + "@modelcontextprotocol/server-debug": "^2.0.0", + "@modelcontextprotocol/server-lazy-auth": "^2.0.0", + "@modelcontextprotocol/server-map": "^2.0.0", + "@modelcontextprotocol/server-pdf": "^2.0.0", + "@modelcontextprotocol/server-scenario-modeler": "^2.0.0", + "@modelcontextprotocol/server-shadertoy": "^2.0.0", + "@modelcontextprotocol/server-sheet-music": "^2.0.0", + "@modelcontextprotocol/server-system-monitor": "^2.0.0", + "@modelcontextprotocol/server-threejs": "^2.0.0", + "@modelcontextprotocol/server-transcript": "^2.0.0", + "@modelcontextprotocol/server-video-resource": "^2.0.0", + "@modelcontextprotocol/server-wiki-explorer": "^2.0.0", "@redis/client": "^1.6.0", "cors": "^2.8.5", "dotenv": "^16.4.7", @@ -48,7 +50,7 @@ "raw-body": "^3.0.0", "react": "^19.2.1", "react-dom": "^19.2.1", - "zod": "^3.25.76" + "zod": "^4.2.0" }, "devDependencies": { "@eslint/js": "^9.15.0", diff --git a/src/apps/hello-world/App.tsx b/src/apps/hello-world/App.tsx index 327a443..7d46710 100644 --- a/src/apps/hello-world/App.tsx +++ b/src/apps/hello-world/App.tsx @@ -2,7 +2,7 @@ * Simple Hello World MCP App demonstrating the ext-apps SDK with React. */ import { useApp } from "@modelcontextprotocol/ext-apps/react"; -import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; +import type { CallToolResult } from "@modelcontextprotocol/client"; import { StrictMode, useState } from "react"; import { createRoot } from "react-dom/client"; diff --git a/src/modules/example-apps/index.ts b/src/modules/example-apps/index.ts index d2b3ce5..519e3d8 100644 --- a/src/modules/example-apps/index.ts +++ b/src/modules/example-apps/index.ts @@ -11,13 +11,16 @@ import { Router, Request, Response, NextFunction } from 'express'; import cors from 'cors'; -import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js'; -import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; +import { NodeStreamableHTTPServerTransport } from '@modelcontextprotocol/node'; +import type { McpServer } from '@modelcontextprotocol/server'; import { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js'; import { isInitializeRequest } from '@modelcontextprotocol/sdk/types.js'; // Import createServer from each example package (compiled JS) -// All packages are published on the public npm registry +// All packages are published on the public npm registry. Since ext-apps 2.0 +// these servers are built on the split MCP SDK 2.0 packages, so they connect +// to the 2.0 transport below while the rest of this host stays on SDK 1.x; +// both SDK lines install side by side. import { createServer as createBudgetAllocatorServer } from '@modelcontextprotocol/server-budget-allocator'; import { createServer as createCohortHeatmapServer } from '@modelcontextprotocol/server-cohort-heatmap'; import { createServer as createCustomerSegmentationServer } from '@modelcontextprotocol/server-customer-segmentation'; @@ -131,13 +134,13 @@ export class ExampleAppsModule { // Create fresh server and transport for each request (stateless mode) const server = createServer(); - const transport = new StreamableHTTPServerTransport({ + const transport = new NodeStreamableHTTPServerTransport({ sessionIdGenerator: undefined, // Stateless: no session management }); res.on('close', () => { - transport.close(); - server.close(); + transport.close().catch(() => {}); + server.close().catch(() => {}); }); await server.connect(transport);