MCP ExplorerExplorer

Mcp Axe

@manoj9788on 10 months ago
5 MIT
FreeCommunity
AI Systems
#a11y#a11y-testing#accessibility#axe#mcp-a11y#mcp-axe#axe-mcp
mcp-axe is a MCP-compatible plugin for automated accessibility scanning

Overview

What is Mcp Axe

mcp-axe is a Model Context Protocol (MCP) compatible plugin designed for automated accessibility scanning using axe-core. It enables various scanning functionalities for web accessibility testing.

Use cases

Use cases for mcp-axe include scanning websites for accessibility issues, integrating accessibility checks into CI/CD pipelines, and providing accessibility reports for web applications.

How to use

To use mcp-axe, install it via PyPI with ‘pip install mcp-axe’. Configure your MCP client with the appropriate command and arguments to run scans on URLs or HTML strings. You can also set it up in FastAPI REST mode for HTTP endpoint access.

Key features

Key features of mcp-axe include single URL scans, HTML string scans, batch URL scans, and violation summarization, all powered by Selenium.

Where to use

mcp-axe can be used in web development, accessibility testing, and quality assurance processes to ensure compliance with accessibility standards.

Content

mcp‑axe

PyPI version License


A Model Context Protocol (MCP) plugin for automated accessibility testing using axe-core. It lets MCP‑aware clients (Claude Desktop, Cursor, etc.) or your terminal run:

  • Single URL scans
  • HTML string scans
  • Batch URL scans
  • Violation summarisation

All powered by Selenium under the hood.

📦 Installation

From PyPI

pip install mcp-axe

Requires Python 3.8+.

Local / Development

git clone https://github.com/manoj9788/mcp-axe.git
cd mcp-axe
python3 -m venv .venv && source .venv/bin/activate
pip install -e .[dev]

🔧 Usage

MCP (JSON‑RPC) mode

For AI clients (e.g. Claude Desktop, Cursor, VS Code MCP extension), configure your <client>_config.json:

{
  "mcpServers": {
    "axe-a11y": {
      "command": "python3",
      "args": [
        "-m",
        "mcp_axe"
      ],
      "cwd": "."
    }
  }
}

Once the MCP server is running,

you can prompt like scan https://manojkk.com for accessibility issues will invoke the scan-url tool.

you can invoke tools like:

  • scan-url (params: { "url": "https://google.com" })
  • scan-html (params: { "html": "<h1>Hello</h1>" })
  • scan-batch (params: { "urls": ["https://a.com","https://b.com"] })
  • summarise-violations (params: { "result": <axe result> })

MCP local dev mode

{
  "mcpServers": {
    "axe-a11y": {
      "command": "/path/to/.venv/bin/python",
      "args": [
        "-m",
        "mcp_axe"
      ],
      "cwd": "/path/to/mcp-axe"
    }
  }
}

FastAPI REST mode (optional)

Expose HTTP endpoints via:

from mcp_axe.server import app  # FastAPI instance
import uvicorn

if __name__ == '__main__':
    uvicorn.run(app, host='0.0.0.0', port=9788, reload=True)

Then:

curl -X POST http://localhost:9788/scan/url -H 'Content-Type: application/json' \
  -d '{ "url": "https://google.com" }'

🤝 Contributing

  1. Fork the repo
  2. Create a branch (git checkout -b feature/xyz)
  3. Commit your changes
  4. Open a PR

📜 License

MIT

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers