Accessibility Scanner MCP server

Integrates Axe Core with Playwright to perform automated web accessibility testing, enabling continuous integration, compliance auditing, and identification of accessibility barriers.
Back to servers
Setup instructions
Provider
Justas Monkevicius
Release date
Jan 26, 2025
Language
TypeScript
Stats
15 stars

This MCP Accessibility Scanner serves as a powerful Model Context Protocol server that enables LLMs to perform automated web accessibility testing and browser automation using Playwright and Axe-core. The server can conduct WCAG compliance checks, interact with web pages, and generate detailed accessibility reports with visual annotations.

Installation Options

Using NPM

Install the package globally using npm:

npm install -g mcp-accessibility-scanner

Adding to VS Code

Add the Accessibility Scanner to VS Code using the CLI:

For standard VS Code:

code --add-mcp '{"name":"accessibility-scanner","command":"npx","args":["mcp-accessibility-scanner"]}'

For VS Code Insiders:

code-insiders --add-mcp '{"name":"accessibility-scanner","command":"npx","args":["mcp-accessibility-scanner"]}'

Claude Desktop Configuration

Configure Claude Desktop to use the accessibility scanner:

{
  "mcpServers": {
    "accessibility-scanner": {
      "command": "npx",
      "args": ["-y", "mcp-accessibility-scanner"]
    }
  }
}

Available Tools

Accessibility Scanning

Scan Page

The core accessibility scanning function allows comprehensive WCAG testing:

scan_page

Parameters:

  • violationsTag: Array of WCAG/violation tags to check

Supported Violation Tags:

  • WCAG standards: wcag2a, wcag2aa, wcag2aaa, wcag21a, wcag21aa, wcag21aaa, wcag22a, wcag22aa, wcag22aaa
  • Section 508: section508
  • Categories: cat.aria, cat.color, cat.forms, cat.keyboard, and many more

Browser Navigation Tools

Navigate through web pages with these functions:

browser_navigate
browser_navigate_back
browser_navigate_forward

Parameters for browser_navigate:

  • url: The URL to navigate to (string)

Page Interaction Tools

Interact with elements on the page:

browser_snapshot
browser_click
browser_type
browser_hover
browser_drag
browser_select_option
browser_press_key

Most interactions require element references from a snapshot. Example parameters:

  • For browser_click: element (description), ref (element reference), doubleClick (optional)
  • For browser_type: element, ref, text, submit (optional), slowly (optional)

Visual Tools

Capture visual content from the page:

browser_take_screenshot
browser_pdf_save

Parameters for browser_take_screenshot:

  • raw (optional)
  • filename (optional)
  • element (optional)
  • ref (optional)

Browser Management

Manage the browser state:

browser_close
browser_resize

Parameters for browser_resize:

  • width: Desired width in pixels
  • height: Desired height in pixels

Tab Management

Work with multiple browser tabs:

browser_tab_list
browser_tab_new
browser_tab_select
browser_tab_close

Information & Monitoring

Get diagnostic information:

browser_console_messages
browser_network_requests

Utility Tools

Additional useful functions:

browser_wait_for
browser_handle_dialog
browser_file_upload

Vision Mode Tools

Coordinate-based interaction for complex scenarios:

browser_screen_capture
browser_screen_move_mouse
browser_screen_click
browser_screen_drag
browser_screen_type

Usage Examples

Basic Accessibility Scan

1. Navigate to example.com using browser_navigate
2. Run scan_page with violationsTag: ["wcag21aa"]

Color Contrast Check

1. Use browser_navigate to go to example.com
2. Run scan_page with violationsTag: ["cat.color"]

Multi-step Workflow

1. Navigate to example.com with browser_navigate
2. Take a browser_snapshot to see available elements
3. Click the "Sign In" button using browser_click
4. Type "[email protected]" using browser_type
5. Run scan_page on the login page
6. Take a browser_take_screenshot to capture the final state

Page Analysis

1. Navigate to example.com
2. Use browser_snapshot to capture all interactive elements
3. Review console messages with browser_console_messages
4. Check network activity with browser_network_requests

Tab Management

1. Open a new tab with browser_tab_new
2. Navigate to different pages in each tab
3. Switch between tabs using browser_tab_select
4. List all tabs with browser_tab_list

Waiting for Dynamic Content

1. Navigate to a page
2. Use browser_wait_for to wait for specific text to appear
3. Interact with the dynamically loaded content

Note: Most interaction tools require element references from browser_snapshot. Always capture a snapshot before attempting to interact with page elements.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "accessibility-scanner" '{"command":"npx","args":["-y","mcp-accessibility-scanner"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "accessibility-scanner": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-accessibility-scanner"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "accessibility-scanner": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-accessibility-scanner"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later