storefront-critic
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.
storefront-critic
Hostile, stateless visual QA for AI-generated e-commerce storefronts — available as a CLI tool and an MCP server.
The Problem
AI coding agents can generate a full e-commerce storefront in 2 minutes, but self-grading suffers from anchoring bias. When the same agent that wrote the JSX and CSS inspects its own work, it rationalizes broken product images, overlooks mobile horizontal overflow, ignores invisible CTAs, and declares half-finished blank renders "Live."
storefront-critic separates building from judging. It captures real headless Chromium renders across desktop and mobile viewports, extracts deterministic DOM/network failure signals, and hands everything to a completely stateless Vision LLM enforcing a hostile zero-base e-commerce rubric.
Related MCP server: agent-eyes
Architecture
┌──────────────────────────────────────────────┐
Live Storefront URL │ src/capture.ts (Playwright Headless Chrome) │
─────────────────────► │ • desktop_above_fold.png (1440x900) │
│ • desktop_full.png (1440x900 fullPage) │
│ • mobile_above_fold.png (390x844 iPhone) │
│ • Probes: console errors, HTTP >= 400, │
│ horizontal overflow, broken <img>, │
│ blank/uniform viewport detection │
└──────────────────────┬───────────────────────┘
│ PNG buffers + DOM telemetry
▼
┌──────────────────────────────────────────────┐
│ src/critic.ts (Stateless Vision LLM + Zod) │
│ • Providers: Gemini (@google/genai) │
│ OpenAI (openai) │
│ • Starts at 0.0 / 10.0 │
│ • Enforces Hard Fails (4.0/10 score cap) │
│ • Ship Gate: >= 8.5 AND 0 hard fails │
└───────────┬──────────────────────┬───────────┘
│ │
┌─────────────────▼──────┐ ┌──────────▼──────────────────┐
│ src/cli.ts (CLI) │ │ src/mcp.ts (MCP Server) │
│ • report.json (Zod) │ │ • audit_storefront_url() │
│ • report.md │ │ • JSON defect loop for │
│ • 3 PNG screenshots │ │ Claude Code / Cursor / │
│ • CI exit codes │ │ Antigravity │
└────────────────────────┘ └─────────────────────────────┘Hostile Visual Rubric
Every storefront starts at 0.0 / 10.0 and must earn every point.
Automatic Hard Fails (caps overall score at 4.0 / 10.0)
Blank or empty render (
innerText.length < 50or uniform blank viewport)Broken
<img>elements (naturalWidth === 0or broken media)Horizontal overflow on mobile (
scrollWidth > innerWidthat390x844)Overlapping or clipped text or buttons
Missing or invisible primary CTA above the fold
Console errors or 4xx/5xx runtime failures breaking render
Scoring Categories (0.0–2.0 pts each = 10.0 max)
Above-the-Fold Clarity & Value Prop
Visual Hierarchy & Typography Polish
Mobile Responsiveness & Tap Targets
Product Imagery & Trust Signals
CTA Visibility & Conversion Friction
Ship Gate
PASS only if overallScore >= 8.5 AND hardFails.length === 0.
Quickstart
1. Install & Configure
git clone https://github.com/your-org/storefront-critic.git
cd storefront-critic
npm install
npx playwright install chromium
cp .env.example .envEdit .env and set either GEMINI_API_KEY (default: gemini-3.5-flash-lite) or OPENAI_API_KEY (default: gpt-4o):
VISION_PROVIDER=gemini
GEMINI_API_KEY=your_gemini_api_key_here
GEMINI_MODEL=gemini-3.5-flash-lite2. CLI Usage
Run a full audit against any live URL:
npx tsx src/cli.ts https://example-storefront.dev --out ./auditArtifacts written to ./audit:
desktop_above_fold.png(1440x900)desktop_full.png(1440x900 full page)mobile_above_fold.png(390x844 iPhone viewport)report.json(Zod-validated structured JSON)report.md(human-readable audit summary)
Need to inspect screenshots and DOM probes without spending Vision LLM tokens?
npx tsx src/cli.ts https://example-storefront.dev --out ./audit --capture-onlyCLI Exit Codes:
0— Storefront PASSED the Ship Gate (overallScore >= 8.5and0hard fails)2— Audit succeeded, but storefront FAILED the Ship Gate1— Configuration, network, or runtime error
3. MCP Server Usage (Automated Self-Repair Loop)
Build the project (or run directly via npx tsx):
npm run buildAdd storefront-critic to your MCP client configuration (Claude Code, Cursor, or Antigravity):
{
"mcpServers": {
"storefront-critic": {
"command": "npx",
"args": ["tsx", "/absolute/path/to/storefront-critic/src/mcp.ts"],
"env": {
"VISION_PROVIDER": "gemini",
"GEMINI_API_KEY": "your_gemini_api_key_here"
}
}
}
}Once connected, your coding agent gains a single tool:
audit_storefront_url(url: string)— returns the strict JSON audit report.
Example agent loop prompt:
"Run
audit_storefront_urlagainsthttp://localhost:3000. Fix everyhardFailandcritical/highticket indefectTickets, re-runaudit_storefront_url, and repeat untilpassedShipGateistrue."
Example JSON Defect Ticket Output
{
"url": "http://localhost:3000",
"auditedAt": "2026-12-03T18:00:00.000Z",
"provider": "gemini",
"model": "gemini-3.5-flash-lite",
"overallScore": 4.0,
"passedShipGate": false,
"hardFails": [
"Broken images detected: 1 visible <img> element(s) failed to load (naturalWidth === 0).",
"Horizontal overflow on mobile: scrollWidth (512px) exceeds viewport (390px) by 122px."
],
"categoryScores": {
"aboveTheFoldClarity": {
"score": 1.4,
"rationale": "Headline communicates the product category, but subhead wraps awkwardly onto 4 lines."
},
"visualHierarchyTypography": {
"score": 1.2,
"rationale": "Consistent sans-serif scale, though card padding is uneven across the 3-column grid."
},
"mobileResponsivenessTapTargets": {
"score": 0.3,
"rationale": "Fixed 480px promo banner forces 122px horizontal scroll on 390px mobile viewport."
},
"productImageryTrustSignals": {
"score": 0.4,
"rationale": "Hero product image fails to load (HTTP 404); no shipping or return guarantee visible."
},
"ctaVisibilityConversionFriction": {
"score": 1.1,
"rationale": "Primary CTA button exists above the fold on desktop, but contrast ratio is weak on mobile."
}
},
"defectTickets": [
{
"severity": "critical",
"viewport": "mobile",
"selectorOrArea": ".promo-banner",
"issue": "Fixed width (480px) causes 122px horizontal overflow on the 390x844 mobile viewport.",
"suggestedFix": "Replace width: 480px with width: 100%; max-width: 480px; box-sizing: border-box."
},
{
"severity": "critical",
"viewport": "both",
"selectorOrArea": "img.hero-product",
"issue": "Primary hero product image returns HTTP 404 and renders with naturalWidth === 0.",
"suggestedFix": "Update src to a valid optimized product asset and set explicit aspect-ratio and alt text."
}
]
}45-Second Demo Video
TODO: Embed 45-second demo recording showing an AI coding agent failing the Ship Gate (
4.0/10), readingdefectTicketsvia MCPaudit_storefront_url, repairing the storefront, and passing (>= 8.5/10) on the next pass.

Benchmark Table
TODO: Populate with evaluation results across AI-generated storefronts before and after automated MCP self-repair loops.
Storefront Template / Generator | Initial Score | Initial Hard Fails | Repair Passes | Final Score | Ship Gate |
TBD — Minimalist Apparel Store | — | — | — | — | — |
TBD — Specialty Coffee DTC | — | — | — | — | — |
TBD — Consumer Hardware Landing | — | — | — | — | — |
TBD — Skincare Bundle Funnel | — | — | — | — | — |
Project Structure
storefront-critic/
├── src/
│ ├── capture.ts # Playwright multi-viewport capture + DOM/network/blank-render probes
│ ├── critic.ts # Stateless Vision LLM evaluator (Gemini/OpenAI) + Zod rubric enforcement
│ ├── cli.ts # CLI entrypoint -> screenshots, report.json, report.md
│ └── mcp.ts # Minimal MCP server exposing audit_storefront_url(url)
├── .env.example
├── .gitignore
├── LICENSE
├── package.json
└── tsconfig.jsonLicense
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
Website checker for AI coding agents. Measures your site in a real browser, with evidence.
Read-only web QA agent: scans a site in a real browser and returns evidence-backed findings
Find UI bugs, verify fixes and run tests on your web app from your AI coding agent.
Visual bug reports from your website, handed to your AI coding agent as a safe summary.
Related MCP Servers
AlicenseAqualityAmaintenanceEnables coding agents to independently verify web changes by scanning pages, inspecting UI structure, generating Playwright reproductions, and executing tests with structured QA evidence.479 npm4MIT- AlicenseAqualityBmaintenanceEnables AI coding agents to see, measure, and verify web pages through a real Chrome browser, including screenshots, responsive layout and accessibility audits, pixel diffing against baselines, secure logins, and deployed-fix verification.271MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables coding agents to run an evidence-backed visual QA loop for browser interfaces, including inspecting a running app, retrieving findings with screenshots, and rechecking only the captures affected by a fix.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to audit rendered web pages for design and UI defects by measuring geometry, styles, contrast and motion in a local browser and judging them against evidence-tiered rules. Findings come back as short, fixable items expressed in the project's own design tokens, while only sanitized numeric measurements leave the machine.Apache 2.0