Skip to content

Add wait_for and browser_run_code tools #422

Description

@IAliceBobI

Feature Comparison with Other MCPs

After comparing BrowserOS MCP with Chrome DevTools MCP and Playwright MCP, I noticed some features that would be valuable additions:

Comparison Table

Feature BrowserOS Chrome DevTools MCP Playwright MCP
Native page content extraction ✅ Native ❌ Requires JS ❌ Requires JS
JavaScript execution ✅ evaluate_script ✅ evaluate_script ✅ browser_evaluate
wait_for (wait for text) ❌ Manual polling ✅ wait_for ✅ browser_wait_for
Execute arbitrary custom code ✅ browser_run_code
Network monitoring ✅ list_network_requests ✅ browser_network_requests
Performance tracing ✅ performance_start_trace
Lighthouse audit ✅ lighthouse_audit
Memory analysis ✅ take_memory_snapshot
Bookmark/History management

Missing Features in BrowserOS

  1. wait_for functionality

    • Chrome DevTools MCP has "wait_for" that can wait for text to appear/disappear
    • Playwright MCP has "browser_wait_for" with "text", "textGone", and "time" parameters
    • This eliminates the need for manual polling loops
  2. browser_run_code capability

    • Playwright MCP's "browser_run_code" allows executing arbitrary Playwright code with the page object
    • Very powerful for complex scenarios not covered by predefined tools
  3. Network/Performance tools

    • Chrome DevTools MCP has excellent network monitoring and performance tracing
    • BrowserOS currently lacks these capabilities

BrowserOS Strengths 🌟

BrowserOS's "get_page_content" is the BEST among all three MCPs:

  • Native page content extraction (no JS needed)
  • CSS selector support via "selector" parameter
  • "viewportOnly" parameter for visible content only
  • "includeLinks" and "includeImages" options
  • Bookmark and history management (unique to BrowserOS)

Suggestion

Consider adding:

  1. "wait_for" method for waiting on text/conditions without manual polling
  2. "browser_run_code" or similar for advanced custom code execution
  3. Network monitoring capabilities

This would make BrowserOS MCP the most complete browser automation solution!

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions