modelscope·@webfansplz/vite-plugin-vue-mcp
通过 Model Context Protocol 服务器为 Vue 应用提供应用洞察,公开组件树、状态、路由和 Pinia 数据。
![npm version][npm-version-src] ![npm downloads][npm-downloads-src] ![bundle][bundle-src] ![License][license-src]
Vite 插件,为您的 Vue 应用程序提供组件树、状态、路由以及 Pinia 树和状态信息的 MCP 服务器。
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:[端口]/__mcp/sse 可用。
如果您正在使用 Cursor,请在项目根目录下创建一个 .cursor/mcp.json 文件,此插件将自动为您更新它。有关 MCP 的更多详细信息,请参阅 官方 Cursor 文档。
export interface VueMcpOptions {
/**
* The host to listen on, default is `localhost`
*/
host?: string
/**
* The port to listen on, default is the port of the Vite dev server
*/
port?: number
/**
* 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
}
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)。


请确保在使用功能之前,应用程序已经在浏览器中运行。
该项目受到 vite-plugin-mcp 的启发。感谢 @antfu 的出色工作。
一个为大型语言模型(LLM)设计的、高可用的12306余票查询工具服务,现已搭载智能会话管理引擎。 12306-MCP-Server 将复杂的12306余票查询接口封装为符合 Model Context Protocol (MCP) 规范的工具集,允许AI Agent通过自然语言无缝查询实时火车票、中转换乘和经停站信息。 从 v1.0.0 版本开始,项目引入了全新的智能会话管理系统,通过会话池、动态User-Agent轮换和自动错误恢复机制,将服务的稳定性与反屏蔽能力提升至全新高度。
阿里云可观测 MCP服务,提供了一系列访问阿里云可观测各产品的工具能力,覆盖产品包含阿里云日志服务SLS、阿里云应用实时监控服务ARMS、阿里云云监控等,任意支持 MCP 协议的智能体助手都可快速接入。
自动从文本中识别并提取法律条文,例如在合同、案件描述或法律文书中,精准定位涉及的具体法律条文(如“《民法典》第585条”),并将文本中的法律问题与对应法条内容关联,提取法规名称的服务。
用于哔哩哔哩API的MCP服务器,支持视频搜索、用户内容获取等多种操作,适用于哔哩哔哩内容管理和数据分析场景。
看起来您想要翻译一份英文技术文档,但您提供的内容中只有"asd"这个字符串,并没有实际的文档内容。请提供需要翻译的具体英文技术文档文本,这样我才能帮助您进行准确的翻译。如果有特定部分或格式要求,请一并告知。
一座通过串行通信将物理硬件设备与人工智能大语言模型连接起来的桥梁,允许用户使用自然语言命令控制硬件。