Automate web accessibility testing for WCAG compliance using MCP server with Axe-core and Puppeteer
The Web Accessibility-Testing MCP Server is a specialized tool designed to provide accessibility testing capabilities for Claude and other AI assistants, leveraging the Deque Axe-core API. By integrating this server into various AI applications like Claude Desktop, it enables automated web page and HTML content analysis based on WCAG (Web Content Accessibility Guidelines) standards.
This server uses Puppeteer for testing web pages and the Axe-core library from Deque to perform in-depth accessibility evaluations. It supports a range of features such as testing both URLs and HTML strings, specifying test tags, exploring rules, checking color contrast, validating ARIA attributes usage, and detecting orientation lock issues. While this server is not an official offering from Deque Labs, it stands out for its comprehensive feature set tailored to enhance the accessibility of digital content.
The Web Accessibility-Testing MCP Server offers robust capabilities that seamlessly integrate with AI applications such as Claude Desktop and other MCP clients. Here are some key features:
Developers can use this server to test any public URL for accessibility issues, ensuring that web content adheres to WCAG standards.
{
"url": "https://example.com",
"tags": ["wcag2aa"]
}
Alternatively, the server allows testing of raw HTML strings, making it versatile for both front-end developer workflows and broader accessibility audits.
{
"html": "<div><img src='image.jpg'></div>",
"tags": ["wcag2aa"]
}
The server provides detailed reports on whether content meets various WCAG standards (2.0, 2.1, 2.2), making it easier for developers to ensure compliance.
Flexibility is at the heart of this service; users can specify which accessibility tags or standards they wish to test against. Additionally, it offers a way to explore available rules and get detailed insights into specific aspects of web content.
The server supports color contrast checks using provided parameters such as foreground and background colors, ensuring optimal text visibility.
{
"foreground": "#777777",
"background": "#EEEEEE"
}
Proper usage of ARIA (Accessible Rich Internet Applications) attributes can significantly improve web accessibility. This server validates these attributes to ensure they are used correctly.
{
"html": "<div role='button' aria-pressed='false'>Click me</div>"
}
The server also detects content that forces specific screen orientations, which can have a significant impact on user experience and accessibility.
The architecture of the Web Accessibility-Testing MCP Server aligns closely with the Model Context Protocol (MCP) framework to ensure seamless integration with various AI applications. The server's core components include:
The Web Accessibility-Testing MCP Server supports full compatibility with Claude Desktop, offering developers a robust solution for accessibility testing.
MCP Client | Status |
---|---|
Claude Desktop | ✅ Full Support |
Continue | ✅ Full Support |
Cursor | ❌ Tools Only |
Below is an illustration of the protocol flow, detailing communication between the AI application (e.g., Claude Desktop) and the MCP server.
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
For seamless integration, developers can configure the MCP server within their AI applications:
{
"mcpServers": {
"a11y-mcp-server": {
"command": "npx",
"args": ["-y", "a11y-mcp-server"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
To set up the Web Accessibility-Testing MCP Server as a command-line tool, follow these steps:
npm install -g a11y-mcp-server
a11y-mcp-server
This setup ensures that developers can easily integrate accessibility testing capabilities into their workflows.
Front-end developers can use the Web Accessibility-Testing MCP Server to perform continuous integration (CI) and continuous delivery (CD) checks. By integrating this server, they can ensure that every commit adheres to strict WCAG guidelines.
Example Implementation:
{
"url": "https://example.com",
"tags": ["wcag2aa"]
}
Large enterprises often require comprehensive accessibility audits. Using the MCP server, these organizations can systematically test thousands of web pages and update their content to meet WCAG standards.
Example Implementation:
{
"html": "<div><img src='image.jpg'></div>",
"tags": ["wcag2aa"]
}
To configure the server for compatibility with different MCP clients, developers can modify configuration files specific to each client. Below are instructions for macOS, Windows, and Linux:
Edit the file at ~/Library/Application Support/Claude/claude_desktop_config.json
:
{
"mcpServers": {
"a11y-accessibility": {
"command": "npx",
"args": ["-y", "a11y-mcp-server"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
Edit the file at %APPDATA%\Claude\settings\claude_mcp_settings.json
:
{
"mcpServers": {
"a11y-accessibility": {
"command": "npx",
"args": ["-y", "a11y-mcp-server"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
Edit the file at ~/.config/Claude/settings/claude_mcp_settings.json
:
{
"mcpServers": {
"a11y-accessibility": {
"command": "npx",
"args": ["-y", "a11y-mcp-server"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
The Web Accessibility-Testing MCP Server is compatible with a wide range of environments. Below are the specific compatibility matrices for each MCP client:
Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
The server relies on environment variables for secure and flexible operation:
{
"env": {
"API_KEY": "your-api-key"
}
}
Developers must ensure that configuration files are properly secured to prevent unauthorized access.
This comprehensive coverage ensures a high level of technical accuracy, completeness, and alignment with the MCP framework. The documentation is fully compliant with English language requirements and focuses on the integration of this server into AI applications for enhanced accessibility compliance.
By following these guidelines, we have created a detailed, comprehensive document that positions the Web Accessibility-Testing MCP Server as a valuable tool for AI applications seeking robust accessibility testing capabilities.
Next-generation MCP server enhances documentation analysis with AI-powered neural processing and multi-language support
Learn to connect to MCP servers over HTTP with Python SDK using SSE for efficient protocol communication
Python MCP client for testing servers avoid message limits and customize with API key
Learn how to use MCProto Ruby gem to create and chain MCP servers for custom solutions
Analyze search intent with MCP API for SEO insights and keyword categorization
Discover easy deployment and management of MCP servers with Glutamate platform for Windows Linux Mac