Skip to main content
Glama
Accessibility MCP

Accessibility MCP

by ksmuvva

Accessibility MCP — WCAG 2.2 AA (GOV.UK standard)

A Model Context Protocol server that audits web pages and sites for WCAG 2.2 level AA accessibility, aligned with the GOV.UK / GDS standard that UK public sector bodies are legally required to meet (since 1 October 2024).

It drives a real headless Chromium (via Playwright) and runs up to four independent accessibility engines — axe-core, pa11y (HTML_CodeSniffer + axe), Lighthouse and IBM Equal Access — layers GOV.UK-specific checks and remediation guidance on top, and returns results as structured JSON, a human-readable Markdown report, and a GDS-style compliance summary.

It can drive interactive journeys (navigate, click, fill, log in) and audit the resulting state. Optimized for efficiency with 41 streamlined tools instead of 168 individual rule tools.

Honest by design. Automated testing detects only ~30–40% of WCAG issues. Every report separates automated failures, needs manual review, and passed checks, and any unverified AA criterion keeps the status at "partially compliant". This tool is a starting point for, not a replacement for, a full manual audit.

Tools

Bundled audits (multi-engine):

Tool

Description

audit_url

Audit one live page; supports engines and interaction steps.

audit_html

Audit a raw HTML string / component snippet (no network fetch).

audit_site

Crawl a site (same origin) and audit each page; aggregated summary.

Dedicated single-engine audits (take url, html or session_id):

Tool

Description

audit_axe

axe-core only (plus GOV.UK checks).

audit_pa11y

pa11y only (HTML_CodeSniffer + axe runners).

audit_lighthouse

Lighthouse accessibility only.

audit_ibm

IBM Equal Access only.

Interactive navigation (stateful browser session):

Tool

Description

browser_open

Open a session; returns a session_id.

browser_navigate / browser_click / browser_fill / browser_wait

Drive the page.

browser_snapshot

Current url, title and visible text.

audit_current_page

Audit the current post-interaction state.

browser_close

Close the session.

Automated checks & rule-specific audits:

Tool

Description

audit_automated_checks

Runs every automatable WCAG criterion at once.

axe_check_rule

Check any axe-core rule by ID (replaces 100+ individual tools).

list_automated_checks

WCAG criteria that can be automated.

list_manual_checks

WCAG criteria requiring human review.

Grouped audit tools: run related rules at once.

Tool

Description

audit_perceivable / audit_operable / audit_understandable / audit_robust

All axe rules under a WCAG principle.

audit_group_color, audit_group_forms, audit_group_keyboard, audit_group_aria, etc.

All axe rules in a category (12 total).

list_groups

Lists every group tool and the rules it runs.

Catalogue / reporting:

Tool

Description

list_engines

Available engines and Node runner installation status.

list_wcag_rules

WCAG 2.2 criteria checked, with automation coverage.

list_axe_rules

All 105 axe rules available for axe_check_rule.

generate_accessibility_statement

Draft a GOV.UK-format statement from an audit.

Each audit tool returns:

  • json — structured, machine-readable results (violations, severity, WCAG criteria, affected selectors, remediation);

  • markdown_report — a human-readable report grouped by severity;

  • gds_summary — a GOV.UK-flavoured compliant / partially compliant / not compliant summary with reasons;

  • audit_id — pass it to generate_accessibility_statement to reuse the result.

Related MCP server: Accessibility MCP Server

Recent Optimizations

🎯 Ponytail Performance Improvements (v0.2):

  • Tool count: 168 → 41 tools (-76% reduction)

  • Interface: Replaced 100+ per-rule tools with single axe_check_rule(rule_id)

  • Performance: Simplified configuration, faster server startup

  • Functionality: All accessibility testing engines preserved

  • Code quality: Removed 200+ lines of unnecessary complexity

Engines

Choose engines per call via engines=["axe","pa11y","lighthouse","ibm"] (default ["axe"]). Findings from every engine are normalised to a common shape with WCAG criteria and labelled by source, so you can cross-check results.

Engine

Language

Notes

axe

Python (in-process)

Deque axe-core, explicit WCAG 2.2 tags. Always available.

pa11y

Node

HTML_CodeSniffer + axe runners. Replays steps as pa11y actions.

lighthouse

Node

Google Lighthouse accessibility category. Audits by URL.

ibm

Node

IBM Equal Access. Needs network egress to its rule archive (cdn.jsdelivr.net); in locked-down networks it returns a structured engine-error instead of crashing the run.

axe runs in-process; the other three run in a Node subprocess (accessibility_mcp/engines_node/). If the Node runner is not installed, those engines report a clear "not installed" error and axe still works.

What it checks

  • Full axe-core WCAG 2.2 rule set — 105 rules covering contrast, alt text, labels, names, landmarks, etc.

  • pa11y / Lighthouse / IBM — independent rulesets for cross-checking.

  • GOV.UK custom checks — accessibility-statement link presence, "Skip to main content" skip link, a single <main> landmark, and GOV.UK Design System usage.

  • WCAG 2.2 awareness — flags the criteria new in 2.2 (2.4.11, 2.5.7, 2.5.8, 3.2.6, 3.3.7, 3.3.8) and marks non-automatable criteria as needs manual review rather than silently passing them.

Installation

python -m venv .venv && source .venv/bin/activate
pip install -e .
# Chromium: this server reuses an existing Playwright Chromium if present
# (see configuration), otherwise install one:
playwright install chromium

# Optional — pa11y, Lighthouse and IBM engines (needs Node.js):
bash accessibility_mcp/engines_node/setup.sh

axe-core is vendored in accessibility_mcp/vendor/axe.min.js — no CDN needed. The axe rule catalogue (vendor/axe-rules.json) contains 105 rules for axe_check_rule.

The Node engines reuse the same Chromium as axe (no extra browser download). Only axe is required; the others are optional and degrade gracefully if absent.

Running

# Run directly over stdio:
accessibility-mcp
# or
python -m accessibility_mcp.server

Register with an MCP client

Add to your client config (e.g. Claude Desktop claude_desktop_config.json, or the example mcp.json in this repo):

{
  "mcpServers": {
    "accessibility": {
      "command": "accessibility-mcp"
    }
  }
}

If you installed into a virtualenv, point command at that venv's executable, e.g. /path/to/.venv/bin/accessibility-mcp.

Configuration (environment variables)

Variable

Default

Purpose

ACCESSIBILITY_MCP_CHROMIUM

auto-detect

Explicit Chromium executable path.

PLAYWRIGHT_BROWSERS_PATH

(Playwright default)

Searched for an installed Chromium build.

Chromium auto-detection. MCP clients spawn the server with a sanitised environment (typically just HOME/PATH/SHELL/TERM), so PLAYWRIGHT_BROWSERS_PATH is usually stripped before the server starts. When it is absent, the server still probes well-known default install locations (/opt/pw-browsers, ~/.cache/ms-playwright) so audits work out of the box. Set ACCESSIBILITY_MCP_CHROMIUM to override discovery explicitly. | ACCESSIBILITY_MCP_PROXY / HTTPS_PROXY | none | Outbound proxy for audit_url / audit_site. | | ACCESSIBILITY_MCP_PAGE_TIMEOUT_MS | 30000 | Page load timeout. | | ACCESSIBILITY_MCP_MAX_PAGES | 20 | Default crawl page limit. | | ACCESSIBILITY_MCP_MAX_DEPTH | 2 | Default crawl depth limit. |

audit_url / audit_site need outbound network access to the target site. In locked-down environments behind an egress policy, set HTTPS_PROXY (Chromium is pointed at it automatically); audit_html needs no network.

Development

