ghost-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.
π» ghost-qa
Autonomous headless browser QA & self-healing verification loop for coding agents. v2.0.0 β the 8-Trap Deep Browser Inspection Engine: 3 viewports Γ light/dark, QA Health Score (A+β¦F), interactive HTML dashboard, and regression diffing.
Coding agents (Claude Code, Codex, Cursor, Windsurf) write code blind β then declare victory while the actual browser has React hydration errors, broken buttons, 500ing APIs, or mobile layout overflow.
ghost-qa fixes that. One command launches a headless browser against your running app, crawls the live DOM, safely pokes every button, traps runtime/network/layout failures, and hands the agent a structured Self-Healing Bug Report so it fixes its own bugs before telling you it's done.
npx -y ghost-qa test http://localhost:3000No test scripts. No config. No mercy for "it works on my machine".
Prefer running straight from GitHub instead of npm?
npx -y github:avivgerz-hue/ghost-qa test http://localhost:3000works identically β every command in this README accepts either package source (ghost-qa mcp,ghost-qa init, β¦).
β‘ Quickstart
# 1. Start your app as usual
npm run dev # β http://localhost:3000
# 2. Verify it in a real browser (one-time: downloads Chromium)
npx playwright install chromium
npx -y ghost-qa test http://localhost:3000
# 3. Teach your coding agent to do this automatically, forever
npx -y ghost-qa initghost-qa init installs .claude/skills/ghost-qa/SKILL.md and appends the strict "Verify in Browser Before Done" protocol to CLAUDE.md, AGENTS.md, and .cursorrules. From then on, your agent runs ghost-qa itself, fixes what it finds, and only reports completion on a PASS.
Related MCP server: test-genie-mcp
π The Autonomous Self-Healing QA Loop
ββββββββββββββββββββββββββββββββββββββββββββ
β CODING AGENT β
β Claude Code Β· Codex Β· Cursor Β· Windsurf β
βββββ¬βββββββββββββββββββββββββββββββ²ββββββββ
writes code β β Self-Healing
βΌ β Bug Report
βββββββββββββββββ βββββββββββ΄βββββββββββ
β DEV SERVER β β AGENT DIAGNOSTIC β
β localhost:3000 β β verdict Β· #ids Β· β
βββββββββ¬ββββββββ β fix playbook β
β serves live DOM βββββββββββ²βββββββββββ
βΌ β Markdown / JSON
ββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββ
β π» ghost-qa β
β β
β Route Crawler βββΊ Interaction Runner β
β β β β
β βΌ βΌ β
β βββββββββββ ββββββββββββ βββββββββββ β
β β CONSOLE β β NETWORK β β LAYOUT β β
β β A11Y β β PERF β β 8 TRAPS β β
β β TRAP β β TRAP β β TRAP β β
β βββββββββββ ββββββββββββ βββββββββββ β
β Desktop 1440Γ900 Β· Tablet 768Γ1024 Β· Mobile 375Γ812 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
fix bugs ββββββββ re-run until β PASSThe agent writes code and starts the dev server.
ghost-qa testcrawls every internal route on Desktop 1440Γ900, Tablet 768Γ1024 and Mobile 375Γ812, in light + dark colour schemes, exercising interactive controls.Eight traps capture everything the browser actually experienced, scored into a deterministic QA Health Score (0β100, Grade A+β¦F).
Failures return as a token-efficient diagnostic (
GHOST-QA-REPORT.md+PATCH-PROMPT.mdwith exact selectors); the agent fixes root causes and re-runs.ghost-qa compare before.json after.jsonproves the fix: the loop ends only at score 95β100 (A+), zero critical/major remaining, and zero new regressions.
πͺ€ The 8-Trap Deep Browser Inspection Engine (v2.0.0)
1. Console & Framework Runtime Trap β src/traps/console-trap.ts
Uncaught
pageerrorexceptions with stack tracesUnhandled promise rejections
React hydration mismatches ("Text content did not match", "A tree hydrated butβ¦")
Duplicate-key warnings and Content-Security-Policy violations (new in v2)
console.error(major) andconsole.warning(minor) β with dev-server noise ([vite], HMR, React DevTools banners) filtered out
2. Network & Asset Integrity Trap β src/traps/network-trap.ts
HTTP
5xxAPI crashes (critical) and4xxresponses (major)Failed
fetch/XHRrequests, timed-out requests, and connection failuresCORS-blocked requests and failed CORS preflights with remediation guidance
Broken static assets, broken images (
naturalWidth === 0), broken inline SVGs (0Γ0), >500KB unoptimized payloads, and missing favicons (minor)
3. Layout, Responsive Geometry & Collision Trap β src/traps/layout-trap.ts
Horizontal overflow:
scrollWidth > innerWidth, with the offending elements named (critical on mobile)Overlapping interactive elements via bounding-box collision math, with exact selectors + boxes (new in v2)
Touch targets < 44Γ44px on touch viewports (WCAG 2.5.5 / Apple HIG), clipped text, and off-screen interactives (new in v2)
Zero-dimension interactive elements β buttons rendered at 0Γ0 that no human could tap
Missing
<meta name="viewport">on mobile
4. Accessibility (WCAG 2.1 AA) & Keyboard Focus Trap β src/traps/a11y-trap.ts
Buttons and links with no accessible name (icon-only controls screen readers can't identify)
Images missing
altattributes (descriptive alt, oralt=""for decorative)Form inputs with no associated label β a placeholder is not a label
Real computed contrast ratios (
getComputedStyleforeground vs effective background, WCAG formula) (new in v2)Heading hierarchy (missing
<h1>, h1βh3 skips) and automated Tab-order verification β simulated Tab presses catch invisible or dead focus states (new in v2)Missing document
<title>and missing<html lang>
5. Performance & Core Web Vitals Trap β src/traps/perf-trap.ts
Core Web Vitals: TTFB, FCP, LCP estimation, and CLS (Cumulative Layout Shift) (new in v2)
Slow page loads via Navigation Timing (DOMContentLoaded / load budgets, 2Γ = critical)
Oversized resources (> 1MB single asset), unoptimized >500KB images/scripts, and excessive total payload (> 3MB)
Main-thread jank / layout-thrashing indicators from the Long Tasks API
Render-blocking
<head>resources, excessive DOM size (>1500 nodes) and DOM depth > 32
6. Safe Interactive & Link Integrity Trap β src/traps/links-trap.ts (new in v2)
Placeholder links (
href="",href="#",javascript:void(0)) and dead anchors/routes found during crawlingButtons inside
<form>with notype(they silently become submit buttons)Disabled/stuck interactive controls β all observational, this trap never clicks anything
7. SEO, Metadata & Social Graph Trap β src/traps/seo-trap.ts (new in v2)
<title>(missing, <10 or >60 chars), meta description,<html lang>, viewport meta, canonical tagOpenGraph set (
og:title,og:description,og:image) for link unfurlsDuplicate
idattributes in the live, post-hydration DOM
8. Dark / Light Theme Emulation Trap β src/traps/theme-trap.ts (new in v2)
Every page also renders under
colorScheme: 'dark'and'light'emulationComputed contrast is re-evaluated per scheme β invisible dark-mode text (dark-on-dark) is caught automatically and tagged with the failing scheme
Plus a safety-first Interaction Runner: it fills forms with inert data (ghost-qa@example.com), opens tabs/modals/menus, and clicks ordinary buttons β but never destructive ones (delete, checkout, pay, logout, publishβ¦ are blocked by a tested safety gate).
π QA Health Score, Artifacts & Interactive Dashboard (new in v2)
Every run computes a deterministic QA Health Score (0β100) and Letter Grade (A+ β¦ F): each trap starts at 100 and loses 25 per critical, 10 per major, 3 per minor finding; the overall score is the mean of the eight trap sub-scores (Console, Network, Layout, A11y, Performance, Links/UX, SEO/DOM, Theme Parity).
npx -y ghost-qa test http://localhost:3000 --out-dir ghost-qa-out --screenshotsArtifact | Contents |
| Complete machine-readable telemetry: per-trap scores, viewport matrices, exact DOM selectors ( |
| Human + agent Self-Healing Bug Report with root-cause analysis and the fix playbook |
| Copy-paste remediation prompt: every finding with selector, bounding box, parent-component hints and the compare loop |
| Self-contained, zero-dependency, dark-mode interactive QA Dashboard: Grade hero (A+β¦F), 8-Trap Scorecard, Route & Viewport Matrix, filterable findings (severity/trap/viewport), embedded screenshots when captured |
π Regression Diffing β ghost-qa compare / ghost_qa_compare (new in v2)
npx -y ghost-qa test http://localhost:3000 --json > before.json # baseline
# β¦agent fixes the bugsβ¦
npx -y ghost-qa test http://localhost:3000 --json > after.json # re-audit
npx -y ghost-qa compare before.json after.json # Regression & Verification Delta ReportThe delta matches findings by stable fingerprint id and reports scoreDelta, fixedFindings, newRegressions, remainingFindings β so a coding agent can prove its fix resolved the bug without introducing regressions. verified requires score β₯ 95, zero regressions and no blocking findings left. Also available as the ghost_qa_compare MCP tool.
π Native MCP Server
ghost-qa ships a zero-dependency Model Context Protocol server (JSON-RPC 2.0 over stdio), so MCP hosts can invoke browser verification as a native tool instead of shelling out:
npx -y ghost-qa mcpMCP tool | What it does |
| Runs the full 8-trap deep inspection (3 viewports Γ light/dark) and returns the Self-Healing Bug Report + QA Health Score (structured content includes the full report for baselining) |
| (new in v2) Diffs two report JSONs into the Regression & Verification Delta Report ( |
| Verifies Node, Chromium availability, and runs a live browser smoke test |
npx -y ghost-qa init writes the ready-to-use .mcp.json entry for you (merging with any servers you already have):
{ "mcpServers": { "ghost-qa": { "command": "npx", "args": ["-y", "ghost-qa", "mcp"] } } }Works with Claude Code, Claude Desktop, Cursor, Codex β any MCP host.
Docker / Glama: the repo ships a production Dockerfile whose entrypoint is the MCP server (node dist/bin/ghost-qa.js mcp). Registry introspection (initialize + tools/list over stdio) answers instantly with no Chromium present β a browser is only launched when a tool is actually called:
docker build -t ghost-qa .
docker run -i ghost-qa # MCP JSON-RPC over stdin/stdoutπ₯οΈ Zero-lifecycle testing with --server-cmd (new in v1.1.0)
Don't even start the dev server yourself β ghost-qa will spawn it, wait for the URL to respond, audit, and terminate the whole process tree afterward:
npx -y ghost-qa test http://localhost:3000 --server-cmd "npm run dev"Pair it with --html ghost-qa-report.html for a self-contained, dark-mode visual evidence dashboard (routes, interactions, every trap finding per viewport) you can attach to CI artifacts or PRs.
π Example output
π» ghost-qa β autonomous browser verification
Target: http://localhost:3000/
Duration: 14.2s Β· Viewports: desktop + tablet + mobile Β· Schemes: light + dark Β· Depth: 2
Routes crawled
/ Home [200] 3 issues
/pricing Pricing [200] β
/dashboard Dashboard [200] 2 issues
Coverage
Routes visited: 3
Interactions tested: 21 passed Β· 1 failed Β· 4 skipped (safety)
Issues: 5 total β 2 critical, 3 major, 0 minor
QA Health Score: 62/100 β Grade D (8 traps Β· per-trap: console 65 Β· network 75 Β· layout 90 Β· a11y 100 Β· perf 100 Β· links 100 Β· seo 100 Β· theme 65)
Failures caught
β CRITICAL [console] React hydration mismatch: Text content did not matchβ¦
β³ / Β· desktop Β· #a91f03cc
β CRITICAL [network] Server error HTTP 500 for /api/users β backend/API is crashing on this route.
β³ /dashboard Β· mobile Β· #51bd77e0
β² MAJOR [layout] Horizontal overflow on mobile: page scrolls sideways by 130pxβ¦
β³ / Β· mobile Β· #c04d19aa
β GHOST-QA FAIL β blocking browser failures found. Fix them and re-run before reporting done.The agent-facing report (--report ghost-qa-report.md) groups the same bugs by route with a per-category fix playbook and the exact re-run command.
π CLI reference
Command | Description |
| Crawl a running app and trap browser failures. Exit |
| Install |
| Regression & Verification Delta Report between two report JSONs. Exit |
| Run the native MCP server (JSON-RPC 2.0 over stdio) exposing |
| Diagnose Node β₯ 20, Playwright and Chromium setup, with a live browser smoke test |
| Version / usage |
test flags
Flag | Default | Description |
|
| Link-following depth from the start URL |
|
| Maximum routes to visit |
|
| Per-navigation timeout |
|
|
|
|
|
|
| off | Capture a screenshot per route/viewport for the HTML dashboard |
| β | Write |
| off | Load pages only; don't click or fill anything |
| off | Show the browser window (debugging) |
|
| Exit 1 on |
| off | Print the full machine-readable JSON report to stdout |
| β | Write diagnostic to a file (Markdown, or JSON if the name ends |
| β | Write the self-contained dark-mode HTML visual evidence dashboard |
| β | Spawn a dev server, wait for the URL, audit, then terminate the server tree |
|
| How long to wait for |
| off | Suppress the terminal summary (report file + exit code only) |
Works with any stack that serves HTML on localhost β Next.js, Vite, Remix, Astro, Create React App, plain static servers, Rails, Djangoβ¦ if a browser can open it, ghost-qa can judge it.
π€ The Agent Skill
SKILL.md (repo root) is the master Staff QA Engineer Protocol. One command β npx -y ghost-qa init β connects it, plus the 8-trap MCP server, into every major coding agent in its native dialect. All writes are idempotent (marker-delimited protocol blocks, JSON merges that preserve your existing servers/settings):
π Supported Coding Agents (Claude Code, OpenCode, Codex, Cursor, Windsurf, Copilot, Cline, Zed)
Agent | What |
Claude Code |
|
OpenCode |
|
OpenAI Codex CLI & universal agents |
|
Cursor |
|
Windsurf |
|
VS Code / GitHub Copilot |
|
Cline / Roo Code |
|
Zed |
|
Every dialect wires the same MCP command (npx -y ghost-qa mcp) and the same 5-phase protocol: doctor β baseline audit β DOM-to-source mapping β remediation β ghost_qa_compare delta verification until QA Health Score 95β100. This repo dogfoods it: root AGENTS.md, CLAUDE.md, opencode.json, and .claude-plugin/plugin.json are committed, so Claude Code, OpenCode, and Codex CLI auto-discover ghost-qa here immediately.
βοΈ GitHub Actions CI (uses: avivgerz-hue/ghost-qa@v2)
Run ghost-qa in any repository's CI with the official composite action (Marketplace-ready, action.yml in this repo):
name: Browser QA
on: [pull_request]
jobs:
ghost-qa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Autonomous browser QA
uses: avivgerz-hue/ghost-qa@v2
with:
url: "http://localhost:3000" # default
cmd: "npm run dev" # optional: ghost-qa spawns/waits/kills your dev server
fail-on: "high" # high=critical Β· medium=major Β· low=minor (default high)
out-dir: ".ghost-qa" # report.json, GHOST-QA-REPORT.md, PATCH-PROMPT.md, report.html
screenshots: "false" # "true" embeds route screenshots in report.htmlThe action sets up Node 20, installs the matching Playwright Chromium if needed, runs npx -y ghost-qa@2.0.0 test β¦, and uploads the report bundle as a workflow artifact β the job fails on any finding at or above your fail-on gate.
βοΈ Scope & limitations (read this β we mean it)
ghost-qa is a local development verification tool, and we'd rather be honest than viral:
Not a WCAG audit. The Accessibility Trap catches common machine-checkable failures (names, alt, labels, title, lang). Full WCAG conformance still needs assistive-technology testing.
Not a replacement for your test suite. It complements unit/E2E tests by checking the live app the way a browser experiences it β it writes no persistent tests for you.
Heuristic safety. The Interaction Runner refuses destructive-looking controls (delete, checkout, pay, logoutβ¦) and fills only inert data, but "destructive" is ultimately a word list. It is designed for localhost dev servers.
Auth-gated apps. Without credentials, ghost-qa audits what an anonymous visitor sees (often the login page). Authenticated crawling is on the roadmap, not in the box today.
Performance numbers are local-machine heuristics. Borderline perf findings on a loaded CI box deserve a re-run, not a panic.
Never point it at production systems or sites you don't own or have explicit permission to test. It clicks real buttons.
The MCP server is stdio-only (no network ports). Only wire it into MCP hosts you trust.
Found a trap flagging a healthy page? That's our most valuable issue type β file it with the report attached. Security reports: see SECURITY.md. Release history: CHANGELOG.md.
π§βπ» Development
npm install
npx playwright install chromium
npm run build # tsc β dist/
npm test # Vitest: trap evaluators, crawler policy, safety gate, reporters
node dist/bin/ghost-qa.js doctorSee CONTRIBUTING.md for the "pure evaluator first" architecture rules.
π License
MIT Β© VibeFoundry β see LICENSE.
Part of the VibeFoundry Agent Suite
Tool | Description |
π¨ unslop | Studio-grade UI design systems & Anti-Slop engine for coding agents. |
π‘οΈ vibe-shield | Automated security scanner & MCP guard for AI-generated codebases. |
π» ghost-qa | Autonomous headless browser QA & self-healing verification loop. |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
AI QA tester β real browsers scan sites for bugs, SEO, perf, and accessibility issues via chat.
MCP server for Mint β AI-powered QA that runs your app in a real browser on every PR.
Read-only web QA agent: scans a site in a real browser and returns evidence-backed findings
QA after every deploy: walks your live web app as a real user and tells your agent what broke.
Related MCP Servers
- AlicenseBqualityBmaintenanceTesting MCP for coding agents: exercise real user journeys, independently recheck suspected bugs, and export verified findings as Playwright regression tests. Includes browser interaction, goal coverage, evidence-linked reports, and optional local monitoring. The host agent supplies the model and judgment; Argus needs no separate provider key.29267 PyPI5MIT
- AlicenseBqualityCmaintenanceSelf-healing test automation MCP server that diagnoses and fixes issues in mobile and web apps, including a one-command vibe-check to prioritize broken functionality.2372 npmMIT
- AlicenseNot gradedqualityDmaintenanceAn autonomous, self-managing MCP server providing comprehensive UI analysis, cross-browser testing, and intelligent browser automation with zero-configuration setup.MIT
- AlicenseNot gradedqualityDmaintenanceAn instrumented local browser daemon MCP server that lets coding agents verify UIs in one call, with console, network, layout, accessibility, and coverage checks, plus debugging tools. It provides named isolated sessions and a CLI+MCP duality for the same verbs.1MIT