Skip to content

createViteReactClient

createViteReactClient(options?): Promise<any>

Defined in: mcp.ts:403

Create Vite React MCP client for React component debugging

Connects to a running Vite dev server with the vite-react-mcp plugin. Used for debugging React apps during development and testing.

Tools provided:

  • highlight-component: Highlight a React component by name
  • get-component-states: Get props, states, and contexts
  • get-component-tree: Get component tree in ASCII format
  • get-unnecessary-rerenders: Track wasted renders

Requires the app to be running with vite-react-mcp plugin installed.

number

Port number (alternative to full URL)

string

URL of the Vite dev server SSE endpoint (default: http://localhost:5173/sse)

Promise<any>