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.
First, install the main package dependencies:
npm install
Then install the test site dependencies:
cd test-site
npm install
cd ..
Build and start the MCP server with:
npm run build
npm start
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
.
The tool accepts two input formats:
https://example.com
)http://localhost:5000
(e.g., /about
)a11y
command
from the dropdownnode path/to/cursor-a11y-mcp/index/file/in/build/folder
(Replace with the absolute path to your index.js file in the build folder)Add
Start the test site:
npm run start:test-site
In Cursor's Composer, type use a11y tool
Composer will prompt you to run the tool
Review accessibility violations in the response along with suggested code actions
You may be prompted to run the tool again to verify fixes
The accessibility testing provides detailed violation reports including:
These reports help you identify and fix accessibility issues according to web accessibility standards.
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.
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"
]
}
}
}
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.
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.