Web Accessibility MCP Server
An MCP (Model Context Protocol) server that provides web accessibility analysis capabilities using axe-core and Puppeteer.
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
):
Environment Variables
MCP_OUTPUT_DIR
: Directory where screenshot outputs will be saved- Required for the
simulate_colorblind
tool - If not specified, defaults to './output' relative to the current working directory
- Must be an absolute path when configured in MCP settings
- Required for the
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:
- Deuteranopia (green-blind) - Uses matrix:
- Tritanopia (blue-blind) - Uses matrix:
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.
local-only server
The server can only run on the client's local machine because it depends on local resources.
Bietet eine Web-Zugänglichkeitsanalyse und eine Farbenblindheitssimulation mithilfe von Axe-Core und Puppeteer und ermöglicht so detaillierte Zugänglichkeitsprüfungen und visuelle Simulationen basierend auf den WCAG-Richtlinien.
- Merkmale
- Voraussetzungen
- Installation
- Konfiguration
- Verwendung
- Entwicklung
- Häufige Probleme und Lösungen
- Beitragen
- Lizenz
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityEnables LLMs like Claude to navigate the web through Puppeteer-based tools and Steel. Based on the Web Voyager framework, it provides tools for all the standard web actions click clicking/scrolling/typing/etc and taking screenshots.Last updated -39MIT License
- AsecurityAlicenseAqualityEnables automated web accessibility scans for WCAG compliance using Playwright and Axe-core, providing visual and JSON reports with remediation guidance.Last updated -251615MIT License
- AsecurityAlicenseAqualityProvides accessibility testing capabilities through CLI, helping identify accessibility issues in web applications using axe-core and Puppeteer.Last updated -11MIT License
- AsecurityAlicenseAqualityAn MCP (Model Context Protocol) server for performing accessibility audits on webpages using axe-core. Use the results in an agentic loop with your favorite AI assistants (Cline/Cursor/GH Copilot) and let them fix a11y issues for you!Last updated -223323Mozilla Public License 2.0