MCP server for automated web accessibility audits using Playwright + axe-core against WCAG 2.1 A/AA criteria.
Features:
- WCAG 2.1 A & AA compliance checks
- Fast audits (target <30s) with
networkidlenavigation - Screenshot capture for critical/serious violations
- Structured JSON output with detailed violation data
# Install dependencies
bun install
# Start dev server (http://localhost:8080)
bun run dev
# Test with MCP Inspector
bunx @modelcontextprotocol/inspectorRequirements: Bun on Linux/macOS
If browsers are missing: bunx playwright install chromium
Performs full WCAG 2.1 AA audit with violation details and screenshots.
{ "url": "https://example.com" }Quick summary of violations by impact level (critical/serious/moderate/minor).
{ "url": "https://example.com" }Simple connectivity test to verify URL is accessible before auditing.
{ "url": "https://example.com" }Transforms audit JSON into comprehensive Markdown report with executive summary, detailed violations, and remediation plan.
Usage: Run a11y_audit_page and a11y_get_summary, then pass raw JSON outputs to this prompt.
bun run build # Build for production
bun run prettier:check # Check formatting
bun run prettier:write # Auto-format codeCode guidelines: See AGENTS.md for style rules, architecture notes, and best practices.
Project structure:
src/mcp.ts- Server bootstrap and tool registrationsrc/tools/- MCP tool implementationssrc/utils/playwright.ts- Browser automation utilities
GET /healthcheck- Health check (returns 200 when ready)POST /mcp- MCP JSON-RPC endpoint
Browser issues: bunx playwright install chromium
Slow audits: Pages with heavy scripts may exceed 30s target
Empty results: Verify URL is reachable and returns valid HTML
- Only navigates to provided URLs (no arbitrary script execution beyond axe-core)
- Runs in headless Chromium with no persistent storage
- Avoid scanning untrusted local file URLs