auto-qa
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Auto-QA: Zero-Token Playwright QA Engine & MCP Server for AI Agents
If you have ever asked Claude Code, Google Antigravity, or Cursor to run end-to-end QA on your web app, you already know the two ways it goes wrong:
The "Blind Selector Guess" Loop: The agent reads your React/Next.js source files, guesses what the rendered DOM looks like, writes a
.spec.tsfile, and hitsTimeoutError: locator('button.submit-btn') not foundfive times in a row because of client hydration, portals, or CSS modules.The Turn-by-Turn Browser Loop (Chrome DevTools MCP, Puppeteer MCP, Stagehand, Browser-Use): The agent opens a live browser and takes a DOM snapshot or screenshot after every single click. By step 12, it has burned 35,000+ context tokens, taken 90 seconds of round-trip LLM latency, and forced your coding session into
/compact—only to spend another $0.85 in tokens the next time you re-run the exact same test.
Auto-QA fixes this by splitting Test Planning (1 LLM turn) from Test Execution (0 LLM turns, 100% local Node.js + Playwright).
Why Turn-by-Turn Browser Agents Break in Production
Metric / Architecture | Turn-by-Turn Browser MCP ( | Blind Source-to-Test Authoring | Auto-QA ( |
LLM Round-Trip Turns | 15 – 30 turns per user flow | 4 – 8 retry turns fixing broken selectors | 2 – 3 turns total (Discover → Plan → Run) |
Context Window Burn | 15,000 – 40,000 tokens (raw DOM dumps) | 5,000 – 12,000 tokens (stack traces) | ~1,200 tokens (sanitized W3C accessibility map) |
Execution Speed (14 steps) | 60 – 120 seconds | Fails on dynamic modals / sticky navs | ~10.3 seconds (local headless Chromium) |
Replay / Regression Cost | $0.55 – $1.20 per run in API tokens | $0.00 (once manually fixed) | $0.00 forever (0 LLM calls during execution) |
| Often missed by | Fails when backdrop overlaps buttons | Scoped modal isolation + |
CI/CD Output | Locked to live agent runtime |
| Compiles to native |
Related MCP server: Playwright MCP Quickstart
How Auto-QA Works (The 3 Atomic Stages)
flowchart LR
S1["1. Discover Surface (discover.js -> ~1.2k tokens)"] --> S2["2. Author Intent Plan (Declarative plan.json)"]
S2 --> S3["3. Execute, Heal & Compile (executor.js -> .spec.ts)"]Stage 1: Black-Box Surface Discovery (scripts/discover.js)
Instead of dumping raw HTML, Auto-QA launches headless Chromium, waits for hydration, and extracts interactive elements (button, input, textarea, select, a[href], [role="dialog"]) alongside Playwright's native W3C accessibility tree (page.accessibility.snapshot()).
Sticky Header & Modal Fix: Standard crawlers check
el.offsetParent !== null, which returnsnullforposition: fixedsticky navbars and modal overlays in the CSSOM. Auto-QA computes real viewport geometry viagetBoundingClientRect()andwindow.getComputedStyle(el).Output:
cli.js discoversaves the full JSON surface (elements+modals+accessibilityTree), whileauto_qa_generate_code_summaryin MCP mode writes a compactcode_summary.yaml(buttons,inputs, andlinks).
Stage 2: Declarative Intent Plan (plan.json)
Your coding agent reads the ~1,200-token discovery map and authors a declarative JSON test plan conforming to references/plan-schema.json—either by writing auto_qa_tests/auto_qa_frontend_test_plan.json directly in Skill CLI mode, or by calling auto_qa_generate_frontend_test_plan in MCP mode:
{
"projectId": "sprintdesk-e2e",
"type": "frontend",
"name": "SprintDesk Login & Task Creation Flow",
"targetUrl": "http://localhost:3000",
"priority": "p0",
"planSteps": [
{ "type": "assertion", "description": "Assert that \"SprintDesk\" is visible" },
{ "type": "action", "description": "Click \"Sign In\"" },
{ "type": "action", "description": "Type \"qa-tester@example.com\" into \"Email\"" },
{ "type": "action", "description": "Type \"TestPass123!\" into \"Password\"" },
{ "type": "action", "description": "Click \"Sign In\"" },
{ "type": "assertion", "description": "Assert that \"Logged in: qa-tester@example.com\" is visible" },
{ "type": "action", "description": "Type \"Verify zero-token replay\" into \"What needs testing?\"" },
{ "type": "action", "description": "Click \"Add Task\"" },
{ "type": "assertion", "description": "Assert that \"Verify zero-token replay\" is visible" }
]
}Stage 3: Self-Healing Execution (scripts/executor.js) & Native Compiler (scripts/compiler.js)
When executing a step like Type "qa-tester@example.com" into "Email", executor.js resolves the target locally without calling an LLM:
Direct Selector Passthrough: Immediately resolves explicit
#id,.class, or[attr]selectors if provided.Active Modal Isolation: Detects open
[role="dialog"]:not(.hidden),.modal:not(.hidden), or[aria-modal="true"]:not(.hidden)containers and scopes element lookup inside the active modal before falling back to the page root.Action-Specific Semantic Chains:
For
fill/type:<label>(getByLabel) →placeholder(getByPlaceholder) → ARIAtextboxrole (getByRole) → attribute substring (input[name*="..." i], textarea[name*="..." i],id*="...",type="...").For
click,select, andcheck: Resolves via ARIAbutton/link/combobox/checkboxroles,aria-label, and exact-then-fuzzy text matching.
Native Playwright
.spec.tsExport: Once the flow passes,compiler.jscompilesplan.jsoninto a clean@playwright/testTypeScript file using chained.or()locators and nestedtest.step()blocks that runs in GitHub Actions with zero dependencies on Auto-QA.
Quick Start (60 Seconds)
git clone https://github.com/yashh1323/auto-qa.git
cd auto-qa
npm install
npx playwright install chromium
# Verify runtime, Chromium binary, MCP server, and compiler health
npm run doctor
# Run the 6-unit security & hygiene test suite
npm testDual-Mode Integration: Agent Skill CLI + Stdio MCP Server
Auto-QA runs in two modes. When you prompt your agent (e.g., "Use Auto-QA to test the login and checkout flow on http://localhost:3000 and export a Playwright spec"), SKILL.md instructs the agent to check its declared tools: if auto_qa_* MCP tools are registered, it uses MCP Mode; otherwise, it falls back to Skill CLI Mode via terminal commands.
Option 1: Standalone Agent Skill / CLI Mode (Zero Config)
Install as an agent skill in Google Antigravity / Gemini CLI by cloning into your skills folder and installing dependencies (the agent automatically reads SKILL.md to invoke scripts/cli.js):
git clone https://github.com/yashh1323/auto-qa.git ~/.gemini/config/skills/auto-qa
cd ~/.gemini/config/skills/auto-qa && npm install && npx playwright install chromium(For Claude Code or Cursor, either copy SKILL.md into your project's .claude/skills/ / .cursor/rules/ or use Option 2: MCP Server Mode below).
Or run any subcommand (discover, run, compile, bootstrap, doctor, mcp) directly from your terminal:
# 1. Compile an example plan into native @playwright/test TypeScript (.spec.ts) — works offline immediately
node scripts/cli.js compile examples/client-login-checkout.json -o tests/e2e/checkout.spec.ts
# 2. Crawl any live URL (or your local dev server) into a compact JSON surface map
node scripts/cli.js discover https://example.com -o auto_qa_tests/tmp/surface.json
# 3. Execute an intent test plan against a running target URL (add --no-headless to watch live)
node scripts/cli.js run examples/client-login-checkout.json -u http://localhost:3000Option 2: Model Context Protocol (MCP) Server Mode
Auto-QA includes a dependency-free JSON-RPC 2.0 stdio MCP server (scripts/mcp-server.js) exposing 7 structured tools.
Claude Code
claude mcp add auto-qa node "/absolute/path/to/auto-qa/scripts/mcp-server.js"Cursor / Windsurf / Antigravity (mcp.json)
{
"mcpServers": {
"auto-qa": {
"command": "node",
"args": ["/absolute/path/to/auto-qa/scripts/mcp-server.js"]
}
}
}Exposed MCP Tools
Tool Name | Purpose |
| Initializes |
| Crawls live URL and writes sanitized interactive |
| Generates a TestSprite-schema-compatible PRD scaffold ( |
| Saves declarative frontend test steps ( |
| Saves a TestSprite-schema-compatible backend endpoint assertion manifest ( |
| Executes frontend |
| Compiles |
Note: All MCP artifacts (code_summary.yaml, standard_prd.json, auto_qa_frontend_test_plan.json, failure screenshots, and auto-qa-test-report.md) are written inside <projectPath>/auto_qa_tests/.
Supported Intent Grammar
Intent matching in executor.js and compiler.js is case-insensitive and accepts either single quotes ('...') or escaped double quotes (\"...\") around target labels and values:
Intent Type | Plain-English Syntax Examples |
Navigation |
|
Text Input ( |
|
Clicks & Triggers |
|
Dropdowns ( |
|
Checkboxes |
|
Positive Visibility Assertions |
|
Negative Visibility Assertions |
|
Text Substring Assertions |
|
URL Assertions |
|
Security & Hardening Architecture
Because QA automation tools bridge untrusted web DOMs, LLM inputs, and the local filesystem, Auto-QA enforces six security controls verified by AU-01 – AU-06 in tests/security_audit_runner.mjs:
Parameterized Code Generation (
AU-01):compiler.jsserializes all user strings viaJSON.stringify()and constructs regexes vianew RegExp(...)with escaped forward slashes and metacharacters, preventing template or code injection in generated.spec.tsfiles.MCP Workspace Path Confinement (
AU-02):assertInsideDirectory()inmcp-server.jsblocks relative (../../), absolute (/etc/passwd,C:\Windows\...), and cross-drive path traversal on MCP plan execution and compilation output paths.Protocol Scheme Allowlisting (
AU-03):assertValidHttpUrl()restricts browser navigation strictly tohttp:andhttps:, blockingfile:///,javascript:,data:, and Windows UNC (\\) SMB paths.YAML & Prompt Injection Sanitization (
AU-04): Scraped DOM labels are JSON-encoded and length-capped (150 chars) before writingcode_summary.yaml.CSS Attribute & Regex Escaping (
AU-05): Double quotes, backslashes, and newlines in target names are sanitized viaescapeCssString()andescapeRegex()before building selectors.PII Hygiene & Process Cleanup (
AU-06):executor.jsanddiscover.jsauto-dismiss synchronousalert()/confirm()/beforeunloaddialogs, block background Service Workers (serviceWorkers: 'block'), and guaranteebrowser.close()inside top-leveltry / finallyblocks.
When NOT to Use Auto-QA
WebGL / HTML5
<canvas>Applications: If your UI renders entirely inside a single<canvas>element (e.g., Three.js games, Figma-like vector editors) without DOM nodes or W3C accessibility labels, semantic locators cannot see inside the canvas. Use a coordinate-based vision model instead.Unstructured Chaos Fuzzing: If you have no target user story and want an agent to randomly click around an unfamiliar site to see what breaks, an interactive turn-by-turn browser loop is a better fit than a declarative plan runner.
Repository Layout
auto-qa/
├── scripts/
│ ├── cli.js # Unified CLI (mcp, discover, run, compile, bootstrap, doctor)
│ ├── mcp-server.js # Zero-dependency JSON-RPC 2.0 stdio MCP server (7 tools)
│ ├── discover.js # Headless Chromium DOM + W3C accessibility surface crawler
│ ├── executor.js # Self-healing intent runner + active modal isolation
│ └── compiler.js # Declarative plan.json -> native @playwright/test .spec.ts compiler
├── tests/
│ └── security_audit_runner.mjs # 6-unit automated security & PII hygiene test suite
├── examples/
│ ├── client-lead-gen.json # Sample B2B lead funnel test plan
│ └── client-login-checkout.json # Sample e-commerce cart & checkout test plan
├── references/
│ ├── blackbox-testing-guide.md # Pre-flight credential & 4-step black-box QA guide
│ └── plan-schema.json # JSON Schema Draft-07 specification for test plans
├── SKILL.md # Dual-mode operational instructions for AI coding agents
├── package.json
└── LICENSE # MITLicense
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Browser-based QA for AI-built software. Test pages with real browsers via agents.
Write, run and check natural-language browser tests of your web app from your AI assistant.
Hosted browser for AI agents: screenshots, post-JS DOM, console, WCAG. No install, no API key.
AI agents use your app like your users, in real browsers, and report what is broken or confusing.
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceEnables AI to perform real-browser QA testing on websites via Playwright, finding bugs, accessibility, SEO, and performance issues through natural language conversations.1MIT- AlicenseNot gradedqualityDmaintenanceEnables AI agents to control a local browser via Playwright's accessibility tree, allowing automated web interactions and testing through natural language commands.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to autonomously interact with and test web applications in a real browser, providing DOM/Accessibility tree extraction, runtime telemetry, screenshot capture, and Markdown test reports.30 npm1MIT

QualityMax QA MCPofficial
AlicenseAqualityAmaintenanceEnables coding agents to independently verify web changes by scanning pages, inspecting UI structure, generating Playwright reproductions, and executing tests with structured QA evidence.4130 npm4MIT