web-ui-tester

An MCP server that lets an AI drive and inspect real web pages quickly, over browser sessions that stay alive between tool calls.
Two things make it fast. Pages are exposed as an accessibility tree with element refs rather than screenshots or raw HTML, so the model can find and click things without burning context on markup or waiting on vision. And sessions persist — cookies, page state, and history survive across calls, so a long interaction is a series of cheap steps instead of repeated cold starts.
It also carries DevTools-grade diagnostics — console, network with response bodies, JS evaluation, computed styles — so the AI can work out why something is broken, not just that it is.
Quick start
Claude Desktop (one click)
- Go to the latest release and download
web-ui-tester-<version>.mcpb. The same file works on macOS, Windows and Linux.
- Double-click it. Claude Desktop installs the extension and offers four optional settings: a Gemini and an Anthropic API key (only for
run_task), the agent model, and headless mode.
- Start a new chat and ask Claude to open a page.
The extension runs on the Node.js that ships with Claude Desktop and brings no browser of its own: it drives Google Chrome or Microsoft Edge if one is installed, or Playwright's Chromium if you have installed that.
As a Claude plugin (Claude Code)
claude plugin marketplace add hofmeister/web-ui-tester
claude plugin install web-ui-tester@web-ui-tester
npx [email protected] install chromium # once, unless Google Chrome or Microsoft Edge is installed
The plugin runs the server from the TypeScript source in this repository with your own node (22.18 or newer), and Claude Code installs its dependencies from package-lock.json when you install the plugin. It asks for four optional settings: a Gemini and an Anthropic API key (only for run_task, kept in your system's secure credential store), the agent model, and whether the browser runs headless.
Then ask Claude something like "Open http://localhost:3000, sign up with a test account and tell me what breaks."
To try a working copy, run claude --plugin-dir . in the repository, and claude plugin validate . before you push.
Other MCP clients
claude mcp add web-ui-tester -- npx -y web-ui-tester
With a key for the built-in agent (see run_task):
claude mcp add web-ui-tester \
-e GOOGLE_GENERATIVE_AI_API_KEY=your-key \
-- npx -y web-ui-tester
Or in any MCP client's config file:
{
"mcpServers": {
"web-ui-tester": {
"command": "npx",
"args": ["-y", "web-ui-tester"],
"env": { "GOOGLE_GENERATIVE_AI_API_KEY": "your-key" }
}
}
}
The server uses Playwright's Chromium when it is installed, and otherwise an installed Google Chrome or Microsoft Edge. To install Playwright's Chromium:
npx playwright install chromium
Example prompts
- "Open http://localhost:3000, sign up with a new test account, and tell me whether anything errors along the way — console, network or UI."
- "Go to our staging checkout page, add the cheapest product to the cart, and check that the total matches the item price plus shipping."
- "Why does the 'Save' button on /settings do nothing? Click it and look at the console, the network request and the button's computed styles."
- "Log in to the admin as [email protected] / demo-password and use
run_task to check that every link in the sidebar opens a page without errors."
How a session works
browser_start → sessionId, kept alive across calls
browser_navigate → page state + snapshot with [ref=eN] handles
browser_click ref=e12 → act on what the snapshot showed you
browser_snapshot → fresh refs after the page changes
browser_close → done (or let it idle out after 30 minutes)
Everything after browser_start takes that sessionId. The snapshot is the thing to get used to:
- generic [ref=e1]:
- heading "Signup" [level=1] [ref=e2]
- textbox "Name" [ref=e5]:
- /placeholder: Your name
- combobox "Plan" [ref=e7]
- button "Create account" [ref=e10]
- link "Go to second page" [ref=e12] [cursor=pointer]:
- /url: /second.html
Those refs go straight into browser_click, browser_type, and the rest. They belong to the page state that produced them: after navigating or a DOM change, snapshot again. When a tool says a ref is no longer valid, re-snapshot rather than retry — the message says so explicitly.
Element-addressing tools also accept css, or role + name, when you already know the selector and would rather skip the snapshot.
Tools