Skip to main content
Glama
MCP WCAG Accessibility Tool

MCP WCAG Accessibility Tool

MCP WCAG Accessibility Tool 🦾

A powerful Model Context Protocol (MCP) server for comprehensive WCAG accessibility analysis and code remediation.

🌟 Features

  • 10 Professional Tools for accessibility analysis

  • WCAG 2.0, 2.1, 2.2 support

  • Multi-framework support (HTML, React, Vue, Angular)

  • Live URL auditing capability

  • ESLint configuration generator

  • Automatic code refactoring

  • GitHub WCAG repository integration

  • 10 languages supported

Related MCP server: Accessibility MCP Server

πŸ› οΈ Available Tools

  1. analyze_accessibility - Analyze code for WCAG violations

  2. refactor_for_wcag - Automatically fix accessibility issues

  3. validate_compliance - Check WCAG compliance levels (A, AA, AAA)

  4. get_documentation - Get WCAG documentation for specific rules

  5. annotate_code - Add inline comments with accessibility issues

  6. accessibility_score - Calculate detailed accessibility score (0-100)

  7. generate_component - Generate accessible component templates

  8. eslint_config - Generate ESLint configuration with a11y rules

  9. live_url_audit - Audit live websites for accessibility

  10. wcag_github_sync - Sync with official WCAG GitHub repository

πŸ“‹ Prerequisites

  • Node.js 18+ (tested with v22.14.0)

  • npm or yarn

  • Claude Desktop app

πŸ”§ Installation

1. Clone the repository

git clone https://github.com/YOUR_USERNAME/mcp-wcag.git
cd mcp-wcag

2. Install dependencies

npm install

3. Build the project

npm run build

4. Verify installation

npm run verify

βš™οΈ Claude Desktop Configuration

Windows

Add to %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "wcag-accessibility": {
      "command": "node",
      "args": ["C:\\path\\to\\mcp-wcag\\dist\\index.js"]
    }
  }
}

Mac/Linux

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "wcag-accessibility": {
      "command": "node",
      "args": ["/path/to/mcp-wcag/dist/index.js"]
    }
  }
}

πŸ§ͺ Testing

Run the test suite:

npm test

Test individual tools:

node test-tools.mjs

πŸ“– Usage Examples

Analyze HTML for accessibility

Analyze this HTML for WCAG AA compliance:
<html>
  <img src="test.jpg">
  <button></button>
</html>

Generate ESLint configuration

Generate an ESLint configuration for React with TypeScript and accessibility rules

Audit a live website

Analyze https://example.com for accessibility issues

Generate accessible component

Generate an accessible modal component in React

πŸ—οΈ Project Structure

mcp-wcag/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.ts           # Main server entry point
β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”œβ”€β”€ WCAGAnalyzer.ts
β”‚   β”‚   β”œβ”€β”€ CodeParser.ts
β”‚   β”‚   └── AccessibilityFixer.ts
β”‚   β”œβ”€β”€ rules/
β”‚   β”‚   └── wcagRules.ts
β”‚   └── tools/
β”‚       β”œβ”€β”€ analyzeAccessibility.ts
β”‚       β”œβ”€β”€ refactorForWCAG.ts
β”‚       β”œβ”€β”€ validateCompliance.ts
β”‚       └── ... (7 more tools)
β”œβ”€β”€ dist/                  # Compiled JavaScript
β”œβ”€β”€ wcag-data/            # Local WCAG data cache
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── README.md

πŸ”„ Development

Watch mode

npm run dev

Lint code

npm run lint

Format code

npm run format

πŸ› Troubleshooting

Common Issues

Issue: require is not defined

  • Solution: Project uses ES modules. All imports must use import syntax.

Issue: Server crashes on startup

  • Solution: Run npm run verify to check installation

Issue: Tools not showing in Claude

  • Solution: Restart Claude Desktop after configuration

πŸ“Š WCAG Coverage

  • Automated detection: ~30-40% of WCAG criteria

  • Success criteria: 225 total (2.0, 2.1, 2.2)

  • Techniques: 850+ documented

  • Code examples: 500+

  • Languages: 10 (EN, ES, FR, DE, PT, IT, NL, JA, KO, ZH)

🀝 Contributing

  1. Fork the repository

  2. Create your feature branch (git checkout -b feature/AmazingFeature)

  3. Commit your changes (git commit -m 'Add some AmazingFeature')

  4. Push to the branch (git push origin feature/AmazingFeature)

  5. Open a Pull Request

πŸ“ License

MIT License - see LICENSE file for details

πŸ™ Acknowledgments

  • W3C WAI for WCAG specifications

  • Deque Systems for axe-core inspiration

  • Claude/Anthropic for MCP framework

  • WCAG community for guidelines

πŸ“§ Contact

πŸš€ Version History

  • v3.0.1 - Bug fixes for ES modules and error handling

  • v3.0.0 - Added GitHub WCAG sync

  • v2.1.0 - Added ESLint config and live URL audit

  • v2.0.0 - Added scoring, annotation, and component generation

  • v1.0.0 - Initial release with 4 core tools


Made with ❀️ for web accessibility

Available Tools

10 tools
accessibility_scoreB

Calculate detailed accessibility score with metrics, grades, and recommendations

Inputs: code (required), format, detailed, generateBadge.

analyze_accessibilityC

Analyze HTML/React code for WCAG accessibility issues

Inputs: code (required), level, format.

annotate_codeC

Add inline WCAG issue comments to code for better developer experience

Inputs: code (required), style, format, severity.

eslint_configC

Generate ESLint configuration with accessibility rules for your project

Inputs: level, prettier, framework, typescript, +1 more.

generate_componentC

Generate fully accessible component templates with WCAG compliance built-in

Inputs: component (required), level, styled, framework, +1 more.

get_documentationB

Get WCAG documentation for specific rules or guidelines

Inputs: ruleId, search, category.

live_url_auditC

Analyze live websites for WCAG accessibility issues

Inputs: url (required), depth, level, checkMobile, +1 more.

refactor_for_wcagC

Automatically refactor code to be WCAG compliant

Inputs: code (required), level, format, autoFix.

validate_complianceC

Validate if code meets WCAG compliance requirements

Inputs: code (required), level, format, detailed.

wcag_github_syncC

Sync and fetch WCAG data from official GitHub repository for enhanced analysis

Inputs: action (required), version, language, criterionId, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 10 tools

    Disambiguation3/5

    Most tools target distinct actions, but analyze_accessibility, validate_compliance, and accessibility_score all inspect code for WCAG-related findings and could be confused depending on whether the agent wants issues, pass/fail validation, or a score. The descriptions help somewhat, but the boundary between analysis, validation, and scoring is not fully crisp.

    Naming Consistency3/5

    The tools consistently use snake_case, but the naming conventions are mixed: most are verb_noun or verb_prep_noun, while accessibility_score, live_url_audit, wcag_github_sync, and eslint_config are noun-first. The names remain readable, but the pattern is not predictable.

    Tool Count5/5

    Ten tools is well-scoped for a WCAG accessibility server, covering analysis, refactoring, validation, scoring, documentation, live auditing, sync, component generation, and lint configuration. Each tool appears to occupy a meaningful part of the workflow without excessive surface area.

    Completeness4/5

    The surface covers the main accessibility lifecycle: analyzing code, auditing live URLs, validating, refactoring, annotating, scoring, generating accessible components, and producing ESLint configuration. Minor gaps remain, such as explicit batch/site-wide auditing or report export, but core workflows are well covered.

    Related MCP Connectors

    Related MCP Servers