Skip to main content
Glama

A11y Expert MCP

IMPORTANT

Archived. Superseded by accessibility-evidence-engine. Its pattern lookup lives on there as the explain tool of @aee/mcp, which reads the patterns from a11y-skills, their one source. This repository is read-only and kept for its history.

PyPI version Python 3.11+

An accessibility expert for your AI coding assistant. This MCP (Model Context Protocol) server gives AI tools like Claude, Cursor, and Windsurf real-time access to WAI-ARIA patterns, code review, contrast checking, and WCAG guidance β€” so the code they write is accessible from the start.

What's Inside

πŸ”§ Tools

Tool

What it does

get_pattern

Get the full WAI-ARIA implementation pattern for any UI component β€” roles, states, keyboard interaction, and code examples.

review_code

Paste HTML/JSX/TSX/Vue/Svelte code and get a list of accessibility issues with specific fixes and WCAG references. Detects 10+ anti-patterns including missing labels, click-on-divs, broken heading hierarchy, missing dialog roles, and more.

list_patterns

See all 33 component patterns available in the knowledge base.

check_contrast

Check any two hex colors against WCAG AA and AAA contrast requirements for both normal and large text.

πŸ“š Knowledge Base (33 Components)

Every pattern comes from the WAI-ARIA Authoring Practices and includes roles, states, properties, keyboard interaction, and code examples.

Canonical source: The 33 pattern instruction files in this server are synced from a11y-skills, the community-maintained source of truth. If you want to contribute a new pattern or improve an existing one, open the PR there.

Accordion

Alert

Alert Dialog

Breadcrumbs

Buttons

Carousel

Checkbox

Combobox

Dialog (Modal)

Disclosure

Feed

Grid

Headings

Image Labeling

Landmarks

Link

Listbox

Menu

Menu Button

Meter

Radio

Slider

Slider (Multi-thumb)

Spinbutton

Switch

Tables

Tabs

Toolbar

Tooltip

Treeview

Treegrid

Window Splitter

Accessibility (General)

πŸ’¬ Prompts

Pre-built workflows your AI assistant can use:

Prompt

What it does

audit-component

Step-by-step accessibility audit β€” checks ARIA, keyboard, focus, contrast, headings, touch targets. Provide code + optional component type.

make-accessible

Rewrites inaccessible code into a fully accessible implementation with WAI-ARIA patterns and comments explaining every change.

check-form-accessibility

Form-specific audit β€” labels, required fields, error handling, fieldsets, autocomplete, tab order, and submit feedback.

wcag-checklist

Generates a WCAG 2.2 compliance checklist (AA or AAA) organized by principle, tailored to your page or component.

aria-guide

Complete ARIA implementation guide for a component β€” roles, attributes, keyboard table, focus management, screen reader script, and code example.

πŸ“– Resources

Browsable knowledge base for MCP clients:

  • a11y://patterns β€” Index of all 33 component patterns

  • a11y://patterns/{component} β€” Full pattern detail for any component

Related MCP server: @accesslint/mcp

Installation

Prerequisites

  • Python 3.11+

  • uv (recommended) or pip

Option 1: Run directly with uvx (no install needed)

uvx a11y-expert-mcp

Option 2: Install with pip

pip install a11y-expert-mcp

Then run:

a11y-expert-mcp

Option 3: Run from source

git clone https://github.com/Elizabeth1979/a11y-expert-mcp.git
cd a11y-expert-mcp
uv run a11y-expert-mcp

Configuration

Claude Desktop / Claude Code

Add to your MCP config (~/.claude/config.json or Claude Desktop settings):

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

Or if running from source:

{
  "mcpServers": {
    "a11y": {
      "command": "uv",
      "args": [
        "run",
        "--project",
        "/path/to/a11y-expert-mcp",
        "a11y-expert-mcp"
      ]
    }
  }
}

Cursor / Windsurf / Other MCP Clients

Use the same command and args β€” check your editor's MCP configuration docs for the exact config file location.

Usage Examples

Once connected, your AI assistant can:

Get an accessible pattern:

"How do I build an accessible tabs component?" β†’ The assistant calls get_pattern("tabs") and gets the full WAI-ARIA pattern with keyboard interaction and code.