pip install -e ".[dev]"
pytest                 # unit + browser-backed integration tests (local fixtures)

The integration tests drive a real headless Chromium against the HTML fixtures in tests/fixtures/, so they require a working Chromium but no network access.

Architecture

accessibility_mcp/
  server.py            FastMCP entry point — 41 optimized tools
  audit.py             Orchestration (URL / HTML / site / single rule / open page)
  config.py            WCAG tags, engines, browser/proxy discovery, limits
  engine/              browser.py, axe_runner.py, crawler.py, node_bridge.py, session.py
  engines_node/        Node runner for pa11y / Lighthouse / IBM (runner.mjs, setup.sh)
  rules/               wcag22.py, govuk_checks.py, remediation.py, normalize.py, axe_rules.py
  reporting/           models.py, builder.py, json/markdown/gds renderers
  vendor/              axe.min.js, axe-rules.json (105 axe rules)
scripts/generate_axe_rules.py   Regenerate vendor/axe-rules.json from axe-core

Disclaimer

This server helps identify accessibility problems and draft an accessibility statement. It does not, on its own, establish legal compliance. A full manual audit (keyboard operation, screen-reader testing, focus order, captions, etc.) is required to claim conformance with WCAG 2.2 AA.

Available Tools

41 tools
audit_automated_checksA

Run ALL automated WCAG checks at once (every machine-detectable criterion).

Runs the axe rules for every WCAG 2.2 criterion (up to level) that can be automated — a high-confidence pass/fail across the machine-testable surface. Criteria that cannot be automated are reported by list_manual_checks.

Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_axeB

Audit with the axe-core engine only (plus GOV.UK checks).

Provide one of: url, html, or session_id. axe-core is the in-process engine with explicit WCAG 2.2 rule tags.

Inputs: url, html, level, session_id, +1 more. Returns: object

audit_current_pageA

Audit the current (post-interaction) state of a session's page.

axe-core runs against the live page; pa11y, Lighthouse and IBM audit a serialised snapshot of the current DOM, so interaction state (filled fields, opened modals, dynamic content) is preserved.

Args: session_id: A session from browser_open. level: WCAG level: "A", "AA" (default) or "AAA". engines: Subset of ["axe","pa11y","lighthouse","ibm"]. Defaults to ["axe"]. include_best_practice: Also run axe "best-practice" rules.

Inputs: session_id (required), level, engines, include_best_practice. Returns: object

audit_group_ariaB

Audit the 'aria' rule group (25 axe rules). Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_group_colorA

Audit the 'color' rule group (3 axe rules). Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_group_formsA

Audit the 'forms' rule group (5 axe rules). Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_group_keyboardB

Audit the 'keyboard' rule group (9 axe rules). Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_group_languageB

Audit the 'language' rule group (4 axe rules). Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_group_name_role_valueA

Audit the 'name-role-value' rule group (7 axe rules). Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_group_parsingB

Audit the 'parsing' rule group (4 axe rules). Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_group_semanticsC

Audit the 'semantics' rule group (14 axe rules). Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_group_sensory_and_visual_cuesB

Audit the 'sensory-and-visual-cues' rule group (3 axe rules). Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_group_structureB

Audit the 'structure' rule group (8 axe rules). Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_group_tablesA

Audit the 'tables' rule group (6 axe rules). Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_group_text_alternativesB

Audit the 'text-alternatives' rule group (12 axe rules). Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_group_time_and_mediaB

Audit the 'time-and-media' rule group (5 axe rules). Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_htmlA

Audit a raw HTML string or component snippet for WCAG 2.2 accessibility.

Renders the HTML in headless Chromium (no network fetch) and audits it with the chosen engines. Useful for testing templates/components in CI.

Args: html: The HTML markup to audit. level: WCAG level: "A", "AA" (default) or "AAA". engines: Subset of ["axe","pa11y","lighthouse","ibm"]. Defaults to ["axe"]. steps: Optional interactions before auditing (see audit_url). include_best_practice: Also run axe "best-practice" rules.

