Web Accessibility MCP Server
Web Accessibility MCP Server
An MCP (Model Context Protocol) server that provides web accessibility analysis capabilities using axe-core and Puppeteer.
<a href="https://glama.ai/mcp/servers/mya2mkxy9a"><img width="380" height="200" src="https://glama.ai/mcp/servers/mya2mkxy9a/badge" alt="Web Accessibility Server MCP server" /></a>
Features
- Analyze web accessibility of any URL using axe-core
- Simulate color blindness (protanopia, deuteranopia, tritanopia) using color matrices
- Detailed reporting of accessibility violations
- Support for custom user agents and selectors
- Debug logging for troubleshooting
- Comprehensive accessibility checks based on WCAG guidelines
Prerequisites
- Node.js (v14 or higher)
- npm
Installation
Installing via Smithery
To install Web Accessibility MCP Server for Claude Desktop automatically via Smithery:
Manual Installation
- Clone the repository:
- Install dependencies:
- Build the server:
Configuration
Add the server to your MCP settings file (typically located at ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
):
Usage
The server provides two tools: check_accessibility
for analyzing web accessibility and simulate_colorblind
for simulating color blindness.
Tool: check_accessibility
Checks the accessibility of a given URL using axe-core.
Parameters
url
(required): The URL to analyzewaitForSelector
(optional): CSS selector to wait for before analysisuserAgent
(optional): Custom user agent string for the request
Example Usage
Tool: simulate_colorblind
Simulates how a webpage appears to users with different types of color blindness using color matrix transformations.
Color Blindness Types
The tool supports three types of color blindness simulation:
- Protanopia (red-blind) - Uses matrix:Copy
- Deuteranopia (green-blind) - Uses matrix:Copy
- Tritanopia (blue-blind) - Uses matrix:Copy
Parameters
url
(required): The URL to capturetype
(required): Type of color blindness to simulate ('protanopia', 'deuteranopia', or 'tritanopia')outputPath
(optional): Custom path for the screenshot outputuserAgent
(optional): Custom user agent string for the request
Example Usage
Response Format
check_accessibility Response
simulate_colorblind Response
Error Handling
The server includes comprehensive error handling for common scenarios:
- Network errors
- Invalid URLs
- Timeout issues
- DNS resolution problems
Error responses will include detailed messages to help diagnose the issue.
Development
Project Structure
Building
This will:
- Compile TypeScript to JavaScript
- Make the output file executable
- Place the compiled files in the
build
directory
Debugging
The server includes detailed debug logging that can be observed in the console output. This includes:
- Network requests and responses
- Page loading status
- Selector waiting status
- Any console messages from the analyzed page
- Color simulation progress
Common Issues and Solutions
- Timeout Errors
- Increase the timeout value in the code
- Check network connectivity
- Verify the URL is accessible
- DNS Resolution Errors
- Verify the URL is correct
- Check network connectivity
- Try using the www subdomain
- Selector Not Found
- Verify the selector exists on the page
- Wait for dynamic content to load
- Check the page source for the correct selector
- Color Simulation Issues
- Ensure the page's colors are specified in a supported format (RGB, RGBA, or HEX)
- Check if the page uses dynamic color changes (may require additional wait time)
- Verify the screenshot output directory exists and is writable
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
You must be authenticated.
Provides web accessibility analysis and color blindness simulation using axe-core and Puppeteer, enabling detailed accessibility checks and visual simulations based on WCAG guidelines.