What's Changed
ext-apps 2.0 moves to the MCP TypeScript SDK 2.0 split packages. The MCP Apps wire protocol is unchanged: 2.x Views run in 1.x hosts and 2.x hosts render 1.x Views (covered by a test that runs the published 1.7.5 against this release in both directions). What breaks is dependencies and the TypeScript API; see the migration guide.
Breaking changes
- Peer dependencies.
@modelcontextprotocol/sdk@^1is replaced by@modelcontextprotocol/client@^2.0.0(required:AppandAppBridgeextend itsProtocol),@modelcontextprotocol/server@^2.0.0(optional, only for the./serverhelpers), andzod@^4.2.0. Node.js 20+. - zod 3 is no longer supported. SDK 2.0 requires zod 4.2+ (the release that added Standard JSON Schema output); the 1.x fallback for zod 3.25 is gone. Raw zod shapes in
registerAppToolstill work as a deprecated overload; wrap them inz.object({...})to move off it. - Handler context. Custom handlers receive the SDK 2.x
BaseContext:extra.signalis nowextra.mcpReq.signal,extra.requestIdisextra.mcpReq.id. setRequestHandler/setNotificationHandlerare keyed by method name. The 2.x form issetRequestHandler("method", { params }, (params, ctx) => …). The 1.x(Schema, handler)form still works as a deprecated overload with a one-time warning (#769) and goes away in 3.0.- The double-registration guard now covers the SDK's own handlers. Registering a handler for
notifications/progressornotifications/cancelledthrowsalready registered, aspingand theon*-owned methods did in 1.x. ProtocolWithEventsis removed.AppRequest,AppNotificationandAppResultremain as deprecated type aliases.- Errors. Remote JSON-RPC errors are
ProtocolError(numericcode); local failures areSdkError(stringcode). Host-side wire deltas: a handler-thrown-32002reaches the View as-32602, invalid params onui/*methods go from-32603to-32602, and theMCP error N:message prefix is gone. schema.jsonfollows the 2.0 core schemas:structuredContentis any JSON value, result_metadocumentsio.modelcontextprotocol/serverInfo,toolInfo.tool.outputSchemais a loose object, and a recursive JSON-value definition is added.
SDK
- Migrate to SDK v2 with the official
Protocoland isolated role peers by @tonxxd, building on @khandrew1's #710 and @felixweinberger's #712, in #720 - SDK 2.0 fixups: regenerated lockfile,
^2.0.0peers, restored double-registration guard, deprecated raw-shaperegisterAppTooloverload, migration guide, wire-compat tests, MCPB build in #768 - Fix: explicit
.jsextensions on relative imports so published declarations resolve under NodeNext / Node16 (#704) by @ken-jo in #705 - Keep the 1.x handler registration forms as deprecated overloads in #769
- Cross-version interop test against the published ext-apps 1.7.5 in #770
Examples
- All examples migrated to the split SDK packages (
NodeStreamableHTTPServerTransport,z.objectschemas,extra.mcpReq.*) in #720 server-pdfnow advertises JSON Schema 2020-12 on every tool'sinputSchema/outputSchema, which fixes #765 for clients with a strict 2020-12 validator
Docs
Security
npm audit reports 10 findings (2 critical, 4 high, 4 moderate), all in example workspaces or build tooling, none reachable from the published package, whose only runtime dependency is @standard-schema/spec:
seroval/solid-js(GHSA-mv8w-475r-vwqw): the Solid example's vite plugin, pinned by a rootoverridesundici7.28.0:cheerioin wiki-explorer-servernanoid,postcss: vitebrace-expansion: nodemon (dev)hono/@hono/node-server(GHSA-frvp-7c67-39w9):@modelcontextprotocol/nodein the examples' servers; same advisory as the 1.7.5 residual, still unreachable (onlygetRequestListener/serveare imported)qs: express 5 in examples;fflate:@types/three(dev)
All have non-major fixes available and will be picked up in a follow-up, kept off this release to keep the version diff clean.
Full Changelog: v1.7.5...v2.0.0