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.
To use the A11y MCP server with Claude Desktop, you need to configure it in your MCP settings:
Edit the configuration file at ~/Library/Application Support/Claude/claude_desktop_config.json
:
{
"mcpServers": {
"a11y-accessibility": {
"command": "npx",
"args": [
"-y",
"a11y-mcp-server"
]
}
}
}
Edit the configuration file at %APPDATA%\Claude\settings\claude_mcp_settings.json
Edit the configuration file at ~/.config/Claude/settings/claude_mcp_settings.json
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 testtags
(optional): Array of WCAG tags to test against (e.g., ["wcag2aa"])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 testtags
(optional): Array of WCAG tags to test againstVerify 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)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 usageIdentify 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 issuesGet information about available accessibility rules with the get_rules
tool.
The server returns accessibility test results in a structured JSON format, which includes:
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"
}
}
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.
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 > 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"
]
}
}
}
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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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