eve bundles @ai-sdk/mcp into its package and rewrites three parts of it during the build

Kind: idiosyncrasy · Status: current · Last verified: 2026-11-16 · Clients: eve · Revisions: 2026-07-28, 2025-11-25

@ai-sdk/mcp is listed under devDependencies of packages/eve as catalog:. pnpm-workspace.yaml sets that to ^2.0.99 and pnpm-lock.yaml resolves it to 2.0.99. The package's dependencies are nitro, rolldown and undici. scripts/vendor-compiled.mjs bundles the SDK's main entry into .generated/compiled/@ai-sdk/mcp/index.js, which ships as dist/src/compiled/@ai-sdk/mcp/index.js and is imported as #compiled/@ai-sdk/mcp/index.js. The published package does not depend on @ai-sdk/mcp.

The usual places to look for a patch show nothing. patches/ holds one file, for @vercel/geistdocs, and it is the only patchedDependencies entry. The patches are three rolldown transform plugins in packages/eve/scripts/vendor-compiled/@ai-sdk/mcp.mjs. Each replaces exact source snippets of @ai-sdk/mcp/dist/index.js and throws when a snippet is missing, so an SDK bump that changes the patched code fails the build.

The protocol default is the SDK's. protocolVersionDiscovery defaults to true in the SDK constructor and eve forwards the connection's value unchanged. An HTTP connection starts with server/discover at 2026-07-28, with no timeout. A JSON-RPC error other than -32020, -32021 and -32022, or an HTTP error status other than 401, leads to initialize. A 401 goes to eve's sign-in flow. A network failure fails the connection. The SSE fallback transport has no discovery support and always uses initialize.

The bundle in the probe's install of eve 1.0.0-rc.6 contains the three patched snippets over SDK 2.0.73. The probe's capture from that build shows server/discover first by default and initialize at 2025-11-25 with protocolVersionDiscovery: false, which is what this read finds for 2.0.99.

Sources