playwright-react-debug-mcp
Provides tools to inspect React component trees, view component state, props, and hooks, and detect React-specific errors such as hydration mismatches and error boundaries.
Allows inspection of React Query cache, including query states, data, and mutation status.
Provides tools to inspect Redux store state and view dispatched actions, aiding in debugging Redux-based applications.
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., "@playwright-react-debug-mcpFind React errors on the dashboard page"
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.
Playwright React Debug MCP
Debug React applications with AI assistance using Claude and Playwright.
A Model Context Protocol (MCP) server that gives Claude the ability to interact with live web applications through a browser. Navigate pages, inspect the DOM, monitor network requests, debug React components, and analyze errors—all through natural conversation.
Why Use This?
Traditional Debugging | With Playwright React Debug MCP |
Manually reproduce issues | "Navigate to /dashboard and check for errors" |
Screenshot and paste into chat | Claude sees the live page and interacts directly |
Copy-paste console errors | Console logs captured automatically |
Open React DevTools manually | Claude queries component tree with state/props |
Check Network tab for failures | All HTTP traffic monitored and analyzed |
Related MCP server: WebSee MCP Server
Features
40 debugging tools across 10 categories
Browser Control - Navigate, click, fill forms, automate user flows
DOM Inspection - Element details, computed styles, text extraction
Network Monitoring - Request/response bodies, headers, timing
Console Capture - Errors, warnings, logs with filtering
React DevTools - Component tree, props, state, hooks inspection
State Management - Redux, Zustand, React Query, Context inspection
Performance - Render tracking, slow components, Web Vitals
Error Detection - Hydration errors, error boundaries, memory leaks
Accessibility - WCAG-style audits, ARIA tree inspection
Error Analysis - AI-powered analysis with suggested fixes
Quick Start
Install
npm install -g playwright-react-debug-mcp
npx playwright install chromiumConfigure Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"playwright-debug": {
"command": "npx",
"args": ["playwright-react-debug-mcp"]
}
}
}Configure Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"playwright-debug": {
"command": "npx",
"args": ["playwright-react-debug-mcp"],
"transport": "stdio"
}
}
}Try It
You: Navigate to https://example.com and take a screenshot
Claude: I'll navigate to the page and capture a screenshot.
[Browser opens, navigates, returns screenshot]
Done! The page shows...Example Session
You: Navigate to my app at localhost:3000/login and try logging in
with test@example.com
Claude: I'll navigate to the login page and fill in the credentials.
[Navigates, fills email/password, clicks submit]
The login failed. Let me check what happened:
- Console: "TypeError: Cannot read property 'token' of undefined"
- Network: POST /api/auth returned 200 but body is empty
- React: AuthProvider shows { isAuthenticated: false, error: null }
The API returns 200 without a token. The frontend expects response.data.token
but data is undefined. The error state isn't being set because the HTTP
status was 200.
Suggestions:
1. Backend should return { data: { token: "..." } } or proper error status
2. Frontend should validate response structure, not just HTTP statusAvailable Tools
Navigation & Interaction (11 tools)
Tool | Description |
| Navigate to URL with wait conditions |
| Click elements (left/right/double) |
| Fill form fields |
| Select dropdown options |
| Type text character-by-character |
| Hover over elements |
| Scroll page or element into view |
| Wait for element/navigation |
| Browser back |
| Browser forward |
| Reload page |
Inspection (3 tools)
Tool | Description |
| Summarized DOM tree |
| Element details with styles |
| Extract visible text |
Network (3 tools)
Tool | Description |
| View requests with filtering |
| Full request/response details |
| Clear captured requests |
Console (2 tools)
Tool | Description |
| View logs with filtering |
| Clear captured logs |
React (4 tools)
Tool | Description |
| Component tree with hooks |
| Search components by name |
| Detailed state/props |
| All instances of a component |
State Management (4 tools)
Tool | Description |
| Redux store state + actions |
| Zustand store inspection |
| React Query cache |
| React Context values |
Performance (3 tools)
Tool | Description |
| Component render tracking |
| Slow component detection |
| Core Web Vitals (LCP, CLS, etc.) |
Error Detection (3 tools)
Tool | Description |
| SSR hydration mismatches |
| React error boundaries |
| Memory leak indicators |
Accessibility (2 tools)
Tool | Description |
| WCAG-style audit |
| Accessibility tree |
Advanced (5 tools)
Tool | Description |
| Capture page or element |
| Execute JavaScript |
| AI error analysis |
| Page state overview |
Use Cases
Interactive Debugging
What errors are on this page?
Why did the form submission fail?Automated Testing
Fill the registration form and verify it submits successfully
Click through the checkout flow and check for errorsReact Development
Find the UserProfile component and show its state
What props are being passed to the Modal?
Collect all Button instances and compare their usageAPI Integration
What requests were made when I clicked submit?
Show me the response from the failed API callConfiguration
Environment Variables
Variable | Default | Description |
| 100 | Console log buffer size |
| 100 | Network request buffer size |
| false | Run browser headless |
{
"mcpServers": {
"playwright-debug": {
"command": "npx",
"args": ["playwright-react-debug-mcp"],
"env": {
"PLAYWRIGHT_HEADLESS": "true"
}
}
}
}Development
# Clone
git clone https://github.com/Lars-Albinsson/playwright-react-debug-mcp
cd playwright-react-debug-mcp
# Install
npm install
npx playwright install chromium
# Build
npm run build
# Run
npm start
# Watch mode
npm run devDocumentation
Requirements
Node.js 18+
Playwright (Chromium)
Claude Desktop or Claude Code
Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
License
MIT License - see LICENSE for details.
Related
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.
Latest Blog Posts
- 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/Lars-Albinsson/playwright-react-debug-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server