rsbuild-plugin-vue-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@rsbuild-plugin-vue-mcpShow me the current state of the UserProfile component"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Rsbuild plugin VueDevtools MCP
Language / θ―θ¨: English | δΈζ
Rsbuild/Rspack MCP plugin based on Vue DevTools.
Supports
Rsbuild 1.x/2.xandRspack 1.x/2.x.
Through the Model Context Protocol (MCP), AI tools (such as IDE assistants and agents) can read and manipulate your Vue application state in real time, truly enabling "AI that understands your application."
This plugin bridges your dev server and the Vue DevTools running inside your app page via birpc over WebSocket, exposing a set of MCP tools that let AI inspect components, router, and Pinia stores, and even edit component state directly.
Features
π Zero-config MCP server β automatically mounted on your existing dev server (no separate process).
π³ Inspect the component tree of the running app, in tree.
π§© Read & edit Vue component state (reactive data, props, computed, refsβ¦).
π¦ Highlight a component in the page to visually locate it.
π§ Read the Vue Router info (current route, matched records, params, queryβ¦).
ποΈ Inspect Pinia β browse the store tree and read individual store state.
β‘οΈ Works with both Rsbuild and Rspack dev servers.
Related MCP server: vue-mcp-next
Usage
Install
# For npm
npm add rsbuild-plugin-vue-mcp -D
# For yarn
yarn add rsbuild-plugin-vue-mcp -D
# For pnpm
pnpm add rsbuild-plugin-vue-mcp -DRsbuild
// rsbuild.config.js
import { defineConfig } from '@rsbuild/core';
import { pluginVue } from '@rsbuild/plugin-vue';
import { pluginVueMcp } from "rsbuild-plugin-vue-mcp";
export default defineConfig({
plugins: [
pluginVue(),
pluginVueMcp(),
],
});
Rspack
// rspack.config.js
import { defineConfig } from '@rspack/cli';
import { rspack } from "@rspack/core";
import { VueLoaderPlugin } from 'rspack-vue-loader';
import { VueMcpPlugin } from 'rsbuild-plugin-vue-mcp/rspack';
export default defineConfig({
plugins: [
new rspack.HtmlRspackPlugin(),
new VueLoaderPlugin(),
new VueMcpPlugin(),
],
module: {
rules: [
{
test: /\.vue$/,
loader: 'rspack-vue-loader',
options: {
experimentalInlineMatchResource: true,
},
},
],
},
});
The MCP server (Streamable HTTP transport) will be available at http://localhost:[port]/__mcp/mcp.
Requirements: requires
@rsbuild/core >= 1.2.9(for Rsbuild) or@rspack/core >= 1.3.0(for Rspack) so the plugin can attach to the underlying HTTP server.
Connect an MCP client
Start the dev server (usually npm run dev). It prints the MCP service URL in the console, e.g.:
β MCP: Server is running at http://localhost:5173/__mcp/mcpAdd that URL to your client's MCP configuration (Cursor, Claude Desktop, VS Code, etc.):
{
"mcpServers": {
"vue-mcp": {
"type": "streamable-http",
"url": "http://localhost:<YourPort>/__mcp/mcp",
"disabled": false
}
}
}To actually call the MCP tools and debug your app,two things are required:
The dev server is running (so the MCP server is up).
You have opened your app page in a browser (e.g.
http://localhost:5173). The injectedoverlay.jsthen connects to the dev server via WebSocket and exposes the Vue DevTools runtime.
The tools reach the live app through that WebSocket connection β if no app page is open, the tool calls will fail or time out.
Once the page is open, the AI assistant can call the tools listed below against your running dev app.
MCP Tools
The plugin registers the following tools on the MCP server. Each tool talks to the app page through birpc, so the data always reflects the live application. All tools return their results as JSON-formatted text (not markdown).
Tool | Description | Inputs |
| Get the Vue component tree. The result is returned as a JSON text payload. | β |
| Get a component's state as JSON (data, props, computed, refsβ¦). |
|
| Edit a value inside a component's state (live, reactive). |
|
| Highlight a component on the page (auto-clears after 5s). |
|
| Get the current Vue Router info as JSON (route, matched records, params, queryβ¦). | β |
| Get the Pinia store tree as JSON. | β |
| Get a single Pinia store's state as JSON. |
|
Example AI workflow
"Show me the component tree of the current page."
"What is the state of the
UserCardcomponent?""Set
countinCounterto10." β callsedit-component-stateand the UI updates instantly."Highlight the
Navbarcomponent." β the element flashes in the browser."What route are we on and what are its params?" β calls
get-router-info."Show me the state of the
cartPinia store."
How it works
The plugin uses birpc as the RPC layer and WebSocket as the transport between the dev server and the app page.
graph TD
subgraph A["MCP Host (AI Client)"]
A1[MCP Client]
A2[MCP Client]
end
subgraph B["MCP Server (Rsbuild/Rspack Dev Server)"]
B1[MCP Tools<br/>get-component-tree / get-component-state / ...]
B2[birpc group<br/>createRPCServer]
B3[WebSocket Server<br/>/__vue-devtools-mcp-ws]
end
subgraph C["Vue App (Browser)"]
C1[overlay.js injected]
C2[birpc client]
C3[Vue DevTools Kit<br/>devtools.api / ctx]
end
A <-- " streamable-http / SSE " --> B1
B1 --> B2
B2 <== " birpc over WebSocket " ==> B3
B3 --> C1 --> C2 --> C3Injection β When the dev server starts, the plugin injects
overlay.jsinto the app's HTML (or, whenappendTois configured, appends an import to matching source modules).overlay.jsinitializes@vue/devtools-kitand opens aWebSocketto the dev server at/__vue-devtools-mcp-ws.RPC bridge β The dev server creates a birpc group (
createRPCServer) over the WebSocket connections.overlay.jscreates a birpc client (createBirpc). Requests from the server are forwarded to the app; responses come back via hook callbacks (onInspectorTreeUpdated,onInspectorStateUpdated, β¦).MCP layer β MCP tool handlers (
src/mcp/server.ts) call the birpc client to reach the app, wait for the response throughhookablehooks, and return it as the tool result.
This two-hop design (MCP β birpc β DevTools) means every tool call inspects or mutates the **actual running application **, not a static snapshot.
Configuration
Both pluginVueMcp(options) (Rsbuild) and new VueMcpPlugin(options) (Rspack) accept the same options:
interface PluginVueMcpOptions {
/** Host to listen on. Default: `localhost`. */
host?: string
/** Print the MCP server URL in the console. Default: `true`. */
printUrl?: boolean
/** Custom MCP server info (name/version). Ignored when `mcpServer` is provided. */
mcpServerInfo?: { name?: string, version?: string, ... }
/**
* Customize or replace the MCP server instance. Called whenever a server is created.
* You may register extra tools, or return a new McpServer to replace the default one.
*/
mcpServerSetup?: (server: McpServer, api: RsbuildPluginAPI | Compiler) => void | Promise<void | McpServer>
/** Path prefix for the MCP endpoint. Default: `/__mcp` (so the endpoint is `/__mcp/mcp`). */
mcpPath?: string
/**
* Instead of injecting a <script> into HTML, append an import to modules whose id
* matches this regex. Useful for projects without an HTML entry.
* WARNING: only set this if you know exactly what it does.
*/
appendTo?: string | RegExp
}Examples
Register extra MCP tools alongside the defaults:
pluginVueMcp({
mcpServerSetup(server, api) {
server.registerTool('ping', { description: 'Ping the dev server' }, async () => ({
content: [{ type: 'text', text: 'pong' }],
}))
},
})Use a custom MCP endpoint path:
pluginVueMcp({ mcpPath: '/my-mcp' })
// β http://localhost:<port>/my-mcp/mcpRequirements
Node.js
>= 18@rsbuild/core >= 1.2.9 || >= 2.0.0(optional peer, for the Rsbuild plugin)@rspack/core >= 1.3.0 || >= 2.0.0(optional peer, for the Rspack plugin)A Vue 3 application instrumented with
@vue/devtools-kit(handled automatically by the injected overlay).
Debugging
You can inspect the MCP server with the official MCP Inspector:
npx @modelcontextprotocol/inspectorThen point it at http://localhost:<YourPort>/__mcp/mcp with the Streamable HTTP transport.
Reference / Credits
Inspired by vite-plugin-vue-mcp β the original idea of bridging Vue DevTools and MCP.
birpcβ the RPC layer used between dev server and app page@vue/devtools-kitβ Vue DevTools core API
License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceProvides application insights for Vue apps by exposing component trees, state, routes, and Pinia data through a Model Context Protocol server.2,375573MIT
- AlicenseNot gradedqualityCmaintenanceEnables 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.3444MIT
- AlicenseNot gradedqualityBmaintenanceThis MCP server enables real-time debugging and inspection of running React Native apps, providing access to console logs, errors, network requests, navigation state, storage, and performance profiling.1MIT
- AlicenseNot gradedqualityCmaintenanceA Vite plugin that provides MCP server capabilities, enabling MCP clients to interact with browser environments through adapters for console, cookies, storage, performance, and component tree inspection.324MIT
Related MCP Connectors
MCP server for interacting with the Supabase platform
MCP server for managing Prisma Postgres.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BrightX/rsbuild-plugin-vue-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server