The MCP Accessibility Scanner provides automated web accessibility scanning and browser automation using Playwright and Axe-core. It enables LLMs to perform WCAG compliance checks, interact with web pages, manage browser sessions, and generate detailed accessibility reports with visual annotations.
npm install -g mcp-accessibility-scanner
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"]}'
{
"mcpServers": {
"accessibility-scanner": {
"command": "npx",
"args": ["-y", "mcp-accessibility-scanner"]
}
}
}
You can customize the server behavior by providing a configuration file:
{
"mcpServers": {
"accessibility-scanner": {
"command": "npx",
"args": ["-y", "mcp-accessibility-scanner", "--config", "/path/to/config.json"]
}
}
}
Create a config.json file with these options:
{
"browser": {
"browserName": "chromium",
"launchOptions": {
"headless": true,
"channel": "chrome"
}
},
"timeouts": {
"navigationTimeout": 60000,
"defaultTimeout": 5000
},
"network": {
"allowedOrigins": ["example.com", "trusted-site.com"],
"blockedOrigins": ["ads.example.com"]
}
}
Available configuration options include:
scan_pagePerforms comprehensive accessibility scanning using Axe-core.
Parameters:
violationsTag: Array of WCAG/violation tags to checkSupported violation tags include:
wcag2a, wcag2aa, wcag2aaa, wcag21a, wcag21aa, etc.cat.aria, cat.color, cat.forms, cat.keyboard, etc.section508browser_navigateNavigate to a URL.
url (string)browser_navigate_backGo back to previous page.
browser_navigate_forwardGo forward to next page.
browser_snapshotCapture accessibility snapshot of the current page.
browser_clickClick on a page element.
element (description), ref (element reference), doubleClick (optional)browser_typeType text into an element.
element, ref, text, submit (optional), slowly (optional)browser_hoverHover over element.
element, refbrowser_dragPerform drag and drop.
startElement, startRef, endElement, endRefbrowser_select_optionSelect dropdown options.
element, ref, values (array)browser_press_keyPress keyboard keys.
key (e.g., 'ArrowLeft' or 'a')browser_take_screenshotCapture screenshots.
raw (optional), filename (optional), element (optional), ref (optional)browser_pdf_saveSave page as PDF.
filename (optional)browser_tab_listList all open tabs.
browser_tab_newOpen a new tab.
url (optional)browser_tab_selectSelect a tab by index.
indexbrowser_tab_closeClose a tab.
index (optional)browser_console_messagesGet console messages from the page.
browser_network_requestsGet network request information.
browser_wait_forWait for conditions.
time (optional), text (optional), textGone (optional)browser_handle_dialogHandle browser dialogs.
accept (boolean), promptText (optional)browser_file_uploadUpload files.
paths (array of file paths)browser_screen_captureTake screenshot for coordinate interaction.
browser_screen_move_mouseMove mouse to coordinates.
element, x, ybrowser_screen_clickClick at coordinates.
element, x, y1. Navigate to example.com using browser_navigate
2. Run scan_page with violationsTag: ["wcag21aa"]
1. Use browser_navigate to go to example.com
2. Run scan_page with violationsTag: ["cat.color"]
1. Navigate to example.com with browser_navigate
2. Take a browser_snapshot to see available elements
3. Click the "Sign In" button using browser_click
4. Type "[email protected]" using browser_type
5. Run scan_page on the login page
6. Take a browser_take_screenshot to capture the final state
1. Navigate to example.com
2. Use browser_snapshot to capture all interactive elements
3. Review console messages with browser_console_messages
4. Check network activity with browser_network_requests
1. Open a new tab with browser_tab_new
2. Navigate to different pages in each tab
3. Switch between tabs using browser_tab_select
4. List all tabs with browser_tab_list
1. Navigate to a page
2. Use browser_wait_for to wait for specific text to appear
3. Interact with the dynamically loaded content
Note: Most interaction tools require element references from browser_snapshot. Always capture a snapshot before attempting to interact with page elements.
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.
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": {
"accessibility-scanner": {
"command": "npx",
"args": [
"-y",
"mcp-accessibility-scanner"
]
}
}
}
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.json2. 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