Skip to main content
Glama

web-ui-tester

CI

Un servidor MCP que permite a una IA manejar e inspeccionar páginas web reales rápidamente, mediante sesiones de navegador que permanecen activas entre llamadas a herramientas.

Dos cosas lo hacen rápido. Las páginas se exponen como un árbol de accesibilidad con referencias a elementos en lugar de capturas de pantalla o HTML crudo, de modo que el modelo puede encontrar y hacer clic en cosas sin gastar contexto en el marcado ni esperar a la visión. Y las sesiones persisten — las cookies, el estado de la página y el historial sobreviven entre llamadas, de modo que una interacción larga es una serie de pasos baratos en lugar de arranques en frío repetidos.

También incluye diagnósticos de nivel DevTools — consola, red con cuerpos de respuesta, evaluación de JavaScript, estilos calculados — para que la IA pueda averiguar por qué algo está roto, no solo que lo está.

Inicio rápido

claude mcp add web-ui-tester -- npx -y web-ui-tester

Con una clave para el agente integrado (ver run_task):

claude mcp add web-ui-tester \
  -e GOOGLE_GENERATIVE_AI_API_KEY=your-key \
  -- npx -y web-ui-tester

O en el archivo de configuración de cualquier cliente MCP:

{
  "mcpServers": {
    "web-ui-tester": {
      "command": "npx",
      "args": ["-y", "web-ui-tester"],
      "env": { "GOOGLE_GENERATIVE_AI_API_KEY": "your-key" }
    }
  }
}

Chromium viene de Playwright. Si aún no está instalado:

npx playwright install chromium

Related MCP server: Charlotte

Cómo funciona una sesión

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)

Todo lo que viene después de browser_start toma ese sessionId. La instantánea es lo que hay que acostumbrarse a usar:

- 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

Esas referencias van directamente a browser_click, browser_type y el resto. Pertenecen al estado de la página que las produjo: después de navegar o de un cambio en el DOM, vuelve a tomar una instantánea. Cuando una herramienta dice que una referencia ya no es válida, vuelve a tomar una instantánea en lugar de reintentar — el mensaje lo dice explícitamente.

Las herramientas de direccionamiento de elementos también aceptan css, o role + name, cuando ya conoces el selector y prefieres omitir la instantánea.

Herramientas

Sesión — browser_start (opciones: userAgent, viewportWidth, viewportHeight, headless, baseUrl, url, model), browser_list, browser_close.

Interacción — browser_navigate, browser_click, browser_type, browser_press_key, browser_hover, browser_select_option, browser_scroll, browser_wait_for, browser_go_back, browser_handle_dialog.

Las acciones informan de lo que causaron: la navegación, los nuevos errores de consola, los recuentos de solicitudes y cualquier diálogo que aparezca vuelven con el resultado, de modo que un clic que rompió algo silenciosamente no parezca un éxito.

Los diálogos necesitan una nota. Un alert/confirm/prompt bloquea la página hasta que se responde, por lo que la acción que lo abrió no puede también responderlo — un diálogo sin responder se descarta automáticamente en lugar de detener el clic, y el resultado lo dice. Para aceptar uno, o para rellenar un prompt, llama a browser_handle_dialog antes de la acción que lo desencadena y la respuesta queda armada para el siguiente diálogo.

Inspección — browser_snapshot (acotable por elemento, limitado por depth, interactiveOnly, paginado por offset), browser_query (buscar por rol/nombre, texto o CSS — devuelve referencias y estado), browser_read_text (texto renderizado de la página o de un subárbol), browser_screenshot (disponible, pero el árbol suele ser la mejor herramienta).

Diagnósticos — browser_console (mensajes más errores no capturados con pilas), browser_network (estados, tamaños, tiempos), browser_request_detail (cabeceras, desglose de tiempos, cuerpos de solicitud y respuesta), browser_evaluate (ejecutar JavaScript en la página), browser_inspect_element (estilos calculados, modelo de caja, estado de formulario).

Cada resultado está limitado a un presupuesto de caracteres, y los grandes (browser_snapshot, browser_read_text, cuerpos) se paginan con offset en lugar de truncarse silenciosamente.

El agente integrado

run_task entrega una sesión a un modelo rápido que maneja el navegador por sí mismo e informa de vuelta:

run_task(sessionId, "Log in as demo@example.com / hunter2 and check the
                     dashboard loads without errors")

Informar es el punto. Devuelve un veredicto estructurado, no solo prosa:

status: success
model: google:gemini-flash-lite-latest

Logged in and opened the dashboard. The revenue widget rendered empty.

findings (3):
  [error] Request failed: GET 500 [observed by the harness]
      where: https://app.example.com/api/revenue
      evidence: HTTP 500
  [error] Console exception on the page [observed by the harness]
      where: app.js:214:9
      evidence: TypeError: Cannot read properties of undefined (reading 'total')
  [warning] The revenue widget shows no empty state, just blank space
      where: #revenue-card
      evidence: card is present but contains no text

Los hallazgos provienen de dos lugares, y la distinción importa. El agente llama a report_finding a medida que avanza — de modo que una ejecución que alcanza su límite de pasos aún devuelve todo lo que encontró hasta ese punto. Por separado, el arnés registra cada error de consola, solicitud fallida y diálogo durante la ejecución e informa de ellos tanto si el agente los menciona como si no, marcados como [observado por el arnés]. Un modelo que pase por alto un 500 u olvide mencionar una excepción no puede ocultarlo.

El mismo informe se devuelve como structuredContent contra un esquema de salida declarado, de modo que una IA que llama puede ramificar en findings[].severity en lugar de analizar texto. Una tarea puede tener éxito y aun así tener hallazgos; success refleja si la tarea se logró, no si la página estaba limpia.

Esta es la única parte que necesita una clave de API. Por defecto usa Gemini Flash Lite por latencia; Anthropic también funciona:

Modelo por defecto

Clave

Google

gemini-flash-lite-latest

GOOGLE_GENERATIVE_AI_API_KEY

Anthropic

claude-haiku-4-5

ANTHROPIC_API_KEY

Configura WUT_MODEL para elegir (anthropic, o google:gemini-flash-latest, o cualquier provider:modelId). Una sesión puede anularlo mediante el model de browser_start, y una sola llamada mediante el model de run_task. Todas las demás herramientas funcionan sin clave.

Modo HTTP

web-ui-tester --port 7399
claude mcp add --transport http web-ui-tester http://127.0.0.1:7399/mcp

En este modo, las sesiones de navegador viven en el servidor de larga duración en lugar de en un proceso propiedad del cliente, por lo que sobreviven a reinicios y reconexiones del cliente — reconéctate, pasa el mismo sessionId, y la página sigue ahí. GET /health informa de los recuentos de sesiones y conexiones.

Se vincula a 127.0.0.1 por defecto, donde la protección contra el rebinding de DNS está habilitada. --host amplía eso, y el servidor advierte cuando lo haces: no hay autenticación, y cualquiera que pueda alcanzar el puerto puede manejar un navegador y ejecutar JavaScript a través de él. Ponlo detrás de un proxy o un cortafuegos.

Configuración

Variable

Por defecto

Propósito

WUT_MODEL

google:gemini-flash-lite-latest

Modelo para run_task, como provider[:modelId]

GOOGLE_GENERATIVE_AI_API_KEY

—

Clave para Gemini

ANTHROPIC_API_KEY

—

Clave para Anthropic

WUT_USER_AGENT

AITester/1.0

User-Agent por defecto para nuevas sesiones

WUT_HEADLESS

true

Modo headless por defecto

WUT_IDLE_TIMEOUT_MS

1800000

Cerrar sesiones sin uso durante este tiempo

WUT_MAX_OUTPUT_CHARS

15000

Límite de caracteres por resultado de herramienta

WUT_ACTION_TIMEOUT_MS

5000

Tiempo de espera para una acción de elemento

WUT_AGENT_MAX_STEPS

20

Presupuesto de pasos por defecto para run_task

WUT_EXECUTABLE_PATH

—

Binario de Chromium explícito

PLAYWRIGHT_BROWSERS_PATH

—

Dónde busca Playwright los navegadores

Banderas de CLI: --port, --host, --headless / --no-headless, --idle-timeout, --version, --help.

Si la revisión de Chromium esperada por Playwright no está instalada pero hay otra, el servidor la encuentra y la usa en lugar de fallar — útil en contenedores preconstruidos. WUT_EXECUTABLE_PATH anula la búsqueda por completo.

Desarrollo

npm install
npm run build
npm test          # agent loop (mocked model) + full end-to-end suite
npm run typecheck

npm test ejecuta el bucle del agente contra un modelo simulado con guion, luego maneja el servidor construido como un cliente MCP real sobre ambos transportes contra una aplicación de prueba local — cubriendo referencias, manejo de referencias obsoletas, diagnósticos, persistencia de sesión entre reconexiones y reclamación de inactividad. npm run test:agent:live además ejercita run_task contra un proveedor real, y se omite a sí mismo cuando no hay clave configurada.

CI ejecuta el typecheck, la compilación y ambas suites en Node 20 y 22 para cada push y pull request. La prueba de agente en vivo se ejecuta por separado — bajo demanda mediante el flujo de trabajo Live agent test, y semanalmente — porque hace llamadas API reales; necesita GOOGLE_GENERATIVE_AI_API_KEY o ANTHROPIC_API_KEY como secreto de repositorio, y la ejecución programada se omite a sí misma cuando no hay ninguna configurada.

Licencia

MIT

Available Tools

26 tools
browser_call_toolCall a page or DevTools toolA

Runs a tool from browser_list_tools against the session's page, with arguments matching its browser_tool_schema. WebMCP tools are code the site supplies: their output is the site's word, and one marked CONSEQUENTIAL can take real actions (orders, payments, messages).

Inputs: name (required), sessionId (required), arguments, timeoutMs.

browser_clickClickA

Clicks an element. Address the element by ref (from the latest browser_snapshot), or by css, or by role+name. Reports any navigation, console errors, or network activity the click triggered.

Inputs: sessionId (required), css, ref, name, +5 more.

browser_closeClose sessionA

Closes a browser session and frees its resources.

Inputs: sessionId (required).

browser_consoleConsole logA

Returns buffered console messages and uncaught page errors (with stacks). Check this whenever the page misbehaves — it usually names the failure directly.

Inputs: sessionId (required), clear, level, limit, +1 more.

browser_evaluateEvaluate JavaScriptA

Runs JavaScript in the page and returns the JSON-serialized result. Accepts a bare expression ("document.title") or a function ("el => el.value"). When an element is targeted, it is bound to el. Use it to read state the accessibility tree does not expose.

Inputs: sessionId (required), expression (required), css, ref, +4 more.

browser_go_backGo backB

Navigates back in history and returns the new page state with fresh refs.

Inputs: sessionId (required).

browser_handle_dialogHandle dialogA

Answers an alert/confirm/prompt. A dialog blocks the page until it is answered, so an unanswered one is dismissed automatically rather than stalling the action that opened it. Call this BEFORE the action that triggers a dialog to arm the answer — that is the only way to accept one or supply prompt() text. Called while a dialog is open, it answers that dialog immediately.

Inputs: accept (required), sessionId (required), promptText.

browser_hoverHoverA

Hovers an element, e.g. to reveal a menu or tooltip. Address the element by ref (from the latest browser_snapshot), or by css, or by role+name.

Inputs: sessionId (required), css, ref, name, +2 more.

browser_inspect_elementInspect elementA
Read-only

DevTools-style inspection of one element: tag, attributes, box model, form state, and computed styles. Use it to diagnose layout and visibility problems.

Inputs: sessionId (required), css, ref, name, +3 more.

browser_listList sessionsA
Read-only

Lists open browser sessions with their current URL, age, and idle time.

Inputs: no named parameters.

browser_list_toolsList page and DevTools toolsA
Read-only

Lists tools beyond this server's own that can run against the session's page, by qualified name: "webmcp." for tools the site itself publishes through WebMCP (read live — they change as the page navigates), and "devtools." for chrome-devtools-mcp's tools (performance traces, Lighthouse, emulation, heap snapshots…), which this server runs for you — no extra MCP server to configure. Follow with browser_tool_schema, then browser_call_tool.

Inputs: sessionId (required), source.

browser_navigateNavigateA

Navigates the session to a URL and returns the new page state plus a fresh snapshot with element refs. Relative URLs resolve against the session baseUrl.

Inputs: url (required), sessionId (required), waitUntil.

browser_networkNetwork logA
Read-only

Lists network requests the session has made, with status, size, and duration. Each line carries an #id for browser_request_detail. WebSockets appear as WS entries with their frame counts. Filter by URL substring or by failure status.

Inputs: sessionId (required), limit, filter, status.

browser_press_keyPress keyB

Presses a key, optionally focused on an element. Key names follow Playwright ("Enter", "Escape", "ArrowDown", "Control+a").

Inputs: key (required), sessionId (required), css, ref, +3 more.

browser_queryQuery elementsA
Read-only

Finds elements by role+name, visible text, or CSS, and returns a compact line per match including its ref and visible/enabled state. Use this instead of a full snapshot when you already know what you are looking for.

Inputs: sessionId (required), css, name, role, +2 more.

browser_read_textRead textA
Read-only

Returns the rendered text of the page or of one element subtree — the readable content without markup. Use it to verify copy, read results, or check an error message.

Inputs: sessionId (required), css, ref, name, +4 more.

browser_request_detailRequest detailA
Read-only

Inspects one request from browser_network: headers, timing breakdown, request body, or response body. Small text responses are cached, so they stay readable after navigation. For a WebSocket entry, any part returns its frame stream.

Inputs: id (required), sessionId (required), part, offset, +1 more.

browser_screenshotScreenshotA
Read-only

Captures a JPEG of the page or an element. Use this only for genuinely visual questions (layout, styling, rendering); browser_snapshot and browser_read_text are faster and cheaper for finding and verifying content.

Inputs: sessionId (required), css, ref, name, +3 more.

browser_scrollScrollA

Scrolls an element into view, or scrolls the page by a pixel delta when no element is given.

Inputs: sessionId (required), dx, dy, css, +4 more.

browser_select_optionSelect optionA

Selects one or more options in a . Address the element by ref (from the latest browser_snapshot), or by css, or by role+name.

Inputs: values (required), sessionId (required), css, ref, +3 more.

browser_snapshotSnapshot pageA
Read-only

Returns the accessibility tree of the page as compact YAML, with a [ref=eN] handle on every element. This is the primary way to see the page — use these refs to click and type. Far cheaper than HTML or screenshots. Scope it with ref/css/role, cap it with depth, or page through it with offset when a page is large.

Inputs: sessionId (required), css, ref, name, +7 more.

browser_startStart browser sessionA

Opens a new browser session and returns its sessionId. The session (cookies, storage, page state) stays alive across tool calls until closed or idle-timed-out, so you can interact with the same page over many turns.

Inputs: tab, url, model, cdpUrl, +7 more.

browser_tool_schemaGet a tool's schemaA
Read-only

Full description and JSON input schema of a tool from browser_list_tools, e.g. "webmcp.search" or "devtools.performance_start_trace".

Inputs: name (required), sessionId (required).

browser_typeType textA

Types text into an input or textarea. Address the element by ref (from the latest browser_snapshot), or by css, or by role+name.

Inputs: text (required), sessionId (required), css, ref, +5 more.

browser_wait_forWait for conditionA

Waits for text to appear, text to disappear, or a selector to become visible. Use after actions that trigger async updates.

Inputs: sessionId (required), text, selector, textGone, +1 more.

run_taskRun UI taskA

Delegates a multi-step UI task to a fast built-in browser agent, which drives the session itself and reports back. Use it for goal-shaped work ("log in as demo@example.com and check the dashboard loads", "walk the checkout flow and report anything broken") rather than driving each click yourself.

Returns a structured report: a success flag, a summary, and findings — each with a severity, what is wrong, where, and the evidence observed. Findings come from two places: what the agent noticed, and what the harness itself recorded (console errors, failed requests, dialogs), so problems are reported even when the agent does not mention them or runs out of steps. The session is left on whatever page the agent ended on, so you can inspect it further with the browser_* tools.

Inputs: sessionId (required), instruction (required), model, maxSteps, +1 more. Returns: model, steps, success, summary, +6 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 26 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes: interaction (click/type/hover/press_key/select_option), navigation, and session management are unambiguous. The main soft overlap is among the page-reading tools (browser_snapshot, browser_query, browser_read_text, browser_inspect_element, browser_screenshot), but the descriptions explicitly explain when to prefer each, so misselection risk is low.

    Naming Consistency4/5

    Nearly all tools use a browser_ prefix with snake_case, which is highly predictable. Slight deviation: some are verb-first (browser_navigate, browser_click) while others are noun-first (browser_console, browser_network, browser_snapshot), and run_task drops the prefix, but the style is coherent overall.

    Tool Count3/5

    At 26 tools the surface is on the heavy side, but browser automation is a genuinely broad domain spanning sessions, interaction, inspection, network, dialogs, and delegation. Few tools feel redundant, though the count is borderline rather than tightly scoped.

    Completeness5/5

    The surface covers the full automation lifecycle: session start/list/close, navigation and history, element interaction, form filling, dialog handling, waiting, accessibility/text/visual inspection, JS evaluation, console and network diagnostics, plus a meta-tool layer and a delegated run_task agent. No obvious dead ends for typical UI testing.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI agents to browse and interact with web pages through a persistent headless Chromium session, serving compact structured orientations, targeted element queries, and full detail only when explicitly requested. It supports navigation, observation, form filling, monitoring, and session management while cutting token overhead by up to ~140x versus raw accessibility-tree dumps.
      4 npm
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to browse and interact with websites through a persistent headless Chromium session, returning compact structured page representations instead of full accessibility-tree dumps. Agents can navigate, query specific elements and forms, click, type, manage tabs and cookies, and monitor console or network activity while paying a fraction of the tokens.
      4 npm
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to browse and interact with web pages through a token-efficient, structured page representation — orientation summaries, targeted element queries, and full detail only on request — instead of raw accessibility-tree dumps. Supports navigation, interaction, forms, screenshots, console and network monitoring, session/tab management, and browser-based development auditing.
      4 npm
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to browse and interact with web pages through a persistent headless Chromium session, returning compact structured page summaries, targeted element queries, and full detail only on request. This keeps token usage far below full accessibility-tree snapshots while still supporting navigation, forms, screenshots, and session control.
      4 npm
      -