Skip to content

fix: keep optional MCP imports out of bundles - #285

Merged
antfu merged 2 commits into
devframes:mainfrom
onmax:fix/optional-mcp-bundles
Aug 24, 2026
Merged

fix: keep optional MCP imports out of bundles#285
antfu merged 2 commits into
devframes:mainfrom
onmax:fix/optional-mcp-bundles

Conversation

@onmax

@onmax onmax commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

What

Resolve the optional MCP adapter at runtime from the installed devframe package. devframe/initiate, devframe/adapters/cac, @devframes/hub/initiate, and @devframes/next/hub no longer expose the adapter or its optional SDK peer to consumer bundle graphs.

Enabling MCP still loads the same adapter. Bundle-level coverage exercises a complete MCP initialize handshake.

Why

A literal dynamic import remains visible to bundlers. As a result, bundling an ordinary @devframes/hub/initiate consumer failed unless @modelcontextprotocol/server was installed, even when MCP was disabled.

pnpm knip remains red on the existing root bump.config.ts import of undeclared tinyexec; this branch does not touch that file or dependency.

@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

@onmax is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

@antfu
antfu merged commit 423293a into devframes:main Aug 24, 2026
8 of 10 checks passed
@onmax
onmax deleted the fix/optional-mcp-bundles branch August 24, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants