Skip to main content
Glama
Duds

Accessibility MCP Server

by Duds

Accessibility MCP Server

An MCP (Model Context Protocol) server that provides accessibility auditing tools for LLMs through Cursor. Integrates axe-core (via Playwright), Lighthouse CLI, and optional WAVE API to deliver deterministic, machine-actionable accessibility audit results.

Features

  • axe-core Integration: Automated accessibility testing via Playwright with full WCAG 2.1/2.2 coverage

  • Lighthouse CLI: Comprehensive accessibility audits with performance insights

  • WAVE API: Optional integration for additional accessibility validation

  • Deterministic Output: All results normalised to explicit pass/fail/unknown outcomes

  • WCAG Compliance: Every finding mapped to WCAG 2.1/2.2 criteria with severity classification

  • Machine-Actionable: Results include selectors and DOM context for remediation

  • Type-Safe: Full TypeScript implementation with strict type checking

Related MCP server: Accessibility Testing MCP

Installation

# Clone the repository
git clone <repository-url>
cd accessibility-mcp

# Install dependencies
npm install

# Build the project
npm run build

# Install Playwright browsers (required for axe-core)
npx playwright install chromium

Configuration

Create a .env file in the project root (see .env.example for template):

# WAVE API Configuration (optional)
WAVE_API_KEY=your_wave_api_key_here
WAVE_API_URL=https://wave.webaim.org/api/request

# Lighthouse Configuration (optional)
LIGHTHOUSE_TIMEOUT=60000
LIGHTHOUSE_CHROME_FLAGS=--headless --no-sandbox

# Playwright Configuration (optional)
PLAYWRIGHT_BROWSER=chromium
PLAYWRIGHT_TIMEOUT=30000

Usage

As MCP Server in Cursor

  1. Build the project: npm run build

  2. Configure in Cursor's MCP settings (~/.cursor/mcp.json or Cursor settings):

{
  "mcpServers": {
    "accessibility": {
      "command": "node",
      "args": ["/absolute/path/to/accessibility-mcp/dist/index.js"]
    }
  }
}
  1. Restart Cursor to load the MCP server

Available MCP Tools

axe_audit

Run an accessibility audit using axe-core via Playwright. Supports URLs, local file paths, and localhost URLs.

Parameters:

  • url (required): The URL to audit. Can be:

    • HTTP/HTTPS URL: "https://example.com" or "http://localhost:3000"

    • Local file path: "./index.html" or "/path/to/file.html"

    • File protocol URL: "file:///path/to/file.html"

  • options (optional): Configuration object

    • tags: Array of WCAG tags (e.g., ["wcag2a", "wcag2aa"])

    • rules: Object with rule-specific configuration

    • timeout: Timeout in milliseconds (default: 30000)

    • browser: Browser to use - "chromium", "firefox", or "webkit" (default: "chromium")

Examples:

{
  "name": "axe_audit",
  "arguments": {
    "url": "https://example.com",
    "options": {
      "tags": ["wcag2a", "wcag2aa"],
      "browser": "chromium"
    }
  }
}
{
  "name": "axe_audit",
  "arguments": {
    "url": "./src/index.html"
  }
}
{
  "name": "axe_audit",
  "arguments": {
    "url": "http://localhost:3000"
  }
}

lighthouse_audit

Run an accessibility audit using Lighthouse CLI. Supports URLs, local file paths, and localhost URLs.

Parameters:

  • url (required): The URL to audit. Can be:

    • HTTP/HTTPS URL: "https://example.com" or "http://localhost:3000"

    • Local file path: "./index.html" or "/path/to/file.html"

    • File protocol URL: "file:///path/to/file.html"

  • categories (optional): Array of Lighthouse categories to include

  • options (optional): Configuration object

    • onlyCategories: Array of categories to include

    • skipAudits: Array of audit IDs to skip

    • timeout: Timeout in milliseconds (default: 60000)

Examples:

{
  "name": "lighthouse_audit",
  "arguments": {
    "url": "https://example.com",
    "categories": ["accessibility"]
  }
}
{
  "name": "lighthouse_audit",
  "arguments": {
    "url": "./dist/index.html"
  }
}

wave_audit

Run an accessibility audit using WAVE API (requires API key). Supports URLs and localhost URLs. Local files are automatically served via a temporary local server.

Parameters:

  • url (required): The URL to audit. Can be:

    • HTTP/HTTPS URL: "https://example.com" or "http://localhost:3000"

    • Local file path: "./index.html" (will be served via temporary server)

  • apiKey (optional): WAVE API key (uses WAVE_API_KEY env var if not provided)

Examples:

{
  "name": "wave_audit",
  "arguments": {
    "url": "https://example.com",
    "apiKey": "your_api_key"
  }
}
{
  "name": "wave_audit",
  "arguments": {
    "url": "./src/index.html"
  }
}

Note: For local files, the MCP server automatically creates a temporary HTTP server to serve the file, as WAVE API requires HTTP/HTTPS URLs.

Output Format

All tools return normalised results in the following format:

{
  url: string;
  tool: 'axe' | 'lighthouse' | 'wave';
  timestamp: string;
  results: Array<{
    rule_id: string;
    wcag_ref: string[];
    severity: 'critical' | 'serious' | 'moderate' | 'minor';
    confidence: 'high' | 'medium' | 'low';
    outcome: 'pass' | 'fail' | 'unknown';
    selector: string;
    dom_context: string;
    message: string;
    reason_code?: string; // Required when outcome is 'unknown'
  }>;
  summary: {
    total: number;
    pass: number;
    fail: number;
    unknown: number;
    by_severity: {
      critical: number;
      serious: number;
      moderate: number;
      minor: number;
    };
  };
}

Development

Prerequisites

  • Node.js 18.0.0 or higher

  • npm or yarn

Scripts

# Development mode (with hot reload)
npm run dev

# Build TypeScript to JavaScript
npm run build

# Run all tests
npm test

# Run unit tests only
npm run test:unit

# Run integration tests only
npm run test:integration

# Type check without building
npm run type-check

# Lint code
npm run lint

Project Structure

accessibility-mcp/
├── .cursor/
│   ├── rules/          # Cursor behavioural constraints
│   └── commands/       # Cursor repeatable actions
├── src/
│   ├── adapters/       # External tool adapters (axe, Lighthouse, WAVE)
│   ├── services/       # Business logic (audits, normalisation)
│   ├── tools/          # MCP tool definitions
│   ├── types/          # TypeScript type definitions
│   ├── utils/          # Utility functions (WCAG mappings, selectors)
│   ├── index.ts        # Entry point
│   └── server.ts       # MCP server setup
├── tests/
│   ├── fixtures/       # Test data fixtures
│   ├── unit/           # Unit tests
│   └── integration/    # Integration tests
└── dist/               # Compiled JavaScript output

Architecture

The server follows a clean architecture pattern:

  1. Tools Layer (src/tools/): MCP tool definitions that expose audit capabilities

  2. Services Layer (src/services/): Business logic for audit execution and result normalisation

  3. Adapters Layer (src/adapters/): Interface layer for external tools (axe, Lighthouse, WAVE)

  4. Types Layer (src/types/): Shared type definitions for audit results and normalised outputs

Adding a New Audit Tool

See .cursor/commands/add-new-audit-tool.md for detailed instructions on adding a new accessibility audit tool.

Testing

# Run all tests
npm test

# Run with coverage
npm test -- --coverage

# Run specific test file
npm test tests/unit/normaliser.test.ts

CI/CD Integration

The project includes commands for CI/CD integration. See .cursor/commands/ci-gate-accessibility.md for details on setting up accessibility gates in your CI pipeline.

Contributing

  1. Follow the architectural constraints defined in .cursor/rules/

  2. Ensure all code passes type checking: npm run type-check

  3. Write tests for new features

  4. Ensure deterministic outputs (see .cursor/rules/determinism.md)

  5. Map all findings to WCAG criteria (see .cursor/rules/accessibility.md)

License

MIT

Acknowledgments

Available Tools

3 tools
axe_auditB

