Skip to main content

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:

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_PATH environment 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

🔗 Related Projects

  • browser-use - Core browser automation library
  • MCP - Model Context Protocol
  • FastMCP - Fast MCP server framework

📈 Version History

  • v0.1.4 - Enhanced error reporting, configurable vision support
  • v0.1.2 - Fixed API authentication issues
  • v0.1.1 - Fixed Playwright Trace Viewer auto-opening
  • v0.1.0 - Initial release

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

browser_use_mcp_console-0.1.4.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

browser_use_mcp_console-0.1.4-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file browser_use_mcp_console-0.1.4.tar.gz.

File metadata

  • Download URL: browser_use_mcp_console-0.1.4.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for browser_use_mcp_console-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a8d0511da48a312e6bf37cf8abd12de420ce812e4e67df7e30fa4d06c4d1d4d5
MD5 06b88dfddf8254bf585707465c3056e4
BLAKE2b-256 4982ff70aaeadda1ca10f1d93471b221edda890ea4feb2af43ec0827281b840d

See more details on using hashes here.

File details

Details for the file browser_use_mcp_console-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for browser_use_mcp_console-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8411e3289ee4080946a0e9d1714a765696cb3d36b27b718a8de6f436e09fe032
MD5 2f8d13c26479386c1ebd53c61a0c572f
BLAKE2b-256 88439ef6c6be273268540feb8b734cc6e7da4b9fdb28ff09d1e6c6eb4ce0e78e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page