MCPHub LabRegistryvite-plugin-vue-mcp
webfansplz

vite plugin vue mcp

Built by webfansplz 553 stars

What is vite plugin vue mcp?

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

How to use vite plugin vue mcp?

1. Install a compatible MCP client (like Claude Desktop). 2. Open your configuration settings. 3. Add vite plugin vue mcp using the following command: npx @modelcontextprotocol/vite-plugin-vue-mcp 4. Restart the client and verify the new tools are active.
🛡️ Scoped (Restricted)
npx @modelcontextprotocol/vite-plugin-vue-mcp --scope restricted
🔓 Unrestricted Access
npx @modelcontextprotocol/vite-plugin-vue-mcp

Key Features

Native MCP Protocol Support
Real-time Tool Activation & Execution
Verified High-performance Implementation
Secure Resource & Context Handling

Optimized Use Cases

Extending AI models with custom local capabilities
Automating system workflows via natural language
Connecting external data sources to LLM context windows

vite plugin vue mcp FAQ

Q

Is vite plugin vue mcp safe?

Yes, vite plugin vue mcp follows the standardized Model Context Protocol security patterns and only executes tools with explicit user-granted permissions.

Q

Is vite plugin vue mcp up to date?

vite plugin vue mcp is currently active in the registry with 553 stars on GitHub, indicating its reliability and community support.

Q

Are there any limits for vite plugin vue mcp?

Usage limits depend on the specific implementation of the MCP server and your system resources. Refer to the official documentation below for technical details.

Official Documentation

View on GitHub

vite-plugin-vue-mcp

npm version npm downloads bundle License

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.

Installation 📦

pnpm install vite-plugin-vue-mcp -D

Usage 🔨

// vite.config.ts
import { VueMcp } from 'vite-plugin-vue-mcp'

export default defineConfig({
  plugins: [VueMcp()],
})

Then the MCP server will be available at http://localhost:[port]/__mcp/sse.

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.

Options

export interface VueMcpOptions {
  /**
   * The host to listen on, default is `localhost`
   */
  host?: string

  /**
   * Print the MCP server URL in the console
   *
   * @default true
   */
  printUrl?: boolean

  /**
   * The MCP server info. Ingored when `mcpServer` is provided
   */
  mcpServerInfo?: McpServerInfo

  /**
   * Custom MCP server, when this is provided, the built-in MCP tools will be ignored
   */
  mcpServer?: (viteServer: ViteDevServer) => Awaitable<McpServer>

  /**
   * Setup the MCP server, this is called when the MCP server is created
   * You may also return a new MCP server to replace the default one
   */
  mcpServerSetup?: (server: McpServer, viteServer: ViteDevServer) => Awaitable<void | McpServer>

  /**
   * The path to the MCP server, default is `/__mcp`
   */
  mcpPath?: string

  /**
   * Update the address of the MCP server in the cursor config file `.cursor/mcp.json`,
   * if `.cursor` folder exists.
   *
   * @default true
   */
  updateCursorMcpJson?: boolean | {
    enabled: boolean
    /**
     * The name of the MCP server, default is `vue-mcp`
     */
    serverName?: string
  }

  /**
   * append an import to the module id ending with `appendTo` instead of adding a script into body
   * useful for projects that do not use html file as an entry
   *
   * WARNING: only set this if you know exactly what it does.
   * @default ''
   */
  appendTo?: string | RegExp
}

Features/Tools ✨

Get Component Tree

get-component-tree: Get the Vue component tree.

component-tree

Get Component State

get-component-state: Get the state of a component (input: componentName).

component-state

Edit Component State

edit-component-state: Edit the state of a component (input: componentName, path, value, valueType).

edit-component-state

Highlight Component

highlight-component: Highlight a component (input: componentName).

highlight-component

Get Routes

get-router-info: Get the Vue router info of the application.

route-tree

Get Pinia Tree

get-pinia-tree: Get the Pinia tree of the application.

pinia-tree

Get Pinia State

get-pinia-state: Get the Pinia state of the application (input: storeName).

pinia-state

Architecture ⚡️

architecture

Notice 💡

Please ensure the application is running in your browser before using the features.

Credits 💖

This project is inspired by vite-plugin-mcp. Thanks to @antfu for the great work.

License 📖

MIT License © Arlo

<!-- Badges -->

Global Ranking

-
Trust ScoreMCPHub Index

Based on codebase health & activity.

Manual Config

{ "mcpServers": { "vite-plugin-vue-mcp": { "command": "npx", "args": ["vite-plugin-vue-mcp"] } } }