{"id":22733,"library":"vite-plugin-mcp","title":"vite-plugin-mcp","description":"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.","status":"active","version":"0.3.2","language":"javascript","source_language":"en","source_url":"https://github.com/antfu/nuxt-mcp-dev","tags":["javascript","vite-plugin","mcp","modelcontextprotocol","typescript"],"install":[{"cmd":"npm install vite-plugin-mcp","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-mcp","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-mcp","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: requires Vite 6+ for plugin API and dev server integration.","package":"vite","optional":false}],"imports":[{"note":"Named export, not default.","wrong":"import ViteMcp from 'vite-plugin-mcp'","symbol":"ViteMcp","correct":"import { ViteMcp } from 'vite-plugin-mcp'"},{"note":"Case-sensitive: lowercase 'Mcp'.","wrong":"import { generateMCPConfig } from 'vite-plugin-mcp'","symbol":"generateMcpConfig","correct":"import { generateMcpConfig } from 'vite-plugin-mcp'"},{"note":"Exact function name as exported.","wrong":"import { defineMcpConfig } from 'vite-plugin-mcp'","symbol":"defineViteMcpConfig","correct":"import { defineViteMcpConfig } from 'vite-plugin-mcp'"}],"quickstart":{"code":"import { defineConfig } from 'vite'\nimport { ViteMcp } from 'vite-plugin-mcp'\n\nexport default defineConfig({\n  plugins: [\n    ViteMcp({\n      updateConfig: true,\n      updateConfigServerName: 'my-vite-mcp'\n    })\n  ]\n})","lang":"typescript","description":"Adds MCP server to Vite dev server with auto-editor config and custom server name."},"warnings":[{"fix":"Use correct package name: `npm i -D vite-plugin-mcp`.","message":"In 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`.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"Use `updateConfig: true|false` and `mcpRouteRoot` instead of old options.","message":"v0.2.0: Unified editor config options into `updateConfig`; removed `updateCursorMcpJson`, `updateVSCodeMcpJson`, `updateWindsurfMcpJson`. Also renamed `mcpPath` to `mcpRouteRoot`.","severity":"breaking","affected_versions":">=0.2.0"},{"fix":"Pin exact version and test thoroughly before upgrading.","message":"Plugin is experimental. Not recommended for production use. Breaking changes may occur without major version bump.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Check Vite config for `server.port` if MCP connection fails.","message":"MCP server endpoint is http://localhost:5173/__mcp/sse. If Vite port changes, this URL will change accordingly.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Ensure `vite-plugin-mcp` is installed as a dev dependency: `npm i -D vite-plugin-mcp`.","cause":"Package not installed or typings not generated.","error":"Cannot find module 'vite-plugin-mcp' or its corresponding type declarations."},{"fix":"Upgrade Vite to version 6 or later: `npm i -D vite@6`.","cause":"Plugin peer dependency on Vite 6+, but older Vite is installed.","error":"The 'ViteMcp' plugin requires Vite >= 6.0.0"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}