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
25 stars

The MCP Accessibility Scanner provides automated web accessibility scanning and browser automation using Playwright and Axe-core. It enables LLMs to perform WCAG compliance checks, interact with web pages, manage browser sessions, and generate detailed accessibility reports with visual annotations.

Installation Options

Using npm

npm install -g mcp-accessibility-scanner

Adding to VS Code

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"]}'

Configuration

Basic Claude Desktop Configuration

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

Advanced Configuration

You can customize the server behavior by providing a configuration file:

{
  "mcpServers": {
    "accessibility-scanner": {
      "command": "npx",
      "args": ["-y", "mcp-accessibility-scanner", "--config", "/path/to/config.json"]
    }
  }
}

Configuration File Options

Create a config.json file with these options:

{
  "browser": {
    "browserName": "chromium",
    "launchOptions": {
      "headless": true,
      "channel": "chrome"
    }
  },
  "timeouts": {
    "navigationTimeout": 60000,
    "defaultTimeout": 5000
  },
  "network": {
    "allowedOrigins": ["example.com", "trusted-site.com"],
    "blockedOrigins": ["ads.example.com"]
  }
}

Available configuration options include:

  • Browser settings: Select browser type (chromium, firefox, webkit), headless mode, and specific browser channels
  • Timeouts: Control navigation and operation timeouts
  • Network filters: Allow or block specific origins

Available Tools

Accessibility Tools

scan_page

Performs comprehensive accessibility scanning using Axe-core.

Parameters:

  • violationsTag: Array of WCAG/violation tags to check

Supported violation tags include:

  • WCAG standards: wcag2a, wcag2aa, wcag2aaa, wcag21a, wcag21aa, etc.
  • Categories: cat.aria, cat.color, cat.forms, cat.keyboard, etc.
  • Section 508: section508

Navigation Tools

browser_navigate

Navigate to a URL.

  • Parameters: url (string)

browser_navigate_back

Go back to previous page.

browser_navigate_forward

Go forward to next page.

Page Interaction Tools

browser_snapshot

Capture accessibility snapshot of the current page.

browser_click

Click on a page element.

  • Parameters: element (description), ref (element reference), doubleClick (optional)

browser_type

Type text into an element.

  • Parameters: element, ref, text, submit (optional), slowly (optional)

browser_hover

Hover over element.

  • Parameters: element, ref

browser_drag

Perform drag and drop.

  • Parameters: startElement, startRef, endElement, endRef

browser_select_option

Select dropdown options.

  • Parameters: element, ref, values (array)

browser_press_key

Press keyboard keys.

  • Parameters: key (e.g., 'ArrowLeft' or 'a')

Visual Tools

browser_take_screenshot

Capture screenshots.

  • Parameters: raw (optional), filename (optional), element (optional), ref (optional)

browser_pdf_save

Save page as PDF.

  • Parameters: filename (optional)

Tab Management

browser_tab_list

List all open tabs.

browser_tab_new

Open a new tab.

  • Parameters: url (optional)

browser_tab_select

Select a tab by index.

  • Parameters: index

browser_tab_close

Close a tab.

  • Parameters: index (optional)

Information & Monitoring

browser_console_messages

Get console messages from the page.

browser_network_requests

Get network request information.

Utility Tools

browser_wait_for

Wait for conditions.

  • Parameters: time (optional), text (optional), textGone (optional)

browser_handle_dialog

Handle browser dialogs.

  • Parameters: accept (boolean), promptText (optional)

browser_file_upload

Upload files.

  • Parameters: paths (array of file paths)

Coordinate-based Interaction

browser_screen_capture

Take screenshot for coordinate interaction.

browser_screen_move_mouse

Move mouse to coordinates.

  • Parameters: element, x, y

browser_screen_click

Click at coordinates.

  • Parameters: element, x, y

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 Form 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