Inputs: html (required), level, steps, engines, +1 more. Returns: object

audit_ibmA

Audit with the IBM Equal Access engine only.

Provide one of: url, html, or session_id. Requires the Node engine runner and network egress to the IBM rule archive (cdn.jsdelivr.net); otherwise returns a structured engine-error.

Inputs: url, html, level, session_id. Returns: object

audit_lighthouseA

Audit with the Google Lighthouse accessibility engine only.

Provide one of: url, html, or session_id. Lighthouse audits by URL (it reloads the page). Requires the Node engine runner.

Inputs: url, html, level, session_id. Returns: object

audit_operableB

Audit the WCAG 'Operable' principle: runs the 14 axe rules mapped to WCAG operable criteria. Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_pa11yA

Audit with the pa11y engine only (HTML_CodeSniffer + axe runners).

Provide one of: url, html, or session_id. Requires the Node engine runner (accessibility_mcp/engines_node/setup.sh).

Inputs: url, html, level, session_id. Returns: object

audit_perceivableA

Audit the WCAG 'Perceivable' principle: runs the 29 axe rules mapped to WCAG perceivable criteria. Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_robustA

Audit the WCAG 'Robust' principle: runs the 31 axe rules mapped to WCAG robust criteria. Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_siteA

Crawl a site (same origin) and audit each page for WCAG 2.2 accessibility.

Breadth-first crawl from the start URL, auditing each page with the chosen engines. Returns per-page results and an aggregated service-level GDS summary.

Args: url: The start URL to crawl from. max_pages: Maximum pages to audit (capped by server config). max_depth: Maximum link depth from the start URL (capped by server config). level: WCAG level: "A", "AA" (default) or "AAA". engines: Subset of ["axe","pa11y","lighthouse","ibm"]. Defaults to ["axe"]. include_best_practice: Also run axe "best-practice" rules.

Inputs: url (required), level, engines, max_depth, +2 more. Returns: object

audit_understandableA

Audit the WCAG 'Understandable' principle: runs the 6 axe rules mapped to WCAG understandable criteria. Provide one of: url, html, or session_id.

Inputs: url, html, level, session_id. Returns: object

audit_urlA

Audit a single live web page for WCAG 2.2 accessibility (GOV.UK standard).

Loads the URL in headless Chromium, optionally performs interaction steps first, then runs the chosen engines plus GOV.UK-specific checks. Returns structured JSON, a Markdown report and a GDS-style compliance summary.

Args: url: The page URL to audit (http/https). level: WCAG level: "A", "AA" (default, GOV.UK requirement) or "AAA". engines: Subset of ["axe","pa11y","lighthouse","ibm"]. Defaults to ["axe"]. steps: Optional interactions before auditing, each {"action": "click|fill|wait|press|navigate", "selector": ..., "value": ..., "ms": ...}. include_best_practice: Also run axe "best-practice" rules (not WCAG).

Inputs: url (required), level, steps, engines, +1 more. Returns: object

axe_check_ruleB

Check a specific axe-core rule by ID.

Replaces 100+ individual axe_* tools with one generic tool. Call list_axe_rules to see available rule IDs.

Args: rule_id: The axe-core rule ID to check (e.g. 'color-contrast'). url: URL to audit (one of url, html, or session_id required). html: HTML string to audit. session_id: Existing browser session to audit.

Inputs: rule_id (required), url, html, session_id. Returns: object

browser_clickC

Click an element (CSS selector) in a session's page.

Inputs: selector (required), session_id (required). Returns: object

browser_closeA

Close a stateful browser session and free its resources.

Inputs: session_id (required). Returns: object

browser_fillC

Fill a form field (CSS selector) with a value in a session's page.

Inputs: value (required), selector (required), session_id (required). Returns: object

