Bug: MCP auto-mount has no opt-out for Vite-plugin consumers
Describe the bug
@devframes/[email protected] changed the aggregate MCP route's default from off to 'auto', mounting a Streamable-HTTP endpoint at <base>__mcp as soon as any agent-flagged action exists.
@vitejs/devtools's Vite plugin builds its initHub({...}) call from a fixed list of fields (base, context, ui, renderers, clientModuleResolution, auth, allowedOrigins, server/ws, host), unchanged from 0.6.1 through 0.7.1:
// dist/server-*.js
const hub = initHub({
base: DEVTOOLS_MOUNT_PATH,
context,
ui: createViteDevToolsUi(options.ui),
renderers: resolveDockRendererRegistrations(options.renderers),
...context.viteServer ? { clientModuleResolution: "/@id/{specifier}" } : {},
auth: authDisabled ? false : getAuthHandler(context),
...allowedOrigins ? { allowedOrigins } : {},
...options.server ? { server: options.server } : { ws: ... },
...options.host ? { host: options.host } : {}
});
mcp never appears there, and none of DevToolsConfig, DevToolsPluginOptions, or DevToolsOptions/CreateDevToolsHubOptions expose a field for it. So a Vite-plugin consumer inherits the new auto-mount with no supported way to turn it off, even if they bridge MCP through something else already.
Maybe we should add mcp?: McpSetting to DevToolsOptions/DevToolsPluginOptions and forward it into initHub({...}) ?
Reproduction
No hosted repro, since this only shows up once a devframe-based Vite plugin is wired up with agent-flagged actions and something is watching /__devtools/__mcp. Steps:
pnpm add @vitejs/[email protected] @devframes/[email protected](or any hub>=0.9.9) in a project using the Vite plugin.- Register at least one action with
agent: {...}metadata (any devframe capability that ships one works). - Run
vite devand request<devtools-base>__mcp. - It answers, and there's no option anywhere in the plugin's config to make it not.
System Info
System:
OS: macOS 26.5.1
CPU: (11) arm64 Apple M3 Pro
Memory: 79.97 MB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.20.0
npm: 11.19.0
pnpm: 11.22.0
bun: 1.3.14
Browsers:
Chrome: 152.0.7977.65
Safari: 26.5
Used package manager
pnpm