AI-Powered Browser Debugging Suite for Claude Desktop, Cursor, and Windsurf
Browser MCP is a pure JavaScript Chrome extension that exposes complete browser state to AI assistants through the Model Context Protocol (MCP). It provides 33 powerful debugging tools for inspecting DOM, network, console, storage, and framework state - all accessible to Claude, Cursor, and Windsurf.
- β WebSocket Architecture - Fast, reliable, bidirectional communication
- β Pure JavaScript - No build step, no TypeScript compilation
- β 33 Debugging Tools - DOM inspection, network monitoring, storage management
- β Framework Detection - React, Vue, Angular, Svelte, and more
- β Zero Dependencies - Self-contained Chrome extension
- β One-Line Install - Automatic setup script
- β Cross-Platform - macOS, Linux, Windows
macOS / Linux:
# Interactive install
curl -fsSL https://raw.githubusercontent.com/YOLOVibeCode/browser-mcp/main/scripts/setup-mcp.sh | bash
# Auto-install (no prompts)
curl -fsSL https://raw.githubusercontent.com/YOLOVibeCode/browser-mcp/main/scripts/setup-mcp.sh | bash -s -- --yes
Windows (PowerShell):
# Interactive install
irm https://raw.githubusercontent.com/YOLOVibeCode/browser-mcp/main/scripts/setup-mcp.ps1 | iex
# Auto-install (no prompts)
(irm https://raw.githubusercontent.com/YOLOVibeCode/browser-mcp/main/scripts/setup-mcp.ps1) + ' -Yes' | iex
That's it! The script automatically:
- β Checks & installs prerequisites (Node.js, npm, Git)
- β Installs MCP server from NPM
- β Configures your IDE (Claude/Cursor/Windsurf)
- β Shows extension installation instructions
After running the install script:
- Load the extension in Chrome:
- Open
chrome://extensions/
- Enable "Developer mode"
- Click "Load unpacked"
- Select the folder shown by the script (copied to clipboard!)
- Open
- Restart your IDE (Claude/Cursor/Windsurf)
- Done! π
ββββββββββββββββββββ
β IDE (Claude) β MCP Client
ββββββββββ¬ββββββββββ
β stdio (newline-delimited JSON)
β
ββββββββββββββββββββ
β MCP Server β Node.js (browser-mcp-server)
β (Node.js) β Translates MCP β Extension
ββββββββββ¬ββββββββββ
β WebSocket (ws://localhost:8765)
β
ββββββββββββββββββββ
β Chrome Extension β Service Worker
β - WebSocket β - Handles MCP requests
β Server β - Routes to 33 tools
β - MCP Protocol β
β - 33 Tools β
ββββββββββ¬ββββββββββ
β Chrome DevTools Protocol
β
ββββββββββββββββββββ
β Browser Tabs β DOM, Network, Console,
β β Storage, Framework state
ββββββββββββββββββββ
- β Fast - <1ms communication overhead
- β Reliable - Automatic reconnection
- β Simple - Standard protocol
- β Bidirectional - Real-time updates
- β Cross-platform - Works everywhere
getElementInfo
- Get complete element detailsquerySelectors
- jQuery-style DOM queriesgetAccessibilityTree
- ARIA/a11y inspectiongetComputedStyles
- Full CSS cascadegetElementPosition
- Layout & positioninggetVisibilityInfo
- Visibility detectiongetDOMSnapshot
- Complete DOM treegetEventListeners
- All event handlers
getNetworkRequests
- All network activitygetRequestHeaders
- HTTP headersgetResponseBody
- Response contentgetResourceTiming
- Performance metricsgetWebSocketMessages
- WebSocket trafficclearNetworkCache
- Cache management
getConsoleLogs
- All console messagesevaluateExpression
- Execute JavaScriptgetErrorStack
- Stack tracesgetPerformanceMetrics
- Core Web VitalsgetMemoryUsage
- Memory profiling
getLocalStorage
- localStorage inspectiongetSessionStorage
- sessionStorage inspectiongetCookies
- Cookie managementgetIndexedDB
- IndexedDB queriesclearStorage
- Storage cleanup
detectFramework
- Identify frameworkgetComponentState
- React/Vue stategetRenderChain
- Component hierarchytraceDataSources
- Data flow tracking
resolveSourceMap
- Map deployed β local codegetOriginalPosition
- Source map lookuplistSourceFiles
- Available source files
listActiveTabs
- All browser tabsswitchToTab
- Tab navigation
browser-mcp/
β
βββ mcp-server/ # Node.js MCP Server
β βββ index.js # Main server
β βββ stdio-handler.js # MCP protocol (stdin/stdout)
β βββ websocket-client.js # WebSocket connection
β βββ message-queue.js # Offline message queue
β βββ package.json # NPM package
β βββ README.md # Documentation
β
βββ browser-mcp-extension/ # Chrome Extension
β βββ background/
β β βββ service-worker.js # Main entry point
β β βββ websocket-server.js # WebSocket server
β β βββ websocket-frames.js # RFC 6455 frame parser
β β βββ mcp-server.js # MCP protocol handler
β β βββ tab-manager.js # Tab state management
β β βββ adapters/
β β β βββ chrome-cdp.js # Chrome DevTools Protocol
β β βββ tools/ # 33 debugging tools
β β βββ console-tools.js
β β βββ dom-tools.js
β β βββ network-tools.js
β β βββ storage-tools.js
β β βββ framework-tools.js
β β βββ ... (11 total files)
β β
β βββ manifest.json # Extension manifest
β βββ icons/ # Extension icons
β βββ popup/ # Extension UI
β
βββ scripts/
β βββ setup-mcp.sh # One-line installer
β
βββ package.json # Root package
βββ README.md # This file
Ask Claude/Cursor:
"Show me all properties of the submit button"
Browser MCP:
- Uses
getElementInfo
tool - Returns: classes, IDs, attributes, computed styles, event listeners
Ask Claude/Cursor:
"What API calls happened when I clicked that button?"
Browser MCP:
- Uses
getNetworkRequests
tool - Returns: URL, method, status, headers, timing, response
Ask Claude/Cursor:
"What's the current state of the UserProfile component?"
Browser MCP:
- Uses
detectFramework
+getComponentState
- Returns: props, state, hooks, context values
- Node.js v16+ (with npm)
- Git
- Chrome or Chromium
npm install -g @rvegajr/browser-mcp-server
- Open Chrome and go to
chrome://extensions/
- Enable Developer mode (toggle in top-right)
- Click Load unpacked
- Select the
browser-mcp-extension
folder
Claude Desktop:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"browser-mcp": {
"command": "browser-mcp-server"
}
}
}
Cursor:
- macOS/Linux:
~/.cursor/mcp.json
- Windows:
%USERPROFILE%\.cursor\mcp.json
{
"mcpServers": {
"browser-mcp": {
"command": "browser-mcp-server"
}
}
}
Windsurf:
- macOS/Linux:
~/.codeium/windsurf/mcp_config.json
- Windows:
%USERPROFILE%\.codeium\windsurf\mcp_config.json
{
"mcpServers": {
"browser-mcp": {
"command": "browser-mcp-server"
}
}
}
Quit completely (Cmd+Q) and reopen.
# Start server
browser-mcp-server
# In another terminal, send test message
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | nc localhost 8765
- Open your IDE (Claude/Cursor/Windsurf)
- Ask: "What MCP servers are available?"
- Should see: "browser-mcp" with 33 tools
- Try: "List all tabs in my browser"
- Check Chrome version (requires v90+)
- Enable Developer mode in
chrome://extensions/
- Check console for errors in extension
- Verify server is installed:
which browser-mcp-server
- Check if extension is loaded
- Check WebSocket server started: Look for "WebSocket server started" in extension console
- Check port 8765 is not in use:
lsof -i :8765
- Verify config file location
- Restart IDE completely (Cmd+Q, then reopen)
- Check IDE logs for MCP errors
- Verify
browser-mcp-server
is in PATH
- MCP Server: mcp-server/README.md
- Extension: browser-mcp-extension/README.md
- Tools List: browser-mcp-extension/ALL_33_TOOLS_COMPLETE.md
- β WebSocket-based - Replaced Chrome Native Messaging with WebSocket
- β Faster - <1ms communication overhead (vs ~50ms with Native Messaging)
- β More Reliable - Auto-reconnect, message queueing
- β Simpler - No manifest files, no Chrome-specific setup
- β Better DX - Easier to test and debug
browser-mcp-native-host
βbrowser-mcp-server
(new NPM package)- No more native messaging manifests required
- Extension now requires
sockets
permission instead ofnativeMessaging
# Uninstall old package
npm uninstall -g browser-mcp-native-host
# Install new package
npm install -g @rvegajr/browser-mcp-server
# Update IDE config - change command name:
# OLD: "command": "browser-mcp-host"
# NEW: "command": "browser-mcp-server"
# Reload extension in Chrome
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new features
- Submit a pull request
MIT License - see LICENSE
- Pure JavaScript - No build step, instant development
- Chrome Native - Uses official Chrome DevTools Protocol
- MCP Compatible - Works with Claude, Cursor, Windsurf
- Self-Contained - No external dependencies
- Production Ready - Fully tested with 33 tools
- WebSocket Fast - Modern, efficient communication
Made with β€οΈ by YOLOVibeCode
β Star this repo if it helps your debugging workflow!
- GitHub: https://github.com/YOLOVibeCode/browser-mcp
- NPM Package: https://www.npmjs.com/package/@rvegajr/browser-mcp-server
- Issues: https://github.com/YOLOVibeCode/browser-mcp/issues
- MCP Protocol: https://modelcontextprotocol.io