Related ToolsClaude CodeCursorClaude For Desktop

Brw Plugin Gives Claude Code Agents Full Browser Control via Chrome DevTools

Claude by Anthropic
Image: Anthropic

What Happened

A developer (sshh12) released Brw, an open-source browser automation plugin for Claude Code that gives AI agents direct control over a real Chrome browser. The plugin is available through the Claude Code plugin marketplace and works through Chrome DevTools Protocol.

Brw operates on a proxy architecture: a lightweight server manages the Chrome instance on localhost:9225, and each CLI call is a stateless HTTP request to that proxy. The proxy then communicates with Chrome via CDP/WebSocket on port 9222. This design means multiple Claude Code agents can share one browser instance, each isolated to their own tabs with per-tab mutexes preventing collisions.

The feature list is extensive. Agents can take screenshots at viewport, full-page, or element level. They can click, type, scroll, drag, fill forms by CSS selector or accessibility ref, execute JavaScript, and read page content via the accessibility tree. There is tab management (create, switch, close, list), iframe targeting, browser dialog handling, and network request interception and mocking. It can record GIFs of browser actions with click and drag overlays, emulate devices and viewports, set geolocation and timezone, export PDFs, and track downloads. A "quick mode" allows batching multiple actions in a single call.

Configuration supports three tiers in priority order: environment variables, per-repo .claude/brw.json, and user-level config. The per-project config is useful for restricting agents to specific URLs like localhost:* or https://staging.myapp.com/*, preventing agents from wandering to unintended sites.

The plugin requires Node.js 18+ and any Chromium-based browser (Chrome, Chromium, Edge, or Brave).

Why It Matters

Claude Code users have had limited options for browser interaction. Anthropic's Claude for Chrome extension is closed-source and requires a subscription. The existing MCP-based alternatives (Playwright MCP, Chrome DevTools MCP) were built for single-agent use and struggle when multiple agents need to share a browser session.

For developers running Claude Code agent teams - where multiple agents work on different parts of a project simultaneously - browser access has been a bottleneck. Testing a frontend change meant leaving the agent workflow to manually check the browser. Brw removes that step. An agent can navigate to your dev server, fill out a form, take a screenshot, and verify the UI all within its normal workflow.

The URL allowlisting feature is worth noting. Unrestricted browser access for AI agents is a legitimate security concern. Being able to lock agents to localhost and your staging domain is a practical safeguard.

The multi-agent architecture is the real differentiator here. Per-tab mutexes and stateless CLI commands mean you can have three agents testing different pages of your app simultaneously without them stepping on each other.

Our Take

This is a well-architected solution to a real gap in Claude Code's capabilities. The proxy-based approach is smarter than the MCP server alternatives because it treats browser state as a shared resource with proper concurrency controls rather than trying to give each agent its own browser instance.

The timing makes sense. As Claude Code agent teams become more common, the need for agents to verify their own frontend work visually - not just through test assertions - becomes obvious. Having an agent write CSS, then screenshot the result to verify it looks right, is a workflow that saves real time.

Two caveats. First, this is brand new with minimal community traction so far. It works in demo form, but production reliability across diverse setups is unproven. Second, giving AI agents browser control requires trust in both the agent's judgment and the URL restrictions you configure. The allowlisting defaults to * (everything), which you should change immediately for any serious use.

If you are running Claude Code for frontend development or end-to-end testing, Brw is worth installing and experimenting with. The open-source transparency alone makes it preferable to closed alternatives where you cannot inspect what the agent is actually doing in your browser.