Skip to content

Add Safari support via WebDriver Classic backend #11

Description

@MathiasPaulenko

Context

WaveXisMCP currently supports Chrome/Edge (via CDP) and Firefox (via BiDi). Safari is the only major browser we don't support. Playwright MCP supports it — this is one of the few areas where they beat us.

Safari doesn't support CDP and its BiDi support is experimental/incomplete. The path forward is WebDriver Classic (W3C HTTP-based protocol) via safaridriver, which is pre-installed on macOS.

What needs to happen

In wavexis (the library)

  1. New file wavexis/backend/webdriver.py — WebDriverBackend class implementing AbstractBackend
    • HTTP client using stdlib urllib or httpx (no Selenium dependency)
    • Auto-launch safaridriver from /usr/bin/safaridriver
    • Translate our backend methods to WebDriver Classic commands (POST/GET HTTP)
    • Implement: navigate, screenshot, click, type, eval, cookies, tabs, get_title, get_url
    • Unsupported methods raise UnsupportedOperationError
  2. BrowserOptions.browser accepts 'safari'
  3. BackendManager registers the webdriver backend
  4. Unit tests for the new backend

In wavexis-mcp (this repo)

  1. SessionOpenInput.browser accepts 'safari'
  2. When browser='safari', auto-select webdriver backend
  3. Unsupported tools return error with suggestion: 'Safari does not support this feature. Use backend=cdp or bidi with Chrome/Firefox.'

What works vs what doesn't

Category WebDriver Classic Tools
Navigate, screenshot, click, type, eval, cookies, tabs Yes ~72 (core)
Network interception, HAR, mock, throttle No 20
DevTools (performance, trace, coverage, debugging) No 31
Video recording, screencast No 4
BiDi events, raw BiDi No -
Storage (localStorage, IndexedDB) Partial (via executeScript) 18
Emulation (device, geolocation, timezone) No 9
A11y snapshot Partial (via executeScript) 4

~72 of 220 tools would work (core tier). The rest returns a clear error.

Constraints

  • macOS only — safaridriver does not exist on Windows/Linux
  • Core tools only — 72/220
  • CI can't test it — GitHub Actions Ubuntu has no Safari (manual testing required)

Getting started

  1. Read wavexis/backend/abstract.py to understand the AbstractBackend interface
  2. Read wavexis/backend/bidi.py for a reference implementation
  3. Check wavexis_mcp/session.py to see how backends are selected
  4. Join the discussion below if you have questions!

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions