super-tester

communication MCP Server

Browser companion plugin for AI coding assistants — Chrome automation MCP, in-page hint messaging, and persistent project memory across Claude Code sessions.

VerifiedInstall Ready
communicationcommunication
10 views3 stars1 forksv0.1.0MIT

Why This Matters

Discovered via github-topic:model-context-protocol and last synced 3mo ago.

VerifiedInstall Ready
Source
github-topic:model-context-protocol
Stars
3
Last synced
3mo ago
Install
Instructions detected

Install

1. Install the package

npm install super-tester
65
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (65)

browser_upload_file

Attach a file to a page target via a strategy chain: `direct` (`DOM.setFileInputFiles`) → `intercept` (file-chooser dialog) → `drop` (synthesized `DataTransfer` + `DragEvent`) → `paste` (synthesized `ClipboardEvent`). Bypasses the native OS file picker entirely. Target by `selector`, `ref`, `trigger`, or `auto: { near }`. Smart-wait confirms upload (preview thumbnail / 2xx upload response / custom `successSelector`).

browser_wait_for_response

Block until a matching network response arrives (`urlGlob`/`urlContains`, `method`, `statusGte`/`statusLt`, `timeoutMs`). Proves a write actually persisted instead of guessing from the UI.

browser_playbook_save

Create/update a playbook (validates frontmatter and required sections).

browser_request_attention

Post an OS notification asking the human to look (captcha, choice, or "done — come look"). Click focuses the window.

browser_assert_no_errors

One-call health gate: `ok=false` if **any** console error/uncaught exception **or** any `>=400`/failed request happened since the page loaded (`sinceNavigation` default, or `sinceMs`, with `ignoreUrlContains`). Failed-request entries include `.body`.

browser_click

Click by selector (CDP). Pass `intent` to **cache** the selector for next time.

browser_page_assets

Hash the live page assets (`script`/`css`/`document`) with sha256 + a `pageHash`. Confirm the **live bundle hash == the built hash** so you never test a stale cached deploy.

browser_playbook_delete

Remove a playbook + workflow + screenshots.

browser_playbook_dashboard

Generate a self-contained HTML dashboard from the library; opens in the active browser session.

browser_audit_interactives

Enumerate every actionable control on the page (`scope:"all"\

browser_playbook_seed_from_codebase

Static-analyze the project's frontend (Next.js / Vite / CRA) and emit draft playbooks per route + form. Solves cold-start on in-house apps.

browser_upload_stage

Stage a file into the per-project library at `.continuum/uploads/`. Accepts `path`, https `url`, `dataUrl`, or `base64`. Returns a stable `stashId` (sha256-based, idempotent) reusable across many uploads.

browser_playbook_propose_update

Given a successful trace, create or update the matching playbook. Inputs and steps auto-inferred.

browser_playbook_run

Replay a playbook (with self-heal) using provided inputs; recursively executes `composes`/`next` chains; returns verdict + evidence.

browser_act_and_observe

Perform one action (`click`/`type`/`navigate`/`press_key`/`click_at`) and classify the result: `WORKS` / `NO-OP` / `ERROR` / `NAVIGATES`. A `NO-OP` (clickable but nothing changed) is a **dead control = defect**. Returns `urlChanged`, `domChanged`, `networkDelta`, `consoleDelta`.

browser_playbook_list

List playbooks under `.continuum/playbooks/`, filter by origin/tag/verifiable.

browser_playbook_diff_accept

Bless a run's per-step screenshots as the new visual reference; bumps `playbook_version`.

browser_set_storage

Deterministic auth/state seeding — set `localStorage`, `sessionStorage`, and `cookies` (or `clear`) in one call so a flow starts from a known logged-in state.

browser_playbook_get

Return one playbook with meta + body sections + workflow JSON.

browser_playbook_match

Score-match playbooks against a URL, intent, or task description.

show

run

browser_playbook_secret_check

Validate that a playbook's `type: secret` inputs are resolvable (env or `.continuum/secrets/`). Returns availability only — never values.

browser_playbook_export

Export one or more playbooks to a single JSON bundle file. Includes embedded base64 screenshots.

browser_playbook_import

Import a playbook bundle (file / inline JSON / https URL). Supports `overwrite` + `rewriteOrigin` (e.g., staging → production).

Directory

What it is

browser_type

Focus + clear + insertText. Pass `intent` to cache.

browser_clear_emulation

`emulate_viewport` is preferred for layout/responsive testing — it's deterministic, doesn't disturb anything else, matches Chrome DevTools' Device Mode, and actually changes what the page's JavaScript sees. `window_resize` is for when you genuinely need real OS-level window dimensions. ### Exhaustive QA coverage mode Beyond one-off checks, Mochi can run an **exhaustive QA pass** (`/qa exhaustive`) that enumerates every actionable control with `browser_audit_interactives`, drives each one through `browser_act_and_observe`, gates every page and action with `browser_assert_no_errors`, and assigns one of five verdicts to each control: **WORKS**, **NO-OP** (defect), **ERROR** (defect), **NAVIGATES**, or **DISABLED**. Results are recorded in a **verification ledger** with provenance stamping, and a built-in **honesty gate** refuses to report a run as "pass" while any control is still UNTESTED/UNCERTAIN — the rule is never "everything works" but *"N of M controls verified — here is each result, and here is what I could NOT verify and why."* Hard-won tooling quirks live in a persistent [tooling-gotchas note](skills/browser/references/gotchas.md) so they're never re-learned. ## Memory model Two layers, stored as plain JSON files under `<project>/.continuum/` (no database, no native bindings). ### 1) Selector cache — keyed by `(origin, intent)` Every `browser_click` / `browser_type` call may carry an **intent** ("click sign in button", "email field"). On success, the resolved selector is cached at `(origin, intent)`. The agent can short-circuit discovery by calling `browser_recall_selector` before snapshotting: ``` browser_recall_selector {intent:"click sign in button"} → {found:true, selector:'button[aria-label="Sign in"]', last_box:{...}} browser_click {ref:'button[aria-label="Sign in"]', intent:"click sign in button"} ``` The cache survives Chrome restarts, project reloads, server restarts. ### 2) Workflows — keyed by `(origin, name)` Every successful action inside a session is appended to an in-memory **trace**. `browser_workflow_save {name:"login"}` persists the trace as an ordered list of steps. `browser_workflow_run {name:"login"}` replays them. Replay strategy per step: 1. Try the step's stored selector. If it resolves → click. 2. Else: try other entries from the selector cache for the same `intent`. 3. Else: **self-heal** by ARIA role + name from a fresh snapshot. If found, update both the step record AND the selector cache, continue. 4. Else: return a rich failure envelope (tried selectors, role/name, screenshot, suggestion) so the agent can recover. The agent doesn't need to think about caching — just pass `intent`. Workflows build themselves out of normal exploration and replay deterministically next time. ### Step-by-step feedback contract Every replayed step returns: ```json { "step": 2, "action": "click", "intent": "click sign in button", "status": "pass", // pass

browser_workflow_save

Persist current session's auto-traced actions as a named workflow.

SUPER_TESTER_AUTO_LAUNCH

`true`

browser_list_tabs

List session tabs + CDP attachment state.

browser_window_resize

Resize/move/maximize the actual window (only safe with `newWindow`).

browser_list_selectors

Inspect the cache.

Default

Purpose

SUPER_TESTER_PROJECT_DIR

`process.cwd()`

Tool

What it does

browser_text

Compact visible text lines, optionally filtered by query. Use before snapshot for reading/searching content.

browser_press_key

Real keyboard event (CDP).

browser_workflow_run

Replay. Cached selector → self-heal by role+name → screenshot on miss.

SUPER_TESTER_CHROME_PATH

platform-detected

browser_session_start

New tab group + primary tab. Pass `newWindow:true` to spawn a fresh window. Posts a click-to-focus notification instead of stealing focus.

browser_session_end

Detach debugger, ungroup or close session tabs.

browser_navigate

Navigate primary tab, wait for load.

browser_open_tab

Open new tab inside the session group.

browser_close_tab

Close a specific session tab.

browser_links

Compact visible links with text, href, selector ref, and box.

browser_snapshot

ARIA tree with stable refs + pixel boxes. Defaults to compact, viewport-only, redacted, depth-limited, and 12KB capped.

browser_snapshot_query

Search the stored snapshot by text/name/role/ref/tag and return tiny excerpts.

browser_snapshot_node

Return one compact subtree from the stored snapshot by ref, text, or query path.

browser_click_at

Click at pixel coords (CDP).

browser_scroll

Absolute `{x,y}` or relative `{deltaX,deltaY}`.

browser_wait

Sleep up to 60s.

browser_screenshot

PNG/JPEG (viewport / fullPage / elementRef).

browser_emulate_viewport

Device Mode via CDP. Presets + custom width/height/DPR/UA.

browser_assert

Verify `url-contains`, `url-equals`, `title-contains`, `element-exists`, `element-missing`, `text-contains`, `text-equals`. Returns `{ok, got}`.

browser_recall_selector

"Do I already know how to find X on this site?" Returns cached selector or null.

browser_forget_selector

Drop a cached entry.

browser_run_history

Last N runs of a workflow.

Goal

Tool

selector_cache

self_healed "durationMs": 12 } ``` Failures additionally include `tried`, `role`, `name`, `screenshotDataUrl`, and a `suggestion`. ### Typical agent flow **First time** ("test the login flow"): ``` browser_session_start browser_navigate {url:"https://staging.myapp.com/login"} browser_recall_selector {intent:"email field"} → not found browser_snapshot browser_type {ref:"input[name=email]", text:"…", intent:"email field"} browser_recall_selector {intent:"click sign in"} → not found browser_click {ref:"button.signin", intent:"click sign in"} browser_assert {kind:"url-contains", value:"/dashboard"} browser_workflow_save {name:"login"} ``` **Next time** ("retest login"): ``` browser_session_start browser_workflow_run {name:"login", origin:"https://staging.myapp.com"} → {status:"pass", stepsTotal:5, stepsPassed:5, results:[…]} ``` If the UI was refactored, the run still passes — the engine self-heals and updates the cache. If it can't find the element at all, the agent gets a screenshot and a suggestion, and falls back to snapshot + AI discovery. ### Portability Workflows are portable JSON. Commit them alongside your app: ```bash # in agent flow: browser_workflow_export {name:"login"} # returns JSON payload # write to repo: tests/super-tester/login.json # later, on a fresh machine: browser_workflow_import {payload: <json>} ``` ## Concurrent Claude sessions You can run **multiple Claude Code sessions at once**, each with its own super-tester scope. The first MCP server to start binds port 9009 and becomes the **broker**; subsequent MCP servers detect the conflict and connect to the broker as **clients**, forwarding their browser commands through it. Each Claude session gets its own `clientId`, and the extension keeps a separate tab group per client. Sessions are fully isolated — Session A's clicks/navigates never touch Session B's tabs. ``` Claude session 1 ──stdio──► MCP-A ─────► (broker, owns port 9009 + extension WS) └──┐ Claude session 2 ──stdio──► MCP-B ─────► (client → forwards via MCP-A) └──┐ Claude session 3 ──stdio──► MCP-C ─────► (client → forwards via MCP-A) Extension holds Map<clientId, Session> — one tab group per Claude session. ``` The selector cache and workflow store are shared across sessions (per-origin, in `.continuum/`), so a workflow recorded in Session A can be replayed from Session B without re-learning anything. ## Claude Code shortcuts After installing the `mochi` plugin (see [Install](#install-one-plugin-one-extension-done) above), the `browser` MCP server runs automatically. No `claude mcp add-json` needed. After restarting Claude Code, use: ```text /browser test localhost:3000 use browser to verify the login flow use the browser MCP and check console errors ``` The MCP tools are named `browser_session_start`, `browser_navigate`, `browser_snapshot`, `browser_click`, `browser_screenshot`, `browser_console_messages`, `browser_network_requests`, and related `browser_*` tools. If the broker process dies (for example, the first Claude Code session exits), the remaining MCP clients automatically race to recover. One client promotes itself to the new broker, the extension reconnects to it, and clients request their previous `clientId` so existing tab groups remain attached to the right Claude session. New Claude sessions can then connect to the recovered broker. Commands from the same client are serialized inside the extension to prevent same-session races such as `session_start` overlapping `navigate` or `session_end`. Different client sessions still run in parallel, each scoped to its own tab group. ## Boundary guarantees - **Spawned tabs** (target=_blank, `window.open`, etc.) are auto-grouped into the session group via `chrome.tabs.onCreated`. - **Drag a tab out of the group** → it's released from the session, no longer touched. - **All operations validate** that the target tab is still in the session group. If you ungroup or close the group, the next tool call fails cleanly. - **Other Chrome windows / tabs / groups** are never queried, never modified. - **Per-client isolation:** every operation is scoped to the originating Claude session's tab group. Cross-session reads/writes are impossible at the protocol level. - **Service-worker restart recovery:** session metadata is persisted in `chrome.storage.local` and restored against live tab groups when the extension wakes back up. ## Environment variables

SUPER_TESTER_WS_PORT

`9009`

SUPER_TESTER_EXTENSION_PATH

unset

SUPER_TESTER_PROFILE_DIR

`~/.super-tester/super-tester-profile`

SUPER_TESTER_EXTENSION_WAIT_MS

`20000`

SUPER_TESTER_DATA_DIR

`<project>/.continuum/`

Symptom

Likely cause / fix