Bruster
Bruster is an MCP browser-automation server for controlling native webviews and running browser-based UI workflows.
Navigate pages and manage history: navigate, back, forward, reload, url, title.
Inspect pages and DOM: snapshot, find, text, html, attr, rect, count, eval.
Interact with page elements: click, hover, fill, fill_form, type, press, select, check, drag, upload, scroll.
Capture screenshots: viewport, full page, or clipped PNG.
Wait for conditions: selector states, text, URL, network idle, or time.
Manage tabs and windows: new_tab, tabs, switch_tab, close_tab, resize, maximize, minimize.
Inspect and control browser state: cookies, set_cookie, network, network_request, console, dialog, dark, light.
Shut down the server with close.
Bruster is an open-source Rust browser automation tool and Model Context Protocol (MCP) server. Control native webviews from AI agents, Python scripts, or your own test runner through MCP or a JSON-lines API. No Node.js required.
Documentation · UI testing · MCP setup · Compare with Playwright · Benchmarks · Releases
Navigate pages, inspect the DOM, fill forms, take screenshots, and manage tabs
and persistent sessions on macOS (WKWebView), Linux (WebKitGTK), and Windows
(WebView2). Bruster fits native-webview scripts, focused smoke tests, and
agent-driven workflows. Run .bru tests with the built-in runner or use your own.
For AI tools: documentation index · full CLI and API reference.
Demo