Review code for issues:

"Check this modal for accessibility problems" β†’ The assistant calls review_code(code, component_type="modal") and gets specific issues with fixes.

Check color contrast:

"Does #666 on #fff pass WCAG?" β†’ The assistant calls check_contrast("#666", "#fff") and gets AA/AAA results for normal and large text.

Generate a WCAG checklist:

"Give me a WCAG AA checklist for my checkout page" β†’ The assistant uses the wcag-checklist prompt to generate a tailored compliance checklist.

How It Works

The server bundles 33 WAI-ARIA pattern documents as a knowledge base. When your AI assistant asks about a component, it gets the real specification β€” not hallucinated ARIA attributes. The review_code tool runs 10+ static checks for common anti-patterns (click handlers on divs, missing labels, broken heading hierarchy, positive tabindex, etc.) and cross-references relevant patterns.

No external API calls. No database. Everything runs locally.

Tech Stack

  • MCP SDK (FastMCP)

  • Python 3.11+

  • WAI-ARIA Authoring Practices knowledge base (bundled markdown files)

Part of a broader accessibility engineering toolkit. Pair this with:

  • screen-reader-cli β€” CLI for screen-reader-driven testing. Where a11y-expert-mcp gives your AI assistant static guidance (patterns, code review), screen-reader-cli runs live screen-reader checks against real pages using Virtual Screen Reader + Playwright. Static + runtime = full coverage.

  • a11y-skills β€” Canonical source for the pattern instruction files this server serves.

  • a11y-engineering-toolkit β€” Umbrella repo with browser-side audit panel + UX widget, plus the full portfolio map.

License

MIT

Author

Elli (@Elizabeth1979)

Available Tools

4 tools
check_contrastA

Check if two colors meet WCAG contrast ratio requirements.

Args:
    foreground: Foreground color as hex (e.g., "#333333" or "333").
    background: Background color as hex (e.g., "#ffffff" or "fff").

Returns:
    Contrast ratio and pass/fail for WCAG AA and AAA levels.

Inputs: foreground (required), background (required). Returns: result

get_patternA

Get the accessible implementation pattern for a UI component.

Args:
    component: The component name (e.g., "modal", "tabs", "combobox",
               "carousel", "menu", "dialog", "tooltip", "alert",
               "switch", "listbox", "treeview", "slider", "feed",
               "grid", "disclosure", "landmarks", "headings", "buttons",
               "link", "spinbutton", "meter", "menu button").

Returns:
    Detailed WAI-ARIA Authoring Practices pattern with code examples,
    keyboard interaction requirements, and ARIA roles/states/properties.

Inputs: component (required). Returns: result

list_patternsA

List all available accessible component patterns.

Returns:
    A list of all component patterns available in the knowledge base.

Inputs: no named parameters. Returns: result

review_codeA

Review code for accessibility issues and suggest fixes.

Args:
    code: The HTML, JSX, TSX, Vue, or Svelte component code to review.
    component_type: Optional hint about what the component is
                    (e.g., "modal", "dropdown", "form").

Returns:
    Accessibility issues found with specific fix suggestions and
    references to WAI-ARIA patterns.

Inputs: code (required), component_type. Returns: result

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 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: color contrast checking, retrieving patterns, listing patterns, and reviewing code. No overlap in functionality.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (check_contrast, get_pattern, list_patterns, review_code), making the API predictable.

    Tool Count5/5

    With 4 tools, the server is well-scoped for its niche. It covers the core needs of an accessibility expert without being too sparse or bloated.

    Completeness4/5

    The server covers contrast checking, pattern reference, and code review. It lacks a dedicated tool for keyboard navigation testing or automated audit, but review_code can handle many issues.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      An MCP server for accessibility auditing that provides WCAG 2.2 criteria lookup, HTML remediation guidance, and automated documentation generation for UI components. It enables users to analyze code snippets for issues and generate professional accessibility audit reports.
      1,271 npm
      MIT
    • A
      license
      A
      quality
      F
      maintenance
      An MCP server for WCAG accessibility auditing in AI coding agents, providing tools to audit HTML, files, URLs, and diffs, plus a prompt for React component auditing.
      5
      2,666 npm
      6
      MIT