browser-connect-mcp
Click on "Deploy 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., "@browser-connect-mcp Debug my app running on localhost:3000"
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.
Browser Connect MCP
A Model Context Protocol (MCP) server that enables AI assistants to connect to browser DevTools and backend debuggers for comprehensive full-stack debugging. Works with any MCP-compatible tool including Claude Desktop, Claude Code, Cursor, Cline, Roo-Cline, and more!
What is this?
Browser Connect MCP gives AI assistants the ability to:
Frontend Debugging:
š Launch Chrome with debugging enabled automatically
š Read console logs and errors from your web pages
š Monitor network requests and API calls
š Analyze performance issues
š Scan for security vulnerabilities
Backend Debugging (NEW!):
š Stream and analyze backend logs in real-time
š Attach to Node.js debuggers for breakpoint debugging
š³ Monitor Docker container logs
š Parse structured and unstructured log files
š Search and filter logs with pattern matching
AI-Powered Analysis:
š¤ Intelligent error correlation between frontend and backend
š” Root cause analysis across the full stack
šÆ Performance bottleneck detection
š”ļø Security vulnerability scanning
All through natural conversation - no coding required!
Related MCP server: Chrome DevTools MCP
Quick Start
1. Install via npx (Recommended - No Installation Required!)
Add to your AI assistant's MCP configuration. Here are examples for popular tools:
IMPORTANT: Due to how MCP clients handle spawning commands, you MUST use the following configuration format with npx as the command and the package name as an argument:
Claude Desktop (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"browser-connect": {
"command": "npx",
"args": ["-y", "browser-connect-mcp"],
"env": {
"LOG_LEVEL": "info"
}
}
}
}Note: The -y flag ensures npx runs without prompting. NPM will automatically use the latest version.
Cursor/Cline/Other MCP Tools: Check your tool's documentation for MCP server configuration location.
2. Restart Your AI Assistant
After saving the configuration, restart your AI assistant application to load the browser debugging capabilities.
3. Start Debugging!
Just talk to your AI assistant naturally:
You: "Help me debug my website at localhost:3000"
AI: I'll help you debug your website. Let me launch Chrome with debugging enabled
and connect to it.
[AI launches Chrome and connects automatically]
Now I'm connected to your browser. I can see the console messages and network traffic.
What specific issues are you experiencing?
You: "The page is loading slowly"
AI: Let me analyze the performance of your page...
[AI automatically runs performance analysis]
I found several performance issues:
1. Large uncompressed images (3.2MB total)
2. Render-blocking JavaScript in the header
3. Multiple API calls that could be batched
Would you like me to investigate any of these issues in detail?Compatible AI Assistants
This MCP server works with any tool that supports the Model Context Protocol:
Claude Desktop - Anthropic's official desktop app
Claude Code - Anthropic's CLI for developers
Cursor - AI-powered code editor
Cline - Command-line AI assistant
Roo-Cline - Enhanced version of Cline
Any MCP-compatible IDE or platform
What Can You Ask Your AI Assistant?
Debugging Requests
"Launch Chrome and help me debug my website"
"Debug my app running on localhost:3000" - Automatically launches and connects
"Open localhost:8080 in my default browser" - Opens in your preferred browser
"Connect to my existing Chrome browser"
"Show me any JavaScript errors"
"Are there any failed API calls?"
"Why is my page loading slowly?"
"Check for security vulnerabilities"
"Find memory leaks"
"Debug CORS issues"
"Export network traffic for analysis"
Performance Analysis
"Analyze the performance of this page"
"Which requests are taking the longest?"
"Find performance bottlenecks"
"Show me the slowest API endpoints"
Error Investigation
"What errors are happening?"
"Find all TypeErrors in the console"
"Show me errors related to authentication"
"Are these errors related to each other?"
Security Checks
"Run a security scan"
"Check if any sensitive data is exposed"
"Look for security vulnerabilities"
"Are there any insecure requests?"
Backend Debugging
"Stream logs from my Node.js server"
"Show me backend errors from server.log"
"Attach debugger to my Node.js process on port 9229"
"Monitor my Docker container logs"
"Find all database errors in the backend logs"
"Correlate frontend errors with backend logs"
"Show me slow API endpoints from backend logs"
Real-World Examples
Example 1: Debugging API Errors
You: "My app isn't working, can you help debug it?"
AI: I'll help you debug your app. Let me connect to your browser and see what's happening.
[Automatically launches/connects to Chrome]
I can see your application. Let me check for any errors...
I found several issues:
1. API calls to /api/user are returning 401 Unauthorized errors
2. There are CORS errors when trying to access the payment service
3. Several "undefined is not a function" errors in your React components
The 401 errors suggest an authentication issue. Would you like me to:
- Look at the request headers to check authentication tokens?
- Find when the authentication errors started?
- Check if there are any related console errors?Example 2: Performance Optimization
You: "Users are complaining the checkout page is slow"
AI: I'll analyze the checkout page performance. Let me connect to your browser and load the checkout page.
[Connects and monitors the page load]
Here's what I found analyzing your checkout page:
Performance Issues:
1. Initial page load: 4.3 seconds (should be under 3s)
2. Largest Contentful Paint: 3.8 seconds
3. Time to Interactive: 5.2 seconds
Main bottlenecks:
- Product images are not optimized (2.1MB total)
- Stripe SDK loads synchronously, blocking render
- 3 sequential API calls that could run in parallel
Recommendations:
1. Compress and lazy-load product images
2. Load Stripe SDK asynchronously
3. Parallelize the API calls
Would you like me to show you the specific network requests causing delays?Example 3: Security Audit
You: "Can you check my app for security issues?"
AI: I'll run a comprehensive security scan on your application.
[Automatically scans console logs and network traffic]
Security Scan Results:
ā ļø High Priority Issues:
1. API keys exposed in console logs (GitHub API key found)
2. User passwords visible in network requests (should use HTTPS)
3. Missing security headers (CSP, X-Frame-Options)
š Medium Priority:
1. Cookies without 'Secure' flag
2. LocalStorage containing sensitive user data
3. Mixed content warnings (HTTP resources on HTTPS page)
ā Good Security Practices Found:
1. HTTPS enabled on main domain
2. Authentication tokens expire appropriately
3. Input validation on forms
Would you like me to explain how to fix any of these issues?Example 4: Full-Stack Debugging (NEW!)
You: "My users are getting 500 errors but I can't figure out why"
AI: I'll help you debug this issue by examining both frontend and backend. Let me start by connecting to your browser and checking for errors.
[Connects to browser and analyzes network traffic]
I see multiple 500 errors from /api/checkout. Now let me check your backend logs to understand what's happening server-side.
[Streams backend logs]
Found the issue! Here's what's happening:
Frontend (Browser):
- POST /api/checkout returning 500 errors
- Errors started 15 minutes ago
- Affecting 23% of requests
Backend (Server Logs):
- Database connection pool exhausted
- "Error: Connection timeout" in checkout handler
- Memory usage spiking before errors
Root Cause:
Your checkout process isn't closing database connections properly, leading to connection pool exhaustion under load.
Quick Fix:
Add connection.release() after your database queries in the checkout handler.
Long-term Fix:
Implement connection pooling with automatic cleanup and monitoring.Common Debugging Workflows
Complete Debugging Session
You: "I need help debugging my React app"
Your AI assistant will automatically:
1. Launch Chrome with debugging enabled
2. Navigate to your app
3. Start monitoring console and network
4. Provide insights on any issues foundQuick Error Check
You: "Are there any errors on my website?"
Your AI assistant will:
1. Connect to your browser
2. Search for all error-level messages
3. Analyze error patterns
4. Suggest fixesAPI Debugging
You: "Help me debug why my API calls are failing"
Your AI assistant will:
1. Monitor network traffic
2. Identify failed requests
3. Analyze request/response details
4. Identify patterns in failuresBackend Log Analysis (NEW!)
You: "Analyze my server logs for errors"
Your AI assistant will:
1. Connect to your log source (file, process, or Docker)
2. Parse and structure log entries
3. Filter for errors and warnings
4. Identify patterns and anomalies
5. Correlate with frontend issuesNode.js Debugging (NEW!)
You: "Debug my Node.js application"
Your AI assistant will:
1. Attach to Node.js debugger (--inspect)
2. Monitor runtime errors and exceptions
3. Analyze performance bottlenecks
4. Track memory usage
5. Provide optimization suggestionsFeatures
š Browser Management
Automatic Chrome Launch: Your AI assistant launches Chrome with debugging enabled - no manual setup!
Multi-Browser Support: Works with Chrome, Chromium, Brave, Edge, and more
Default Browser Support: Can open URLs in your system's default browser
Tab Discovery: Find and connect to existing browser tabs
Smart Connection: Maintains connection throughout debugging session
Localhost Debugging: Special support for debugging localhost applications
š Console Analysis
Error Detection: Automatically finds JavaScript errors
Pattern Matching: Search logs with intelligent patterns
Error Correlation: Links related errors together
Smart Filtering: Focus on relevant messages
š Network Monitoring
Request Analysis: Monitor all HTTP/HTTPS traffic
Performance Metrics: Identify slow requests
Error Detection: Find failed API calls
HAR Export: Export traffic for external analysis
š¤ AI-Powered Insights
Automatic Analysis: AI assistants proactively identify issues
Root Cause Detection: Find the source of cascading errors
Performance Recommendations: Get optimization suggestions
Security Scanning: Detect vulnerabilities automatically
š„ļø Backend Debugging (NEW!)
Log Streaming: Real-time log monitoring from files, processes, or containers
Node.js Debugger: Attach to Node.js processes with --inspect
Log Parsing: Automatic parsing of JSON and text log formats
Pattern Matching: Advanced filtering with regex support
Docker Support: Monitor container logs directly
Process Monitoring: Track stdout/stderr from running processes
Alternative Installation Methods
Global Installation
npm install -g browser-connect-mcpThen update your AI assistant's config:
{
"mcpServers": {
"browser-connect": {
"command": "browser-connect-mcp",
"env": {
"LOG_LEVEL": "info"
}
}
}
}From Source
git clone https://github.com/perception30/browser-connect-mcp.git
cd browser-connect-mcp
npm install
npm run buildConfiguration Examples for Different Tools
Claude Desktop / Claude Code
// macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
// Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"browser-connect": {
"command": "npx",
"args": ["-y", "browser-connect-mcp@0.4.1"]
}
}
}Important: Always use npx as the command with the package name as arguments. Do NOT use the package name directly as the command - this will cause a "spawn ENOENT" error.
Cursor IDE
Check Cursor's MCP settings in the preferences/settings panel for adding MCP servers.
Cline/Roo-Cline
These CLI tools typically use a configuration file like .cline/config.json. Consult their documentation for MCP server setup.
VS Code MCP Extensions
Configuration varies by extension. Look for MCP server settings in the extension's configuration panel.
Troubleshooting
"My AI assistant can't connect to my browser"
Make sure you've restarted your AI assistant application after updating the configuration
Try asking "Launch a new Chrome browser for debugging"
Check that Chrome/Chromium is installed on your system
"No data is appearing"
Ensure the web page is loaded and active
Try refreshing the page after your AI assistant connects
Ask your AI to "Check the connection status"
"Chrome won't launch"
The MCP server will try to find Chrome automatically
If it fails, make sure Chrome or Chromium is installed
On Linux, you might need to install
chromium-browser
"Backend debugging not working"
For Node.js debugging, ensure your app is started with
--inspectflagCheck that log files have read permissions
For Docker logs, ensure Docker is running and you have permissions
Verify the debug port (default 9229) is not blocked by firewall
How It Works
When you ask your AI assistant to debug your application, this MCP server:
For Frontend Debugging:
Launches or connects to Chrome with debugging protocol enabled
Establishes a debugging session using Chrome DevTools Protocol
Monitors console and network events in real-time
Captures errors, performance metrics, and security issues
For Backend Debugging:
Connects to log sources (files, processes, Docker containers)
Attaches to Node.js debuggers when available
Streams and parses logs in real-time
Correlates backend issues with frontend errors
AI Analysis: 5. Provides your AI assistant with comprehensive debugging data 6. Enables intelligent analysis across the full stack 7. Maintains context throughout your debugging conversation
All of this happens automatically - you just describe what you need!
Privacy & Security
Local Only: All debugging happens on your local machine
No Data Storage: Information is only kept during the active session
Secure by Default: Uses Chrome DevTools Protocol securely
Permission-Based: AI assistants ask before performing actions
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Documentation
š Full NPM Documentation - Comprehensive guide with all features and API reference
š Quick Reference - Cheat sheet for common commands and workflows
š§ API Reference - Detailed tool specifications
š” Examples - Real-world usage examples
š API Usage Examples - Detailed API request/response examples
š Backend Debugging Best Practices - Guide for debugging backend applications
Support
Issues: GitHub Issues
Discussions: GitHub Discussions
Documentation: See links above
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Built on the Model Context Protocol by Anthropic
Powered by Chrome DevTools Protocol
Inspired by developers who need better debugging tools
Made with ā¤ļø for developers who want to debug with AI assistance
MCP Compatibility
This server implements the Model Context Protocol (MCP) standard, making it compatible with:
Claude Desktop & Claude Code (Anthropic)
Cursor IDE
Cline & Roo-Cline CLI tools
VS Code extensions supporting MCP
Any future tools implementing the MCP standard
Available Tools
16 toolsbackend_debugger_attachB
Attach to a Node.js process debugger for breakpoint debugging
Inputs: port (required), host, type, processId.
backend_logs_streamB
Stream and search logs from backend applications (files, processes, Docker containers)
Inputs: source (required), target (required), follow, format, +1 more.
browser_connectB
Connect to a specific browser tab for debugging
Inputs: tabId (required), host, port.
browser_disconnectC
Disconnect from a specific browser tab
Inputs: tabId (required).
browser_launchB
Launch a new browser instance with debugging enabled
Inputs: url, debugPort, executablePath, useDefaultBrowser.
browser_list_tabsA
List all available browser tabs that can be connected to
Inputs: host, port.
console_advanced_searchB
Advanced console search with pattern matching, correlation, and statistics
Inputs: tabId (required), patterns, correlate, includeStats, +1 more.
console_searchA
Search and filter console messages from connected browser tabs
Inputs: tabId (required), level, limit, regex, +1 more.
debug_localhostA
Launch browser with a localhost URL and automatically connect for debugging
Inputs: port (required), path, protocol, debugPort, +1 more.
error_correlateA
Automatically correlate errors between console and network, find root causes
Inputs: tabId (required), timeWindow, minSeverity.
log_analyzeC
Intelligently analyze logs to find patterns, anomalies, trends, and suggestions
Inputs: tabId (required), includeAllInsights.
network_analyzeC
Analyze network requests and responses from connected browser tabs
Inputs: tabId (required), limit, method, statusCode, +3 more.
network_export_harB
Export network traffic to HAR (HTTP Archive) format
Inputs: tabId (required), includeResponseBodies.
network_performanceC
Get network performance statistics for a connected browser tab
Inputs: tabId (required).
performance_profileC
Advanced performance profiling with bottleneck detection and recommendations
Inputs: tabId (required), includeWaterfall, includeRecommendations.
security_scanC
Scan for security vulnerabilities in console and network traffic
Inputs: tabId (required), includeRecommendations.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 16 tools
Multiple tools have overlapping purposes: console_search and console_advanced_search are nearly identical, network_performance and performance_profile both cover performance metrics, and log_analyze and backend_logs_stream both deal with log analysis. This creates confusion about which tool to select for a given task.
Tool names use a mix of prefixes and patterns: browser_list_tabs and browser_connect follow verb_noun, but network_performance is a noun, performance_profile is a noun, and debug_localhost uses a different prefix. Prefixes are inconsistent (some tools have no domain prefix).
16 tools is slightly above the typical 3-15 range, but the broad scope covering browser debugging, network analysis, performance profiling, security scanning, and backend logging justifies the count. Each tool has a distinct role, even if a few could be consolidated.
The tool set covers core debugging workflows like connecting, analyzing network/console, and exporting HAR, but lacks general browser interaction (e.g., navigation, DOM inspection, JavaScript execution) and tab management (closing tabs). Some important lifecycle operations are missing.
Related MCP Connectors
Live browser debugging for AI assistants ā DOM, console, network via MCP.
Flutter in-app bug tracking, visual pin annotations, and device logs directly into your AI IDE.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Errors, logs and AI-call costs for apps on Node.js, Next.js, Cloudflare Workers or the browser. Ask your AI whatās broken, why, and how to fix it, right inside Cursor or Claude.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to debug frontend applications by providing direct access to browser DevTools, React state, DOM inspection, and runtime debugging capabilities. Bridges the gap between AI and complex web applications for autonomous debugging and issue resolution.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding assistants to control and inspect a live Chrome browser through Chrome DevTools. Provides browser automation, performance analysis, debugging capabilities, and network request monitoring.2,405,354 npm55,871Apache 2.0
- AlicenseAqualityDmaintenanceEnables AI assistants to debug JavaScript and TypeScript applications by connecting to Chrome DevTools Protocol-compatible debuggers, allowing them to set breakpoints, step through code, inspect variables, and evaluate expressions with full source map support.1810 npm2Apache 2.0
- AlicenseBqualityBmaintenanceEnables AI agents to debug code and automate browsers using Chrome DevTools Protocol, supporting breakpoints, variable inspection, and replayable interaction recording.35548 npm19MIT