WV

webfansplz/vite-plugin-vue-mcp

Browser automation

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

578 stars 33 forks 품질 62 트렌드 21MIT

모델들이 Vue 앱을 더 잘 이해할 수 있도록 돕는 MCP 서버를 제공하는 Vite 플러그인입니다.

개요

! [NPM 버전] [NPM-버전-href]! [npm 다운로드] [npm-downloads-href]! [번들] [bundle-href]! [라이선스] [라이선스-href] Vite 플러그인으로, Vue 앱용 MCP 서버가 컴포넌트 트리, 상태, 경로, Pinia 트리 및 상태에 대한 정보를 제공할 수 있게 합니다. 그 후 MCP 서버는 [[T0]에서 이용 가능해집니다. Cursor를 사용 중이라면, 프로젝트 루트에 .cursor/mcp.json 파일을 생성하세요. 이 플러그인이 자동으로 업데이트해 줍니다. MCP에 대한 자세한 내용은 공식 커서 문서를 확인하세요. get-component-tree: Vue 컴포넌트 트리를 얻으세요. get-component-state: 컴포넌트의 상태 (입력: componentName)를 얻습니다. edit-component-state: 컴포넌트의 상태를 편집합니다 (입력: componentName, path, value, valueType). highlight-component: 컴포넌트를 강조 표시 (input: componentName).

개요(AI 번역)

Vite 플러그인으로, Vue 앱용 MCP 서버가 컴포넌트 트리, 상태, 경로, Pinia 트리 및 상태에 대한 정보를 제공할 수 있게 합니다.

설치 📦

사용 🔨

그 후 MCP 서버는 http://localhost:[port]/__mcp/sse에서 이용할 수 있습니다.

커서를 사용 중이라면, 프로젝트 루트에 .cursor/mcp.json 파일을 생성하세요. 이 플러그인이 자동으로 업데이트해 줍니다. MCP에 대한 자세한 내용은 공식 커서 문서를 확인해 주세요.

옵션

기능/도구 ✨

컴포넌트 트리 가져오기

get-component-tree: Vue 컴포넌트 트리를 얻으세요.

구성 요소 상태 확보

get-component-state: 구성 요소의 상태를 얻습니다 (입력: componentName).

컴포넌트 상태 편집

edit-component-state: 구성 요소의 상태를 편집합니다 (입력: componentName, path, value, valueType).

하이라이트 구성 요소

highlight-component: 구성 요소를 강조 표시 (입력: componentName).

경로를 찾아

get-router-info: 애플리케이션의 Vue 라우터 정보를 받아보세요.

피니아 트리를 잡아라

get-pinia-tree: 애플리케이션의 Pinia 트리를 얻으세요.

피니아 주를 잡아.

get-pinia-state: 애플리케이션의 Pinia 상태를 얻습니다 (입력: storeName).

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

vite-plugin-vue-mcp

[![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![bundle][bundle-src]][bundle-href] [![License][license-src]][license-href]

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

  /**
   * 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

  /**
   * 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.

Get Component State

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

Edit Component State

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

Highlight Component

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

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →