vue-mcp-next

vue-mcp-next

Enables real-time debugging and state manipulation of Vue.js applications through MCP protocol, integrating with Vue DevTools to access component trees, states, router info, and Pinia stores.

Category
Visit Server

README

Vue MCP Next

Language / 语言: English | δΈ­ζ–‡

πŸ“¦ Installation

# Using npm
npm install vue-mcp-next

# Using yarn
yarn add vue-mcp-next

# Using pnpm
pnpm add vue-mcp-next

⚠️ Important Prerequisites

Before using Vue MCP Next, you must install and enable Vue DevTools!

Vue MCP Next relies on Vue DevTools to access and manipulate the runtime state of Vue applications. Please ensure:

  1. Install Vue DevTools browser extension
  2. DevTools is connected when the application is running
  3. Confirm DevTools can properly display component tree and state

Without Vue DevTools, Vue MCP Next will not work properly.

✨ Features

  • πŸš€ Standard MCP Protocol: Fully implemented based on official SDK
  • πŸ—οΈ Layered Architecture: Core layer focuses on protocol, Plugin layer adapts platforms
  • πŸ”§ Multi-platform Support: Supports Vite, Webpack, Farm and other build tools
  • ⚑ Runtime Operations: Real-time viewing and modification of Vue application state
  • πŸ” Built-in Inspector: Integrated MCP Inspector debugging tool
  • πŸ“± Vue DevTools Integration: Based on @vue/devtools-kit

πŸš€ Quick Start

Prerequisites

Before getting started, please ensure:

  1. Install Vue DevTools browser extension

  2. Ensure Vue DevTools can properly connect to your application

Vite Project Configuration

Add the plugin to your vite.config.ts:

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { vueMcpVitePlugin } from 'vue-mcp-next'
import DevTools from 'vite-plugin-vue-devtools'

export default defineConfig({
  server: {
    port: 5174  // Vite uses port 5174
  },
  plugins: [
    vue(),
    DevTools(),  // Recommended: Enable Vue DevTools during development
    vueMcpVitePlugin({
      port: 8890,                    // MCP server port
      inspector: {
        enabled: true,               // Enable MCP Inspector
        autoStart: true,             // Auto start
        openBrowser: false,          // Whether to automatically open browser
      }
    })
  ],
})

Start the Project

pnpm dev

After starting:

  • Your Vue application will run at http://localhost:5174
  • MCP server will run on port 8890
  • MCP Inspector will start automatically (if enabled)
  • Ensure the Vue DevTools extension in your browser can properly connect to your application

πŸ”§ Configuration Options

VueMcpVitePlugin Options

interface VueMcpVitePluginOptions {
  port?: number                    // MCP server port, default 8890
  inspector?: {
    enabled?: boolean              // Enable Inspector, default true
    autoStart?: boolean            // Auto start, default false
    openBrowser?: boolean          // Auto open browser, default false
  }
}

πŸ“‹ Available Features

  • Component Tree Viewing (get-component-tree)
  • Component State Get/Edit (get-component-state, edit-component-state)
  • Component Highlighting (highlight-component)
  • Router Information (get-router-info)
  • Pinia State Management (get-pinia-tree, get-pinia-state)

πŸ’‘ Use Cases

  • Real-time Debugging: View and modify component state in Cursor
  • State Validation: Verify component and application state meets expectations
  • Interactive Testing: Simulate user interactions and state changes through AI commands
  • Demo and Teaching: Showcase internal state and component structure of Vue applications
  • Development Assistance: Quickly view router information, Pinia store state, etc.

A modern Vue.js Model Context Protocol implementation for Vue.js applications

Vue MCP Next is a modern MCP (Model Context Protocol) implementation that provides runtime state manipulation and control capabilities for Vue.js applications. This project is inspired by and built upon the excellent work of vite-plugin-vue-mcp, focusing on real-time manipulation of running Vue applications, supporting testing, debugging, demonstration scenarios, with layered architecture design, multi-build tool integration, and full compliance with official MCP protocol specifications.

πŸ—οΈ Project Structure

vue-mcp-next/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ client/                 # Client scripts
β”‚   β”‚   β”œβ”€β”€ client-script-manager.ts
β”‚   β”‚   └── devtools-client.ts
β”‚   β”œβ”€β”€ plugins/                # Build tool plugins
β”‚   β”‚   β”œβ”€β”€ base/               # Base plugin functionality
β”‚   β”‚   └── vite/               # Vite plugin implementation
β”‚   β”œβ”€β”€ server/                 # MCP server
β”‚   β”‚   β”œβ”€β”€ devtools-layer.ts
β”‚   β”‚   β”œβ”€β”€ http-server.ts
β”‚   β”‚   └── server.ts
β”‚   └── shared/                 # Shared types and utilities
β”œβ”€β”€ playground/                 # Development test environment
└── dist/                      # Build output

πŸ› οΈ Development

# Install dependencies
pnpm install

# Development mode
pnpm dev

# Start playground
pnpm dev:playground

# Build
pnpm build

# Test
pnpm test

# Type check
pnpm typecheck

πŸ“„ License

MIT License

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured