MCP server for browser-use with console debugging capabilities
Project description
Browser-Use MCP Console
🤖 智能浏览器自动化 + 控制台调试工具
A powerful MCP server that enables AI assistants to control browsers and debug web applications by capturing console outputs in real-time.
✨ Key Features
- 🌐 Browser Automation - AI-powered web automation using LLMs
- 🐛 Console Monitoring - Automatic capture of JavaScript errors, warnings, and logs
- ⚡ Parallel Execution - Run multiple browser tasks simultaneously
- 📝 Error Reporting - Detailed console error messages in task results
- 🔧 Debug Support - Perfect for testing and debugging web applications
🚀 Quick Start
1. Install the Package
pip install browser-use-mcp-console
Or use with Chinese mirror:
pip install browser-use-mcp-console -i https://mirrors.aliyun.com/pypi/simple/
2. Get Your API Key
Choose one provider:
- OpenRouter - Recommended, supports multiple models
- OpenAI - GPT models
- Anthropic - Claude models
3. Configure with Claude Desktop
# Using OpenRouter (Recommended)
claude mcp add browser-use \
--scope user \
--command "uvx" \
--args "browser-use-mcp-console" \
--env OPENROUTER_API_KEY=your-api-key-here
# Or using OpenAI
claude mcp add browser-use \
--scope user \
--command "uvx" \
--args "browser-use-mcp-console" \
--env OPENAI_API_KEY=your-api-key-here
4. Configure with Cursor (Optional)
Add to Cursor's MCP settings:
{
"mcpServers": {
"browser-use": {
"command": "uvx",
"args": ["browser-use-mcp-console"],
"env": {
"OPENROUTER_API_KEY": "your-api-key-here"
}
}
}
}
📖 Usage Examples
After configuration, you can use natural language commands in Claude:
Basic Web Automation
"Open Baidu Translate and translate 'Hello' to Chinese"
"Login to website with username admin and password 123456"
"Fill out the contact form on example.com"
Debug & Testing
"Visit localhost:3000 and check for console errors"
"Test the login functionality and report any JavaScript errors"
"Click the submit button and monitor console output"
Parallel Tasks
"Open three websites simultaneously: google.com, baidu.com, bing.com"
"Run multiple tests: login test, form validation test, API test"
⚙️ Configuration Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
tasks |
list[str] | Required | Task descriptions (single or multiple) |
model |
str | Varies* | LLM model to use |
headless |
bool | False | Run browser in background |
max_steps |
int | 100 | Maximum actions per task |
use_vision |
bool | True | Enable visual page understanding |
*Default models:
- OpenRouter:
google/gemini-2.5-pro - OpenAI:
gpt-4o-mini - Anthropic:
claude-3-5-sonnet-20241022
🔍 Console Monitoring Features
The key advantage of this MCP server is automatic console capture:
- Automatic Error Detection - Captures all JavaScript errors and unhandled Promise rejections
- Detailed Error Reports - Returns specific error messages with stack traces
- Real-time Monitoring - Console logs are captured as pages execute
- Comprehensive Coverage - Monitors console.log, console.error, console.warn, console.info
Example error report:
Task completed. Found console errors:
- TypeError: Cannot read properties of undefined (reading 'data') at app.js:45
- Unhandled Promise rejection: API timeout at fetch.js:89
🛠️ Troubleshooting
Browser not opening?
- The server auto-detects Playwright browsers
- First run may download Chromium automatically
- Check
PLAYWRIGHT_BROWSERS_PATHenvironment variable
API key issues?
- Ensure your API key is valid and has credits
- OpenRouter users: Check your balance at openrouter.ai
- Try testing with a simple task first
Console logs not showing?
- Console capture is automatic but viewing requires explicit checking
- The agent will check console when task mentions "debug", "test", or "errors"
📚 Development
# Clone repository
git clone https://github.com/yourusername/browser-use-mcp-console
cd browser-use-mcp-console
# Install in development mode
pip install -e .
# Run tests
python test_mcp_client.py
📄 License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file browser_use_mcp_console-0.1.5.tar.gz.
File metadata
- Download URL: browser_use_mcp_console-0.1.5.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a72cec91445007c40bf1fdfecbd38ed022227184aeb26266c4206ce58ba8c28c
|
|
| MD5 |
dd81cbc891ec236bf841c3cca1dab24b
|
|
| BLAKE2b-256 |
21d9997c8bde5207234f9e645b695b50cd5fe738e960d6359ebea568bde3befb
|
File details
Details for the file browser_use_mcp_console-0.1.5-py3-none-any.whl.
File metadata
- Download URL: browser_use_mcp_console-0.1.5-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15583e386e654f4179c8e3e2ac3a1474057287d79af2a3388196177c8d3d6dd6
|
|
| MD5 |
4b533aa2c6eb16a35d7a10d543879886
|
|
| BLAKE2b-256 |
9178e56e6cc7170bf77798507f010530827279880223b4aede962dc1fa65b406
|