Skip to content
Back to search

vite-plugin-vue-mcp

Vite plugin that enables a MCP server helping models to understand your Vue app better.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/webfansplz--vite-plugin-vue-mcp/badge.svg)](/listings/webfansplz--vite-plugin-vue-mcp)

HTML

<a href="/listings/webfansplz--vite-plugin-vue-mcp"><img src="/api/listings/webfansplz--vite-plugin-vue-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

pnpm install vite-plugin-vue-mcp -D

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 162 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # vite-plugin-vue-mcp
  2. [![npm version][npm-version-src]][npm-version-href]
  3. [![npm downloads][npm-downloads-src]][npm-downloads-href]
  4. [![bundle][bundle-src]][bundle-href]
  5. [![License][license-src]][license-href]
  6. 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.
  7. ## Installation 📦
  8. ```bash
  9. pnpm install vite-plugin-vue-mcp -D
  10. ```
  11. ## Usage 🔨
  12. ```ts
  13. // vite.config.ts
  14. import { VueMcp } from 'vite-plugin-vue-mcp'
  15. export default defineConfig({
  16. plugins: [VueMcp()],
  17. })
  18. ```
  19. Then the MCP server will be available at `http://localhost:[port]/__mcp/sse`.
  20. If you are using Cursor, create a `.cursor/mcp.json` file in your project root, this plugin will automatically update it for you. For more details about the MCP, check the [official Cursor documentation](https://docs.cursor.com/context/model-context-protocol).
  21. ### Options
  22. ```ts
  23. export interface VueMcpOptions {
  24. /**
  25. * The host to listen on, default is `localhost`
  26. */
  27. host?: string
  28. /**
  29. * Print the MCP server URL in the console
  30. *
  31. * @default true
  32. */
  33. printUrl?: boolean
  34. /**
  35. * The MCP server info. Ingored when `mcpServer` is provided
  36. */
  37. mcpServerInfo?: McpServerInfo
  38. /**
  39. * Custom MCP server, when this is provided, the built-in MCP tools will be ignored
  40. */
  41. mcpServer?: (viteServer: ViteDevServer) => Awaitable<McpServer>
  42. /**
  43. * Setup the MCP server, this is called when the MCP server is created
  44. * You may also return a new MCP server to replace the default one
  45. */
  46. mcpServerSetup?: (server: McpServer, viteServer: ViteDevServer) => Awaitable<void | McpServer>
  47. /**
  48. * The path to the MCP server, default is `/__mcp`
  49. */
  50. mcpPath?: string
  51. /**
  52. * Update the address of the MCP server in the cursor config file `.cursor/mcp.json`,
  53. * if `.cursor` folder exists.
  54. *
  55. * @default true
  56. */
  57. updateCursorMcpJson?: boolean | {
  58. enabled: boolean
  59. /**
  60. * The name of the MCP server, default is `vue-mcp`
  61. */
  62. serverName?: string
  63. }
  64. /**
  65. * append an import to the module id ending with `appendTo` instead of adding a script into body
  66. * useful for projects that do not use html file as an entry
  67. *
  68. * WARNING: only set this if you know exactly what it does.
  69. * @default ''
  70. */
  71. appendTo?: string | RegExp
  72. }
  73. ```
  74. ## Features/Tools ✨
  75. ### Get Component Tree
  76. `get-component-tree`: Get the Vue component tree.
  77. ![component-tree](./screenshots/component-tree.gif)
  78. ### Get Component State
  79. `get-component-state`: Get the state of a component (input: `componentName`).
  80. ![component-state](./screenshots/component-state.gif)
  81. ### Edit Component State
  82. `edit-component-state`: Edit the state of a component (input: `componentName`, `path`, `value`, `valueType`).
  83. ![edit-component-state](./screenshots/edit-component-state.gif)
  84. ### Highlight Component
  85. `highlight-component`: Highlight a component (input: `componentName`).
  86. ![highlight-component](./screenshots/highlight-component.gif)
  87. ### Get Routes
  88. `get-router-info`: Get the Vue router info of the application.
  89. ![route-tree](./screenshots/router-info.gif)
  90. ### Get Pinia Tree
  91. `get-pinia-tree`: Get the Pinia tree of the application.
  92. ![pinia-tree](./screenshots/pinia-tree.gif)
  93. ### Get Pinia State
  94. `get-pinia-state`: Get the Pinia state of the application (input: `storeName`).
  95. ![pinia-state](./screenshots/pinia-state.gif)
  96. ## Architecture ⚡️
  97. ![architecture](./screenshots/architecture.png)
  98. ## Notice 💡
  99. **Please ensure the application is running in your browser before using the features.**
  100. ## Credits 💖
  101. This project is inspired by [vite-plugin-mcp](https://github.com/antfu/nuxt-mcp/tree/main/packages/vite-plugin-mcp). Thanks to [@antfu](https://github.com/antfu) for the great work.
  102. ## License 📖
  103. [MIT](./LICENSE) License © [Arlo](https://github.com/webfansplz)
  104. <!-- Badges -->
  105. [npm-version-src]: https://img.shields.io/npm/v/vite-plugin-vue-mcp?style=flat&colorA=080f12&colorB=1fa669
  106. [npm-version-href]: https://npmjs.com/package/vite-plugin-vue-mcp
  107. [npm-downloads-src]: https://img.shields.io/npm/dm/vite-plugin-vue-mcp?style=flat&colorA=080f12&colorB=1fa669
  108. [npm-downloads-href]: https://npmjs.com/package/vite-plugin-vue-mcp
  109. [bundle-src]: https://img.shields.io/bundlephobia/minzip/vite-plugin-vue-mcp?style=flat&colorA=080f12&colorB=1fa669&label=minzip
  110. [bundle-href]: https://bundlephobia.com/result?p=vite-plugin-vue-mcp
  111. [license-src]: https://img.shields.io/github/license/webfansplz/vite-plugin-vue-mcp.svg?style=flat&colorA=080f12&colorB=1fa669
  112. [license-href]: https://github.com/webfansplz/vite-plugin-vue-mcp/blob/main/LICENSE

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.