browser-debugger-mcp
v1.0.0
Published
๐ Browser Debugger MCP - Bridge browser debugging context to AI assistants. One-command setup for automatic error capture and Claude Code integration.
Downloads
7
Maintainers
Readme
Browser Debugger MCP
๐ Bridge browser debugging context to local AI-powered code assistants
Browser Debugger MCP is a revolutionary one-command setup tool that automatically captures browser debugging context (console logs, network requests, errors) and streams them in real-time to AI assistants like Claude Code for intelligent debugging assistance.
โก One-Command Installation
# Install globally
npm install -g browser-debugger-mcp
# Start everything with one command
browser-debugger-mcp start --dashboard
# That's it! ๐โจ Features
๐ Live Data Streaming
- Real-time capture - Live streaming of browser context via WebSocket
- In-memory buffer - Last 100 captures instantly accessible
- SQLite database - Persistent storage with automatic cleanup
- Smart retention - Configurable data retention (default: 24 hours)
๐ ๏ธ One-Command Experience
- Zero configuration - Auto-detects and configures Claude Code MCP
- Built-in dashboard - Live web interface at localhost:3030/dashboard
- Desktop shortcuts - Automatic desktop shortcut creation
- Background service - Runs as a system service with start/stop commands
๐ง Enhanced Data Collection
- Automatic triggers - Captures on errors, network failures, and critical events
- Enhanced network capture - Full HTTP request/response data via Chrome Debugger API
- Smart filtering - Only captures meaningful events to reduce noise
- Error categorization - Intelligent classification of JavaScript and network errors
- Framework detection - Auto-detects React, Vue, Angular, and other frameworks
๐ง Advanced MCP Integration
- Live MCP commands - Real-time data access for Claude Code
- Enhanced error analysis - AI-powered error pattern recognition
- Session management - Group captures by development session
- Historical insights - Trend analysis and error history
๐๏ธ Live Architecture
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Browser โ โ DevContext โ โ Claude Code โ
โ Extension โโโโโโถ Bridge Server โโโโโโถ (MCP Client) โ
โ โ โ โ โ โ
โโโโโโโโโโโโโโโโโโโ โ โข HTTP API โ โโโโโโโโโโโโโโโโโโโ
โ โ โข WebSocket โ
โโโ Auto Captureโ โข SQLite DB โ
โโโ DevTools โ โข Live Dashboardโ
โโโ Smart Filterโโโโโโโโโโโโโโโโโโโโ ๐ Quick Start
Step 1: Install & Start
# Install globally (one-time setup)
npm install -g browser-debugger-mcp
# Start everything with dashboard
browser-debugger-mcp start --dashboardThis single command:
- โ Installs all dependencies
- โ Starts HTTP server (port 3030)
- โ Starts WebSocket server (port 3031)
- โ Starts MCP server for Claude Code
- โ Opens live dashboard in browser
- โ Shows extension installation guide
Step 2: Install Browser Extension
The dashboard will show you exactly how to install the extension:
- Open
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select:
node_modules/browser-debugger-mcp/browser-extension/dist/
That's it! The extension auto-connects to localhost:3030.
Step 3: Use with Claude Code
Claude Code is automatically configured! Just ask:
"What errors occurred on my website?"
"Analyze the latest browser capture"
"Show me network failures from the last hour"๐ Live Dashboard
Visit http://localhost:3030/dashboard for:
- ๐ Real-time statistics - Live capture counts, error rates, connected clients
- ๐ Activity feed - Live stream of captures, errors, and events
- ๐๏ธ Quick actions - Test capture, view logs, manage service
- ๐ Error analysis - Visual error trends and hotspots
- ๐ WebSocket monitoring - Live connection status and data flow
๐ ๏ธ CLI Commands
# Service Management
browser-debugger-mcp start --dashboard # Start with dashboard
browser-debugger-mcp status # Show service status
browser-debugger-mcp stop # Stop services
browser-debugger-mcp logs --follow # Live log streaming
# Utilities
browser-debugger-mcp dashboard # Open dashboard
browser-debugger-mcp install # Package extension๐ง Enhanced MCP Commands
Ask Claude Code these questions after starting the service:
๐ฆ Capture Management:
list_captures- Show recent browser captures with smart filteringget_latest_capture- Get detailed debugging context with error analysisget_capture_by_id <ID>- Retrieve specific capture by ID
๐ Error Analysis:
analyze_errors- AI-powered error pattern recognitionstream_status- Live service status and recent activity
๐ฏ Advanced Features:
- Time-based filtering:
analyze_errors --hours 2 - Error-only captures:
list_captures --errors-only - Storage data inclusion:
get_latest_capture --include-storage
๐๏ธ Architecture & Data Flow
Live Data Pipeline
Browser Extension โ HTTP API (3030) โ SQLite Database + Memory Buffer โ MCP Server โ Claude Code
โ WebSocket (3031) โ Live Dashboard๐ Data Management:
- In-Memory Buffer: Last 100 captures for instant access
- SQLite Database: Persistent storage with automatic cleanup
- Retention Policy: 24-hour default with configurable cleanup
- Smart Filtering: Only meaningful events to reduce noise
๐ง Configuration & Customization
Service Configuration
Create ~/.devcontext-bridge/config.json:
{
"httpPort": 3030,
"wsPort": 3031,
"maxCapturesInMemory": 100,
"dataRetentionHours": 24,
"enableNotifications": true,
"silent": false
}Extension Features
- ๐ค Automatic Capture: Smart triggers on errors and network failures
- ๐ DevTools Panel: Full debugging interface with live statistics
- โก Elements Sidebar: Quick capture from DOM inspector
- ๐๏ธ Professional Options: Comprehensive settings management
- ๐ Enhanced Network Capture: Full HTTP data via Chrome Debugger API
๐ Project Structure
browser-debugger-mcp/
โโโ bin/devcontext-bridge.js # CLI entry point
โโโ src/
โ โโโ bridge-server.js # Main server with live data
โ โโโ mcp-server.js # Enhanced MCP integration
โ โโโ logger.js # Real-time logging system
โ โโโ utils.js # Dashboard & utilities
โโโ browser-extension/ # Chrome extension
โ โโโ src/ # TypeScript source
โ โโโ public/ # Static files
โ โโโ dist/ # Built extension
โโโ scripts/
โ โโโ post-install.js # Auto-setup script
โ โโโ install-extension.js # Extension packager
โโโ packages/ # Distribution files๐ Features
๐ Community Edition (Free)
- โ Live data streaming with WebSocket dashboard
- โ Automatic capture on errors and network failures
- โ Enhanced MCP commands with AI-powered analysis
- โ Real-time logging with filtering and rotation
- โ Professional CLI with service management
- โ SQLite storage with automatic cleanup
- โ Claude Code integration with auto-configuration
๐ Pro Edition (Future)
- ๐ฎ Full network payloads and response bodies
- ๐ฎ Storage data capture (localStorage, sessionStorage, cookies)
- ๐ฎ Advanced analytics with trend analysis and insights
- ๐ฎ Team collaboration with shared capture sessions
- ๐ฎ Custom integrations and webhook support
๐ค Contributing
We welcome contributions! Please check our Contributing Guidelines and:
- ๐ Report bugs - Use GitHub Issues with detailed reproduction steps
- ๐ก Suggest features - Open Discussion threads for new ideas
- ๐ง Submit PRs - Follow our coding standards and include tests
- ๐ Improve docs - Help make DevContext Bridge more accessible
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Star History
If DevContext Bridge helps your debugging workflow, please consider giving us a โญ on GitHub!
๐ Made with โค๏ธ for developers who love AI-powered debugging
๐ Report Bug โข ๐ก Request Feature โข ๐ Documentation
