Skip to content

About

BioRouter extension (.brxt) wrapping Microsoft's @playwright/mcp browser-automation MCP server.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Playwright Agent

Browser automation for Biorouter through Microsoft's official @playwright/mcp: navigate sites, read pages as accessibility snapshots (no vision model needed), click, type, fill forms and take screenshots.

Current version: 0.2.0

This is a Biorouter extension (a .brxt bundle). Install it from BAAM in Biorouter, or from a file:

biorouter extension install dist/playwrightagent.brxt

What it runs

A small Python launcher starts npx -y @playwright/mcp@0.0.86 --no-webmcp and sits between Biorouter and that server on stdio:

  • The upstream version is pinned. Version 0.1.0 started @playwright/mcp@latest, so every start took whatever Microsoft published last. This release pins 0.0.86. A new upstream version reaches you only through a reviewed Playwright Agent release.
  • Only the reviewed tools pass. The launcher lists and calls only the 24 tools in src/playwrightagent/tools.json. It withholds browser_run_code_unsafe, which upstream describes as RCE-equivalent: it runs arbitrary JavaScript in the server process with unrestricted file access, and upstream has no flag to turn it off. A tool a later upstream adds is not shown until a release reviews it.
  • Pages cannot add tools. --no-webmcp stops web pages from registering their own tools through the WebMCP API, and the allowlist would refuse them anyway.

Requirements

  • Node.js 18 or later on PATH (npx must resolve).
  • Google Chrome, which is upstream's default browser. To use another, set PLAYWRIGHT_MCP_BROWSER to firefox, webkit or msedge; those may need npx playwright install <browser> once.

Tools

browser_navigate, browser_navigate_back, browser_snapshot, browser_find, browser_click, browser_hover, browser_drag, browser_drop, browser_type, browser_press_key, browser_fill_form, browser_select_option, browser_file_upload, browser_handle_dialog, browser_evaluate (runs JavaScript in the page, not in the server), browser_take_screenshot, browser_console_messages, browser_network_requests, browser_network_request, browser_tabs, browser_wait_for, browser_resize, browser_emulate_media and browser_close. Upstream marks the read-only ones (browser_snapshot, browser_find, browser_take_screenshot, browser_console_messages, the two network tools and browser_wait_for) as read only, so Biorouter's Smart approval runs them without asking and asks before the others.

Settings

Variable Required Secret Purpose
PLAYWRIGHT_MCP_HEADLESS no no true runs the browser without a window
PLAYWRIGHT_MCP_BROWSER no no chrome (default), firefox, webkit or msedge
PLAYWRIGHT_MCP_ISOLATED no no true keeps the browser profile in memory

Upstream reads its other PLAYWRIGHT_MCP_* settings from the environment as well; see its README. File access stays limited to the working folder unless you set PLAYWRIGHT_MCP_ALLOW_UNRESTRICTED_FILE_ACCESS.

Development

uv sync --locked
uv run python -m unittest discover -s tests -v   # BRXT_OFFLINE=1 skips the browser test
uv run python scripts/build_brxt.py --previous previous/playwrightagent.brxt

To move to a newer upstream: change PLAYWRIGHT_MCP_VERSION in src/playwrightagent/launcher.py, review its tool list, update src/playwrightagent/tools.json, tests/expected_tools.json and tools_count, then bump the version with scripts/version.py. The release workflow publishes a pushed vX.Y.Z tag that equals the manifest version.

License

Apache-2.0. See NOTICE for the upstream server's attribution.

About

BioRouter extension (.brxt) wrapping Microsoft's @playwright/mcp browser-automation MCP server.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages