Web Accessibility-Testing MCP Server (A11y MCP)
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
https://github.com/user-attachments/assets/316c6d44-e677-433e-b4d5-63630b4bab2b
A11y MCP is an MCP (Model Context Protocol) server that gives LLMs access to web accessibility testing APIs.
This server uses the Deque Axe-core API and Puppeteer to allow LLMs to analyze web content for WCAG compliance and identify accessibility issues.
> **Note:** This is not an official MCP server from Deque Labs.
Features
- **Test web pages**: Test any public URL for accessibility issues with customizable viewport dimensions
- **Test HTML snippets**: Test raw HTML strings for accessibility issues
- **WCAG compliance testing**: Check content against various WCAG standards (2.0, 2.1, 2.2)
- **Customizable tests**: Specify which accessibility tags/standards to test against
- **Rule exploration**: Get information about available accessibility rules
- **Color contrast analysis**: Check color combinations for WCAG compliance
- **ARIA validation**: Test proper usage of ARIA attributes
- **Orientation lock detection**: Identify content that forces specific screen orientations
Installation
Prerequisites
- Node.js 18 or later
- An MCP-compatible client (Claude Desktop, Claude Code, VS Code, Cursor, etc.)
Claude Desktop
Edit your MCP 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
Add the server to the mcpServers object:
Claude Code (CLI)
This registers the server for the current project. To make it available across all projects:
Verify the server is registered:
> **Note:** MCP tools become available after restarting your Claude Code session.
VS Code (Copilot)
Add to your VS Code settings.json or .vscode/settings.json:
Cursor
Add to your Cursor MCP configuration (.cursor/mcp.json):
Windsurf
Add to your Windsurf MCP configuration (~/.codeium/windsurf/mcp_config.json):
Available Tools
test_accessibility
Tests a URL for accessibility issues.
**Parameters:**
| Parameter | Required | Description |
|-----------|----------|-------------|
| url | Yes | The URL of the web page to test |
| tags | No | Array of WCAG tags to test against (e.g., ["wcag2aa"]) |
| width | No | Viewport width in pixels (default: 1280) |
| height | No | Viewport height in pixels (default: 800) |
**Example — desktop viewport (default):**
**Example — mobile viewport (iPhone 12/13):**
test_html_string
Tests an HTML string for accessibility issues.
**Parameters:**
| Parameter | Required | Description |
|-----------|----------|-------------|
| html | Yes | The HTML content to test |
| tags | No | Array of WCAG tags to test against (e.g., ["wcag2aa"]) |
| width | No | Viewport width in pixels (default: 1280) |
| height | No | Viewport height in pixels (default: 800) |
**Example — default viewport:**
**Example — mobile viewport:**
get_rules
Get information about available accessibility rules with optional filtering. Returns an array of rule objects, each containing ruleId, description, help, helpUrl, and tags.