Axe Accessibility MCP server

Provides accessibility testing capabilities for web content using Axe-core, enabling evaluation of websites and HTML snippets against WCAG standards with detailed violation reports and remediation guidance.
Back to servers
Setup instructions
Provider
Ronan Takizawa
Release date
Apr 26, 2025
Language
TypeScript
Package
Stats
1.3K downloads
16 stars

This MCP server enables Language Models to perform web accessibility testing using the Deque Axe-core API and Puppeteer. It allows testing websites and HTML snippets against WCAG standards to identify accessibility issues and ensure compliance.

Installation

To use the A11y MCP server with Claude Desktop, you need to configure it in your MCP settings:

For macOS

Edit the configuration file at ~/Library/Application Support/Claude/claude_desktop_config.json:

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

For Windows

Edit the configuration file at %APPDATA%\Claude\settings\claude_mcp_settings.json

For Linux

Edit the configuration file at ~/.config/Claude/settings/claude_mcp_settings.json

Available Tools

Testing Web Pages

Test a URL for accessibility issues using the test_accessibility tool:

{
  "url": "https://example.com",
  "tags": ["wcag2aa"]
}

Parameters:

  • url (required): The URL of the web page to test
  • tags (optional): Array of WCAG tags to test against (e.g., ["wcag2aa"])

Testing HTML Snippets

Test raw HTML content for accessibility issues using the test_html_string tool:

{
  "html": "<div><img src='image.jpg'></div>",
  "tags": ["wcag2aa"]
}

Parameters:

  • html (required): The HTML content to test
  • tags (optional): Array of WCAG tags to test against

Checking Color Contrast

Verify if color combinations meet WCAG contrast requirements using the check_color_contrast tool:

{
  "foreground": "#777777",
  "background": "#EEEEEE",
  "fontSize": 16,
  "isBold": false
}

Parameters:

  • foreground (required): Foreground color in hex format (e.g., "#000000")
  • background (required): Background color in hex format (e.g., "#FFFFFF")
  • fontSize (optional): Font size in pixels (default: 16)
  • isBold (optional): Whether the text is bold (default: false)

Validating ARIA Attributes

Check if ARIA attributes are used correctly in HTML using the check_aria_attributes tool:

{
  "html": "<div role='button' aria-pressed='false'>Click me</div>"
}

Parameters:

  • html (required): HTML content to test for ARIA attribute usage

Checking Orientation Locks

Identify content that forces specific screen orientations using the check_orientation_lock tool:

{
  "html": "<html><head><meta name='viewport' content='width=device-width, orientation=portrait'></head><body>Content</body></html>"
}

Parameters:

  • html (required): HTML content to test for orientation lock issues

Exploring Accessibility Rules

Get information about available accessibility rules with the get_rules tool.

Response Format

The server returns accessibility test results in a structured JSON format, which includes:

  • Violations with detailed descriptions
  • Number of passed, incomplete, and inapplicable tests
  • Test environment information
  • Timestamps and URLs

Example response:

{
  "violations": [
    {
      "id": "color-contrast",
      "impact": "serious",
      "description": "Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds",
      "help": "Elements must meet minimum color contrast ratio thresholds",
      "helpUrl": "https://dequeuniversity.com/rules/axe/4.10/color-contrast",
      "affectedNodes": [
        {
          "html": "<div style=\"color: #aaa; background-color: #eee;\">Low contrast text</div>",
          "target": ["div"],
          "failureSummary": "Fix any of the following: Element has insufficient color contrast of 1.98 (foreground color: #aaa, background color: #eee, font size: 12.0pt, font weight: normal)"
        }
      ]
    }
  ],
  "passes": 1,
  "incomplete": 0,
  "inapplicable": 2,
  "timestamp": "2025-04-25T16:45:33.655Z",
  "url": "about:blank",
  "testEngine": {
    "name": "axe-core",
    "version": "4.10.3"
  }
}

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 "a11y-accessibility" '{"command":"npx","args":["-y","a11y-mcp-server"]}'

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": {
        "a11y-accessibility": {
            "command": "npx",
            "args": [
                "-y",
                "a11y-mcp-server"
            ]
        }
    }
}

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": {
        "a11y-accessibility": {
            "command": "npx",
            "args": [
                "-y",
                "a11y-mcp-server"
            ]
        }
    }
}

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