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

The MCP Accessibility Scanner is a powerful tool that enables automated web accessibility testing through the Model Context Protocol. It combines Playwright for browser automation with Axe-core for WCAG compliance checks, allowing you to perform comprehensive accessibility assessments, capture annotated screenshots, and generate detailed reports.

Installation Options

NPM Installation

Install the package globally using npm:

npm install -g mcp-accessibility-scanner

VS Code Integration

Add the Accessibility Scanner to VS Code using the VS Code 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"]}'

Configuration

Basic Configuration

For Claude Desktop, add this to your configuration:

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

Advanced Configuration

For more control, you can use a configuration file:

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

Custom Configuration Options

Create a config.json file with your preferred settings:

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

Key configuration options include:

  • Browser selection: chromium, firefox, or webkit
  • Headless mode toggle
  • Browser channel selection
  • Custom timeout settings
  • Network filtering for allowed and blocked origins

Available Tools

Accessibility Tools

scan_page

Performs comprehensive accessibility scans:

{
  "violationsTag": ["wcag21aa", "cat.color"]
}

Supported violation tags include:

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

Navigation Tools

browser_navigate

Navigate to a specific URL:

{
  "url": "https://example.com"
}

browser_navigate_back

Go back to the previous page (no parameters required).

browser_navigate_forward

Go forward to the next page (no parameters required).

Page Interaction Tools

browser_snapshot

Capture an accessibility snapshot of the current page (better than screenshots for analysis).

browser_click

Click on a page element:

{
  "element": "Sign In button",
  "ref": "elementReference123",
  "doubleClick": false
}

browser_type

Enter text into form fields:

{
  "element": "Email field",
  "ref": "elementReference123",
  "text": "[email protected]",
  "submit": true
}

browser_hover

Hover over an element:

{
  "element": "Dropdown menu",
  "ref": "elementReference123"
}

Visual Tools

browser_take_screenshot

Capture screenshots:

{
  "filename": "login-page.png",
  "element": "Login form",
  "ref": "elementReference123"
}

browser_pdf_save

Save page as PDF:

{
  "filename": "report.pdf"
}

Tab Management

browser_tab_list

List all open browser tabs (no parameters required).

browser_tab_new

Open a new tab:

{
  "url": "https://example.com"
}

browser_tab_select

Switch between tabs:

{
  "index": 2
}

Monitoring Tools

browser_console_messages

View console logs (no parameters required).

browser_network_requests

Monitor network activity (no parameters required).

Usage Examples

Basic Accessibility Scan

1. Navigate to a website:
   browser_navigate with url: "https://example.com"

2. Run accessibility scan:
   scan_page with violationsTag: ["wcag21aa"]

Complete Form Evaluation

1. Navigate to form page:
   browser_navigate with url: "https://example.com/contact"

2. Capture accessibility snapshot:
   browser_snapshot

3. Click on name field:
   browser_click with element: "Name field", ref: "ref123"

4. Enter name:
   browser_type with element: "Name field", ref: "ref123", text: "John Doe"

5. Check form accessibility:
   scan_page with violationsTag: ["cat.forms"]

6. Take screenshot of results:
   browser_take_screenshot

Multi-tab Testing

1. Open main site:
   browser_navigate with url: "https://example.com"

2. Open new tab for comparison:
   browser_tab_new with url: "https://competitor.com"

3. Switch to first tab:
   browser_tab_select with index: 0

4. Run accessibility scan on first site:
   scan_page with violationsTag: ["wcag21aa"]

5. Switch to second tab:
   browser_tab_select with index: 1

6. Run accessibility scan on second site:
   scan_page with violationsTag: ["wcag21aa"]

Waiting for Dynamic Content

1. Navigate to site with dynamic content:
   browser_navigate with url: "https://example.com/app"

2. Wait for content to load:
   browser_wait_for with text: "Dashboard loaded"

3. Capture accessibility snapshot:
   browser_snapshot

4. Run accessibility scan:
   scan_page with violationsTag: ["wcag21aa"]

Remember to always capture a snapshot with browser_snapshot before attempting to interact with page elements, as most interaction tools require element references from these snapshots.

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