Scripted MCP session with real WebKitGTK captures. Try the demo.
Related MCP server: mcp-browser
Install
On macOS and Linux:
curl -fsSL https://raw.githubusercontent.com/aliilyas/bruster/main/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"Linux also needs WebKitGTK 4.1. On Ubuntu or Debian:
sudo apt install libwebkit2gtk-4.1-0Without a desktop display, also install xvfb and xauth.
Other Linux distributions.
On Windows, download an archive from Releases and install the WebView2 runtime.
Docker Hub
The Docker image includes the Linux browser runtime and virtual display for amd64 and arm64:
docker run --rm -i ilyastmn/bruster:latestStarts an MCP server over stdio. Docker client setup.
MCP
Add this server to Claude Desktop's claude_desktop_config.json or Cursor's .cursor/mcp.json:
{
"mcpServers": {
"bruster": {
"command": "bruster",
"args": ["--mcp", "--quiet"]
}
}
}Use the executable's absolute path if your client cannot find bruster.
Add --visible to watch the browser or --profile ./profile to save cookies and storage.
Setup for other clients and troubleshooting.
JSON lines
Run bruster, then send requests on stdin, waiting for each response before the next request:
{"id":1,"method":"navigate","params":{"url":"https://example.com"}}
{"id":2,"method":"snapshot","params":{"format":"text"}}
{"id":3,"method":"screenshot","params":{"path":"example.png"}}
{"id":4,"method":"close"}Responses carry the matching id; page events also arrive on stdout.
Protocol and API reference.
UI tests with the .bru DSL
Bruster includes a compact, line-oriented DSL for repeatable UI checks. It handles
browser startup, waits, assertions, and failure evidence so you can focus on the
flow being tested. Write a login.bru file:
base_url "http://localhost:3000"
test "opens the dashboard"
navigate "/login"
fill "#email" "tester@example.com"
fill "#password" "test-password"
click "button[type=submit]"
expect url "/dashboard"
expect text "h1" "Dashboard"
endRun bruster test login.bru. Assertions retry until their deadline; each test
gets a fresh browser and profile. Failures include source lines, screenshots,
and page diagnostics. The runner writes a JSON report and returns a nonzero exit
code on failure. No Node.js or Python is needed to run tests.
Use before_each for shared setup and --base-url to run the same tests against
another environment. The time savings are in authoring and debugging tests.
The runner is available in source builds from main; older release binaries may
not include bruster test yet.
UI testing guide · Beginner course: 20 lessons · DSL reference · Runnable local example · Website and demo example tests · Web automation testing tutorial
Limitations
Bruster uses WKWebView on macOS, WebKitGTK on Linux, and WebView2 on Windows. Input events are synthetic; cross-origin iframes and OS-level controls aren't supported. See the full limitations when choosing a browser backend.
Development
Build with cargo build --release --locked.
See Contributing for dependencies, tests, and documentation changes.
Dependency security checks: daily RustSec, cargo-deny, OSV-Scanner, and Trivy scans, plus Dependabot and Socket setup.
License
Available Tools
43 toolsattrC
Attribute value of an element.
Inputs: name (required), ref, tab, selector, +1 more.
backD
History back.
Inputs: tab.
checkC
Set a checkbox or radio.
Inputs: ref, tab, force, checked, +3 more.
clickB
Click an element, or a viewport point with x,y. Waits until it is visible, enabled and not covered; force skips that.
Inputs: x, y, ref, tab, +4 more.
closeA
Shut down Bruster, closing all tabs and the stdio server. Use close_tab to close only one tab.
Inputs: tab.
close_tabA
Close a tab; the last tab cannot be closed (use close to shut down).
Inputs: tab.
consoleC
Console messages and page errors since the last navigation.
Inputs: tab, clear, request_timeout.
cookiesD
All cookies.
Inputs: tab.
countC
Number of elements matching a selector.
Inputs: selector (required), tab, request_timeout.
darkA
Persist dark color-scheme for all existing and future pages.
Inputs: tab.
dialogB
Set how alert/confirm/prompt are answered from now on, and list dialogs seen so far.
Inputs: tab, text, clear, accept, +1 more.
dragC
Drag one element onto another (HTML5 drag events).
Inputs: to (required), from (required), tab, request_timeout.
evalC
Evaluate a JavaScript expression in the page.
Inputs: expression (required), tab, request_timeout.
fillC
Set an input's value (fires input/change).
Inputs: value (required), ref, tab, force, +3 more.
fill_formB
Fill several fields at once: [{selector|ref, value}]. Checkboxes take a boolean, selects a value or array.
Inputs: fields (required), tab, request_timeout.
findC
Snapshot narrowed to elements whose name, text, value or href contains text or matches regex.
Inputs: max, tab, text, boxes, +4 more.
forwardD
History forward.
Inputs: tab.
hoverC
Hover an element.
Inputs: ref, tab, force, timeout, +2 more.
htmlC
outerHTML of an element.
Inputs: ref, tab, selector, request_timeout.
lightB
Persist light color-scheme for all existing and future pages.
Inputs: tab.
maximizeA
Maximize this window and persist the requested mode for future runs. Hidden windows only persist the mode.
Inputs: tab.
minimizeB
Hide this native window and persist minimized mode. Hidden windows stay off-screen and only persist the mode.
Inputs: tab.
networkC
Requests made by the page: fetch, xhr and resources. index feeds network_request.
Inputs: tab, clear, request_timeout.
network_requestC
Headers and body prefix of one fetch/xhr entry from network.
Inputs: index (required), tab, request_timeout.
new_tabA
Open a new tab, optionally at a URL. Returns its id; use switch_tab to make it current.
Inputs: tab, url, timeout.
pressB
Press a key, e.g. Enter, Escape, Tab, Control+a.
Inputs: key (required), ref, tab, selector, +1 more.
rectB
Bounding box of an element (for screenshot clip).
Inputs: ref, tab, selector, request_timeout.
reloadC
Reload the page.
Inputs: tab.
resizeC
Resize the viewport.
Inputs: width (required), height (required), tab.
screenshotA
PNG of the viewport. full=true for the whole page, or clip={x,y,width,height}. path writes the file instead of returning it.
Inputs: tab, clip, full, path.
scrollC
Scroll an element into view, or by x/y.
Inputs: x, y, ref, tab, +2 more.
selectC
Choose option(s) in a .
Inputs: value (required), ref, tab, force, +3 more.
set_cookieD
Set a cookie.
Inputs: name (required), value (required), tab, path, +1 more.
snapshotA
List visible elements and text with refs usable in other tools, one per line: ref role "name" href=... selector scopes to a subtree, max caps the list, boxes adds rects, format=json for objects.
Inputs: max, tab, boxes, format, +2 more.
switch_tabB
Make a tab the default for later calls.
Inputs: tab (required).
tabsC
List open tabs.
Inputs: tab.
textB
innerText of an element, truncated to max characters.
Inputs: max, ref, tab, selector, +1 more.
titleC
Page title.
Inputs: tab, request_timeout.
typeB
Type text key by key into an element. submit presses Enter afterwards.
Inputs: text (required), ref, tab, delay, +5 more.
uploadC
Set files on a file input from local paths.
Inputs: paths (required), ref, tab, selector, +1 more.
urlD
Current URL.
Inputs: tab, request_timeout.
wait_forB
Wait for selector state (visible/attached/hidden), text present or gone, url substring, network idle, or time ms.
Inputs: ref, tab, url, idle, +7 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 43 tools
Most tools target clearly distinct actions or resources, and descriptions help separate close pairs like snapshot/find and cookies/set_cookie. There is some overlap among low-level inspection tools (text, html, attr, rect, count), but boundaries are generally clear.
The set uses snake_case consistently but mixes verb commands (click, fill_form, wait_for) with bare noun getters (cookies, url, title, network, console, dialog). It remains readable and category-consistent, but it is not a predictable verb_noun pattern throughout.
At 43 tools, the surface is heavy for a single browser automation server, exceeding the typical 3-15 well-scoped range. Many commands are useful, but several low-level inspection tools could reasonably be consolidated.
Coverage is broad: navigation, interaction, DOM inspection, screenshots, network, console, cookies, tabs, and window controls are all present. Gaps remain around iframe/frame switching and explicit download or request-interception handling, but core workflows are covered.
Maintenance
Related MCP Connectors
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Scrape, crawl, map & search the web. Open-source, self-hostable Rust crawler & search for AI agents.
Cloud browser, web extraction, screenshots, and remote CDP tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenancesingle-binary MCP server that gives AI agents a browser. 66 tools for navigation, form filling, data extraction, screenshots, and DOM diffing — built on pure Chrome DevTools Protocol.14MIT
- AlicenseNot gradedqualityCmaintenanceNative macOS browser (SwiftUI + WKWebView) that exposes an MCP server in-process so AI agents can drive a real local browser with the user's existing logged-in sessions. ~40 tools (navigate, click, fill, screenshot, eval_js, network log, accessibility tree). Local-only with bearer-token auth.2MIT
- AlicenseAqualityDmaintenanceSelf-hosted MCP server for AI browser automation. Connects to your own Chromium instance via CDP, providing tools for browser control, navigation, interaction, and content extraction.191MIT
- AlicenseAqualityBmaintenanceA lightweight 30KB MCP browser automation server that uses raw Chrome DevTools Protocol to enable AI agents to browse the web, take screenshots, interact with elements, and capture live page events like console logs and network requests.41338 npm20MIT