Cursor A11y MCP server

Integrates accessibility testing capabilities using Puppeteer to perform automated WCAG compliance checks and generate remediation suggestions for web applications.
Back to servers
Provider
westsideori
Release date
Feb 13, 2025
Language
TypeScript

This MCP server provides accessibility testing capabilities for AI agents, identifying accessibility issues in web applications using axe-core and Puppeteer. It can test any URL or local development server and provides detailed reports on accessibility violations.

Installation

First, install the main package dependencies:

npm install

Then install the test site dependencies:

cd test-site
npm install
cd ..

Running the Server and Test Site

Starting the MCP Server

Build and start the MCP server with:

npm run build
npm start

Running the Test Site

Launch the included test site (contains intentional accessibility issues for testing):

npm run start:test-site

The test site will be available at http://localhost:5000.

Accessibility Testing

The tool accepts two input formats:

  • A complete URL (e.g., https://example.com)
  • A relative path that will be appended to http://localhost:5000 (e.g., /about)

Setting Up in Cursor

Adding to Cursor's MCP Server Settings

  1. Open Cursor's Settings (⌘ + ,)
  2. Navigate to "Features" > "MCP Servers"
  3. Add a new MCP Server with:
    • Name: a11y
    • Select command from the dropdown
    • Command: node path/to/cursor-a11y-mcp/index/file/in/build/folder (Replace with the absolute path to your index.js file in the build folder)
  4. Click Add

Using in Cursor's Composer

  1. Start the test site:

    npm run start:test-site
    
  2. In Cursor's Composer, type use a11y tool

  3. Composer will prompt you to run the tool

  4. Review accessibility violations in the response along with suggested code actions

  5. You may be prompted to run the tool again to verify fixes

Features and Capabilities

The accessibility testing provides detailed violation reports including:

  • Impact level of each issue
  • Description of the accessibility problem
  • Help text and documentation links
  • Affected HTML elements
  • Failure summaries

These reports help you identify and fix accessibility issues according to web accessibility standards.

How to add this MCP server to 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 > MCP and click "Add new global MCP server".

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

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

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