Registry / llm-agents / vite-plugin-mcp

vite-plugin-mcp

JSON →
library0.3.2jsnpmunverified

A Vite plugin (v0.3.2, active development) that runs a Model Context Protocol (MCP) server alongside your Vite dev server to expose app setup details and module graphs to AI agents. It helps LLMs understand your project structure, routes, and dependencies. Supports automatic editor config (VS Code, Cursor, Windsurf, Claude Code) via `updateConfig`. Requires Vite >=6.0.0. No official release cadence; breaking changes are frequent (e.g., option renames, config unification). Not production-ready.

npm install vite-plugin-mcp
INSTALL
IMPORT
SIG · VITE-PLUGIN-MCP
V
vite-plugin-mcp
llm-agentsjavascriptv0.3.2
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–223 runs
build_error
glibc
node 18–223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ViteMcp
✓ import { ViteMcp } from 'vite-plugin-mcp'
✗ import ViteMcp from 'vite-plugin-mcp'
Named export, not default.
generateMcpConfig
✓ import { generateMcpConfig } from 'vite-plugin-mcp'
✗ import { generateMCPConfig } from 'vite-plugin-mcp'
Case-sensitive: lowercase 'Mcp'.
defineViteMcpConfig
✓ import { defineViteMcpConfig } from 'vite-plugin-mcp'
✗ import { defineMcpConfig } from 'vite-plugin-mcp'
Exact function name as exported.

Adds MCP server to Vite dev server with auto-editor config and custom server name.

import { defineConfig } from 'vite' import { ViteMcp } from 'vite-plugin-mcp' export default defineConfig({ plugins: [ ViteMcp({ updateConfig: true, updateConfigServerName: 'my-vite-mcp' }) ] })
Debug
Known issues
breakingIn v0.3.0, package renamed from `nuxt-mcp` to `vue-mcp`? Actually 'nuxt-mcp-dev'? This is for Vite, not Nuxt - ensure you install `vite-plugin-mcp`.
fix
Use correct package name: `npm i -D vite-plugin-mcp`.
affects: >=0.3.0
breakingv0.2.0: Unified editor config options into `updateConfig`; removed `updateCursorMcpJson`, `updateVSCodeMcpJson`, `updateWindsurfMcpJson`. Also renamed `mcpPath` to `mcpRouteRoot`.
fix
Use `updateConfig: true|false` and `mcpRouteRoot` instead of old options.
affects: >=0.2.0
gotchaPlugin is experimental. Not recommended for production use. Breaking changes may occur without major version bump.
fix
Pin exact version and test thoroughly before upgrading.
affects: >=0.0.0
gotchaMCP server endpoint is http://localhost:5173/__mcp/sse. If Vite port changes, this URL will change accordingly.
fix
Check Vite config for `server.port` if MCP connection fails.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'vite-plugin-mcp' or its corresponding type declarations.
Package not installed or typings not generated.
fix
Ensure `vite-plugin-mcp` is installed as a dev dependency: `npm i -D vite-plugin-mcp`.
The 'ViteMcp' plugin requires Vite >= 6.0.0
Plugin peer dependency on Vite 6+, but older Vite is installed.
fix
Upgrade Vite to version 6 or later: `npm i -D vite@6`.
Upgrade
Version history
0.3.2latest on npm
Audit
Dependencies
viterequiredPeer dependency: requires Vite 6+ for plugin API and dev server integration.
Agent activity
55 hits · last 30 days
node
48
Perplexity
1
OpenAI (training)
1
Resources
vite-plugin-mcp — npm install vite-plugin-mcp · libregistry