“https://github.com/webfansplz/vite-plugin-vue-mcp”
从 readme 中可以看见:“Vite plugin that enables a MCP server for your Vue app to provide information about the component tree, state, routes, and pinia tree and state.”
1、npm install vite-plugin-vue-mcp -D
2、在 vite.config.js 中引入这个插件
plugins: [
VueMcp({
// 配置项
})
],
3、在项目根目路下新建 .cursor/mcp.json
4、npm run dev
5、在 Cursor Setting -> MCP ->enable 就可以了