Run an accessibility audit using axe-core via Playwright. Supports URLs, local file paths, and localhost URLs.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to audit (http://, https://), local file path (./file.html), or file:// URL
optionsNoOptional axe-core configuration

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only mentions what inputs are supported. It doesn't disclose behavioral aspects like whether this is a read-only operation, potential performance impact, error handling, authentication needs, rate limits, or what the output format looks like. The description is minimal for a tool that performs automated testing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured in a single sentence that communicates the core functionality. It's appropriately sized for a tool with good schema documentation, though it could be slightly more informative given the lack of annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a testing tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the audit returns, how results are structured, error conditions, or performance characteristics. The context signals show complexity (nested objects, 2 parameters), but the description doesn't provide enough information for an agent to understand the tool's behavior fully.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents both parameters. The description adds minimal value by mentioning the types of URLs accepted, but doesn't provide additional context beyond what's in the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Run an accessibility audit'), technology used ('using axe-core via Playwright'), and supported input types ('URLs, local file paths, and localhost URLs'). It distinguishes from sibling tools by specifying the axe-core engine rather than Lighthouse or WAVE.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions what the tool supports but provides no guidance on when to use this tool versus the sibling tools (lighthouse_audit, wave_audit). There's no mention of comparative advantages, use cases, or prerequisites for choosing axe-core over alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lighthouse_auditB

Run an accessibility audit using Lighthouse CLI. Supports URLs, local file paths, and localhost URLs.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to audit (http://, https://), local file path (./file.html), or file:// URL
categoriesNoLighthouse categories to include (default: accessibility)
optionsNoOptional Lighthouse configuration

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool 'Run an accessibility audit' which implies a read-only analysis operation, but doesn't disclose any behavioral traits such as execution time, resource requirements, error handling, output format, or whether it modifies any systems. For a tool with no annotation coverage, this leaves significant gaps in understanding how it behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with just two sentences that efficiently convey the core functionality and input support. Every word earns its place, and it's front-loaded with the primary purpose. There's no redundancy or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (3 parameters including nested objects, no output schema, and no annotations), the description is incomplete. It doesn't explain what the audit returns, how results are structured, potential limitations, or error conditions. For a tool that performs accessibility analysis, users need more context about output and behavior to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds minimal parameter semantics beyond the schema. It mentions that the tool 'Supports URLs, local file paths, and localhost URLs,' which provides context for the 'url' parameter, but doesn't elaborate on the 'categories' or 'options' parameters. With 100% schema description coverage, the baseline is 3, and the description doesn't significantly enhance understanding of parameter usage or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Run an accessibility audit') and the technology used ('using Lighthouse CLI'), which distinguishes it from sibling tools like axe_audit and wave_audit that likely use different auditing engines. However, it doesn't explicitly mention what specific accessibility aspects are audited or how it differs functionally from its siblings beyond the tool name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by specifying supported input types (URLs, local file paths, localhost URLs), which gives some context for when to use it. However, it provides no explicit guidance on when to choose this tool over alternatives like axe_audit or wave_audit, nor does it mention any prerequisites, exclusions, or performance considerations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

wave_auditA

Run an accessibility audit using WAVE API (requires WAVE_API_KEY). Supports URLs and localhost URLs. Local files are automatically served via temporary local server.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to audit (http://, https://), local file path (./file.html), or localhost URL. Local files will be served via temporary server.
apiKeyNoWAVE API key (optional, uses WAVE_API_KEY env var if not provided)

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure and does so effectively. It reveals the API key requirement, the temporary server behavior for local files, and the supported input types. However, it doesn't mention potential rate limits, error conditions, or what the audit output looks like, which would be helpful for a tool with no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise with three sentences that each add distinct value: the core purpose, the API key requirement, and the local file handling behavior. There's zero redundancy or wasted words, and the information is front-loaded with the most important details first.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations and no output schema, the description provides adequate but incomplete context. It covers the purpose, prerequisites, and input handling well, but doesn't describe what the audit returns, potential limitations, or error scenarios. Given the complexity of an accessibility audit tool, more information about output format would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the input schema already documents both parameters thoroughly. The description adds some context about URL types and the temporary server behavior, but doesn't provide additional semantic meaning beyond what's already in the parameter descriptions. This meets the baseline expectation when schema coverage is complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Run an accessibility audit') and resource ('using WAVE API'), distinguishing it from sibling tools (axe_audit, lighthouse_audit) by specifying the WAVE technology. It provides a complete verb+resource+technology combination that leaves no ambiguity about what this tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context about when to use this tool ('Supports URLs and localhost URLs. Local files are automatically served via temporary local server'), but doesn't explicitly mention when NOT to use it or directly compare it to the sibling tools (axe_audit, lighthouse_audit). The API key requirement is mentioned but not framed as an alternative usage scenario.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv1.0.0
    • First observedaxe_audit
    • First observedlighthouse_audit
    • First observedwave_audit

TDQS

B3.2/5.0
Disambiguation2/5

All three tools perform accessibility audits with overlapping purposes, making them highly ambiguous. An agent would struggle to choose between axe_audit, lighthouse_audit, and wave_audit since they all audit accessibility, differ only in the underlying engine (axe-core, Lighthouse, WAVE), and have nearly identical input support (URLs, local files). This overlap creates significant confusion without clear guidance on when to use each.

Naming Consistency5/5

Tool names follow a perfectly consistent pattern: all use snake_case with the format 'engine_audit' (axe_audit, lighthouse_audit, wave_audit). This predictable naming makes it easy to understand each tool's purpose at a glance, with no deviations or mixed conventions.

Tool Count3/5

With only 3 tools, the count feels thin for an accessibility server, as it lacks broader functionality like reporting, remediation suggestions, or compliance checks. However, it's borderline reasonable for a focused audit toolset, though it could benefit from additional tools to enhance utility beyond just running audits.

Completeness2/5

The server is severely incomplete for accessibility testing, offering only audit execution without any tools for analysis, reporting, or follow-up actions. There are no tools to generate reports, track issues, suggest fixes, or validate compliance, leaving significant gaps that will hinder agents in performing comprehensive accessibility workflows.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Enables web accessibility audits using axe-core, allowing users to scan URLs, check WCAG compliance levels, and export reports. It uses an anti-detect browser to bypass Cloudflare and other bot protection.
    7
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Duds/accessibility-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server