A Vite plugin (v0.3.0) that creates an MCP server to help LLMs understand React app context by exposing tools like highlight-component, get-component-states, get-component-tree, and get-unnecessary-rerenders. It uses bippy to inject React internals without requiring React DevTools extension. Designed solely for development, it supports custom user-defined tools via JS/TS modules. Requires @babel/preset-react for AST traversal and Vite >=4. Alternative to traditional React DevTools for AI-assisted debugging.
npm install vite-react-mcpVerified import paths — ran on the pinned version, not inferred.
Minimal setup: install vite-react-mcp and @babel/preset-react, add the plugin to vite.config.ts, then run dev server.
Keep @babel/preset-react installed; watch changelog for removal.
Do not import this plugin in production builds. Use environment checks.
Ensure you access the tools after the page has loaded and the plugin is injected.
Write a bridge script that translates serialized commands to HTTP requests to localhost:3000/sse.
Run: pnpm add @babel/preset-react
Use: import ReactMCP from 'vite-react-mcp' (ESM default import)
Add: import { z } from 'zod'