browser_navigateC

Navigate a session's page to a URL.

Inputs: url (required), session_id (required). Returns: object

browser_openA

Open a new stateful browser session and return its session_id.

Use the session_id with browser_navigate / browser_click / browser_fill / browser_wait / browser_snapshot / audit_current_page, then browser_close. Lets you audit pages behind logins or multi-step journeys.

Inputs: no named parameters. Returns: object

browser_snapshotA

Return the current url, title and visible text of a session's page.

Inputs: session_id (required). Returns: object

browser_waitC

Wait for a selector to appear, or for a number of milliseconds.

Inputs: session_id (required), ms, selector. Returns: object

generate_accessibility_statementA

Draft a GOV.UK-format accessibility statement from an audit.

Provide either audit_id (from a previous audit tool call) or url (to audit now).

Args: audit_id: Id returned by a previous audit tool call. url: URL to audit now if no audit_id is given. service_name: Name of the service (statement heading). organisation: Organisation running the website. contact_email: Accessibility contact email. website_url: The website/service URL the statement covers. audit_date: Date the audit was carried out.

Inputs: url, audit_id, audit_date, website_url, +3 more. Returns: object

list_automated_checksA

List the WCAG criteria that CAN be automated, with the axe rules behind each.

These are the criteria the automated-check tools (check_wcag_ and audit_automated_checks) can verify. Each also names its per-criterion tool.

Args: level: Highest conformance level to include: "A" or "AA" (default).

Inputs: level. Returns: object

list_axe_rulesA

List the axe-core rules, each of which is also exposed as its own tool.

Args: wcag_only: If true, only rules tagged with a WCAG conformance level.

Inputs: wcag_only. Returns: object

list_enginesA

List the available audit engines and whether the Node engines are installed.

Inputs: no named parameters. Returns: object

list_groupsA

List the grouped audit tools and which axe rules each runs.

Two grouping schemes: by WCAG principle (audit_perceivable / audit_operable / audit_understandable / audit_robust) and by axe category (audit_group_).

Inputs: no named parameters. Returns: object

list_manual_checksA

List the WCAG criteria that CANNOT be automated and need human review.

These have no axe-core coverage; automated tools cannot verify them, so they must be assessed manually (e.g. keyboard operation, focus order, captions, and several of the new WCAG 2.2 criteria). Honest scoping for compliance claims.

Args: level: Highest conformance level to include: "A" or "AA" (default).

Inputs: level. Returns: object

list_wcag_rulesB

List the WCAG success criteria checked, with automation coverage.

Returns each criterion's number, name, level, automation (full/partial/manual), whether it is new in WCAG 2.2, and its W3C Understanding URL.

Args: version: WCAG version (informational; this server targets 2.2). level: Highest conformance level to include: "A" or "AA" (default).

Inputs: level, version. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 41 tools

    Disambiguation4/5

    Tools are largely distinct with clear descriptions, but some overlap exists (e.g., audit_automated_checks vs audit_axe, or audit_url vs audit_current_page). The group and principle audits are well separated.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with underscores (audit_*, browser_*, list_*, etc.). No mix of styles, highly predictable.

    Tool Count3/5

    41 tools is on the high side but justified by the breadth of accessibility auditing (multiple engines, groups, principles, site crawl, browser session). Could be streamlined but not excessive.

    Completeness5/5

    The tool surface covers automated checks, manual checks, multiple engines, site crawling, browser interactions, rule listing, and statement generation. No obvious gaps for the intended domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables AI agents to perform comprehensive accessibility audits on websites using Playwright and axe-core against WCAG standards. Provides detailed compliance reports with violation summaries and remediation guidance across multiple browsers.
      3
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables automated WCAG 2.2 AA accessibility audits of Figma designs and webpages. Generates detailed markdown reports with severity-grouped violations, specific criterion references, and concrete fix recommendations.
      -