
用于网页无障碍测试的MCP服务器(10k+下载,ProductHunt上的#20)
概览
https://github.com/user-attachments/assets/316c6d44-e677-433e-b4d5-63630b4bab2b A11y MCP 是一个 MCP(模型上下文协议)服务器,为大型语言模型提供了访问网络无障碍测试 API 的权限。 该服务器使用 Deque Axe-core API 和 Puppeteer,允许大型语言模型分析网页内容以符合 WCAG 标准并识别无障碍问题。 这不是Deque Labs官方的MCP服务器。 - : 测试任意公共URL是否有可自定义视口尺寸的无障碍问题 - : 测试原始HTML字符串的无障碍问题 - : 根据各种WCAG标准(2.0、2.1、2.2)核对内容 - : 指定要测试的无障碍标签/标准 - : 获取可用无障碍规则信息 - : 检查颜色组合是否符合WCAG - : 测试ARIA属性的正确使用 - : 识别强制特定屏幕方向的内容 - Node.js 18 或更高版本 - 兼容 MCP 的客户端(Claude Desktop、Claude Code、VS Code、Cursor 等)。
概述(AI 翻译)
https://github.com/user-attachments/assets/316c6d44-e677-433e-b4d5-63630b4bab2b
A11y MCP 是一个 MCP(模型上下文协议)服务器,为大型语言模型提供了访问网络无障碍测试 API 的权限。
该服务器使用 Deque Axe-core API 和 Puppeteer,允许大型语言模型分析网页内容以符合 WCAG 标准并识别无障碍问题。
注: 这不是Deque Labs官方的MCP服务器。
特色
- 测试网页:测试任何公共URL是否有可自定义视口尺寸的无障碍问题
- 测试HTML摘要:测试原始HTML字符串以识别无障碍问题
- WCAG合规测试:将内容与各种WCAG标准(2.0、2.1、2.2)进行核对
- 可定制测试:指定测试对象为哪些无障碍标签/标准
- 规则探索:获取可用的无障碍规则信息
- 色彩对比分析:检查颜色组合是否符合WCAG
- ARIA 验证:测试 ARIA 属性的正确使用
- 方向锁定检测:识别强制特定屏幕方向的内容
安装
先决条件
- Node.js 18岁及以上
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Web Accessibility-Testing MCP Server (A11y MCP)
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:
{
"mcpServers": {
"a11y-accessibility": {
"command": "npx",
"args": ["-y", "a11y-mcp-server"]
}
}
}
Claude Code (CLI)
claude mcp add a11y-accessibility -- npx -y a11y-mcp-server
This registers the server for the current project. To make it available across all projects:
claude mcp add --scope user a11y-accessibility -- npx -y a11y-mcp-server
安装
npx -y a11y-mcp-server配置
{
"mcpServers": {
"a11y-accessibility": {
"command": "npx",
"args": ["-y", "a11y-mcp-server"]
}
}
}