Token导航 LogoToken导航TokenDH.com
Vue MCP Server logo
开发工具未说明官方级别未说明来源级核验

Vue MCP Server

MCP Server

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

工具数

0

提示词数

0

GitHub Stars

565

资源数

0
开发工具Cursor命令行工具Cursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

webfansplz

提供方

webfansplz

最后核验

2026/5/18 02:53

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

快速插件视图MCP

](https://npmjs.com/package/vite-plugin-vue-mcp) ](https://npmjs.com/package/vite-plugin-vue-mcp) ![bundle](https://bundlephobia.com/result?p=vite-plugin-vue-mcp) ![License](https://github.com/webfansplz/vite-plugin-vue-mcp/blob/main/LICENSE)

Vite插件,使Vue应用程序的MCP服务器能够提供有关组件树、状态、路由和pinia树和状态的信息。

安装📦

pnpm install vite-plugin-vue-mcp -D

用法🔨

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

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

然后,MCP服务器将在 http://localhost:[port]/__mcp/sse.

如果您正在使用Cursor,请创建一个 .cursor/mcp.json 在项目根目录下的文件中,此插件将自动为您更新它。有关MCP的更多详细信息,请查看 Cursor官方文档.

选项

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
}

功能/工具✨

获取组件树

get-component-tree:获取Vue组件树。

component-tree

获取组件状态

get-component-state:获取组件的状态(输入: componentName).

component-state

编辑组件状态

edit-component-state:编辑组件的状态(输入: componentName, path, value, valueType).

edit-component-state

突出显示组件

highlight-component:突出显示一个组件(输入: componentName).

highlight-component

获取路线

get-router-info:获取应用程序的Vue路由器信息。

route-tree

获取Pinia树

get-pinia-tree:获取应用程序的Pinia树。

pinia-tree

获取皮尼亚州

get-pinia-state:获取应用程序的Pinia状态(输入: storeName).

pinia-state

建筑⚡️

architecture

通知💡

在使用这些功能之前,请确保应用程序正在浏览器中运行。

鸣谢💖

许可证📖

目录标签

目录标签

开发工具Cursor命令行工具developer-toolsVue本地部署Vue调试组件树状态管理Vite插件

支持客户端

Cursor

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP