Skip to main content
Glama

a11y-mcp

PyPI License: MIT

MCP server for running axe-core accessibility audits. Uses Camoufox to bypass Cloudflare and other bot protection.

Install

# Claude Code
claude mcp add a11y -- uvx a11y-mcp

# Or with pip
pip install a11y-mcp

Related MCP server: Accessibility MCP Server

Configuration

For Claude Desktop, add to your config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "a11y": {
      "command": "uvx",
      "args": ["a11y-mcp"]
    }
  }
}

Most editors use the same format. Add to your MCP config:

{
  "mcpServers": {
    "a11y": {
      "command": "uvx",
      "args": ["a11y-mcp"]
    }
  }
}

Config locations:

  • Cursor: ~/.cursor/mcp.json

  • VS Code (Continue): .continue/config.json under experimental.modelContextProtocolServers

  • VS Code (Cline): Cline MCP settings

  • Zed: ~/.config/zed/settings.json under context_servers

Tools

Tool

Description

scan_page

Scan a URL for WCAG violations

scan_element

Scan a specific CSS selector

get_violations

Get detailed violation info from last scan

get_full_report

Full axe results (violations, passes, incomplete)

export_report

Export as JSON, HTML, or CSV

set_wcag_level

Set WCAG level (A, AA, AAA, 21A, 21AA, 22AA)

configure_rules

Enable/disable specific axe rules

Usage

> Scan https://example.com for accessibility issues

> Export an HTML report for the last scan

> Check WCAG 2.2 AA compliance for https://adobe.com

WCAG Levels

Level

Standard

A, AA, AAA

WCAG 2.0

21A, 21AA

WCAG 2.1

22AA

WCAG 2.2

Default is AA.

Cloudflare Bypass

This uses Camoufox, an anti-detect browser with fingerprint spoofing at the C++ level. It handles JavaScript challenges, Turnstile, and most bot detection automatically.

On first run, Camoufox downloads a browser binary (~300MB).

Requirements

  • Python 3.10+

  • macOS, Linux, or Windows

Troubleshooting

Browser won't launch: Run python -c "import camoufox; camoufox.install()"

Cloudflare still blocking: Some sites have aggressive detection. The first visit may require manual verification.

axe-core won't inject: Likely a strict CSP. Try a different page on the same domain.

Development

git clone https://github.com/antonio-rmrz/a11y-mcp && cd a11y-mcp
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
python -m camoufox fetch
pytest

Debug with the MCP inspector:

npx @modelcontextprotocol/inspector uvx a11y-mcp

License

MIT License - see LICENSE for details.

Credits

  • axe-core - Accessibility testing engine by Deque

  • Camoufox - Anti-detect browser

  • MCP - Model Context Protocol by Anthropic

Available Tools

7 tools
configure_rulesA

Enable or disable specific accessibility rules.

Use this to customize which rules are checked during scans. Changes apply to all subsequent scans until reconfigured.

Common rules to disable:

  • color-contrast: Color contrast checks

  • image-alt: Image alt text requirements

  • link-name: Link text requirements

  • region: Landmark region requirements

Args: rules: Map of rule IDs to enabled status. Example: {'color-contrast': false}

Returns: Confirmation of applied configuration

Inputs: rules (required). Returns: object

export_reportA

Export accessibility report in the specified format.

Generates a formatted report from the last scan results.

Formats:

  • json: Machine-readable JSON with full details

  • html: Styled HTML report for stakeholders

  • csv: Spreadsheet-compatible format for tracking

Args: format: Output format - 'json', 'html', or 'csv'

Returns: Formatted report content as a string

Inputs: format (required). Returns: object

get_full_reportA

Get complete accessibility report from the last scan.

Includes violations, passes, incomplete checks, and inapplicable rules. Use this for comprehensive analysis of accessibility compliance.

Returns: Complete scan results including all categories (violations, passes, incomplete, inapplicable)

Inputs: no named parameters. Returns: object

get_violationsA

Get detailed list of violations from the most recent scan.

Returns full violation details including affected elements, WCAG references, and remediation guidance.

Returns: List of violations with complete details including affected HTML elements

Inputs: no named parameters. Returns: object

scan_elementA

Scan a specific element on the current page for accessibility issues.

Must be called after scan_page() has loaded a page. Runs axe-core on just the specified element and its descendants.

Args: selector: CSS selector for the element to scan (e.g., '#main-nav', '.form-container')

Returns: Accessibility scan results for the specified element

Inputs: selector (required). Returns: object

scan_pageA

Navigate to a URL, bypass Cloudflare if present, and run an accessibility scan.

This tool uses an anti-detect browser (Camoufox) that can bypass Cloudflare protection, then injects axe-core and runs a full accessibility audit.

Args: url: The URL to scan for accessibility issues wcag_level: WCAG conformance level (A, AA, AAA, 21A, 21AA, 22AA). Default: AA wait_for_cloudflare: Wait for Cloudflare challenges to complete. Default: True

Returns: Summary of accessibility scan including violation counts by severity

Inputs: url (required), wcag_level, wait_for_cloudflare. Returns: object

set_wcag_levelA

Set WCAG conformance level for accessibility testing.

Available levels:

  • A: WCAG 2.0 Level A (minimum accessibility)

  • AA: WCAG 2.0 Level AA (standard compliance target, recommended)

  • AAA: WCAG 2.0 Level AAA (enhanced accessibility)

  • 21A: WCAG 2.1 Level A

  • 21AA: WCAG 2.1 Level AA

  • 22AA: WCAG 2.2 Level AA (latest standard)

Args: level: WCAG level code (A, AA, AAA, 21A, 21AA, 22AA)

Returns: Confirmation of WCAG level setting with tags that will be used

Inputs: level (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 7 tools

    Disambiguation5/5

    All tools have clearly distinct purposes: configuration (rules and WCAG level), scanning (page and element), and result retrieval (full report, violations, export). No ambiguous overlap.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun snake_case pattern (e.g., configure_rules, scan_page, get_violations), making the tool set predictable.

    Tool Count5/5

    Seven tools cover the essential workflow of accessibility testing: configuration, scanning, and reporting. The scope is appropriate without unnecessary tools.

    Completeness4/5

    Core workflows are covered, but minor gaps exist: there is no tool to retrieve current configuration (e.g., enabled rules or WCAG level) or to list available rules, which could hinder agents needing to inspect settings.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers