Metadata-Version: 2.4
Name: mcp-axe
Version: 0.1.1
Summary: MCP plugin for accessibility testing using Axe-core
Author-email: Manoj Kumar <your-email@example.com>
License: MIT License
        
        Copyright (c) 2025 Manoj Kumar
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.9.0
Requires-Dist: fastapi>=0.100.0
Requires-Dist: uvicorn[standard]>=0.22.0
Requires-Dist: selenium>=4.10.0
Requires-Dist: playwright>=1.44.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: toml>=0.10.2
Requires-Dist: requests>=2.28.0
Requires-Dist: mcp>=1.6.0
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Dynamic: license-file

# 🧪 mcp-axe: Accessibility Testing Plugin using Axe-core

`mcp-axe` is an MCP-compatible plugin for automated accessibility scanning using Deque's [axe-core](https://github.com/dequelabs/axe-core). It supports both **Selenium** and **Playwright** engines and provides a CLI and FastAPI interface for scanning URLs, raw HTML content, and batches — all enriched with screenshot capture and optional reporting.


## 📦 Installation

Clone this repo and install in editable mode:

```bash
#git clone https://github.com/yourname/mcp-axe.git
#cd mcp-axe
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
```
## CLI Usage

### Scan a URL
```bash
mcp-axe scan-url https://broken-workshop.dequelabs.com --engine selenium --no-headless --save --output-json --output-html
```

### Scan a local HTML file
```bash
mcp-axe scan-html path/to/your/file.html --browser chrome --no-headless --save --output-json --output-html
```

### Batch scan multiple URLs:
```bash
mcp-axe batch-scan "https://broken-workshop.dequelabs.com,https://google.com" --engine selenium --browser chrome --headless --save --output-json
```

### Summarize a saved report:
```bash
mcp-axe summarize report_selenium_chrome.json --output-json --save
```

## API Usage

### Run the FastAPI server locally:
```bash
uvicorn mcp_axe.api:app --reload --app-dir src
```

### Available Endpoints:

| Endpoint           | Description             |
|--------------------|--------------------------|
| `POST /scan/url`   | Scan a live URL          |
| `POST /scan/html`  | Scan raw HTML content    |
| `POST /scan/batch` | Scan multiple URLs       |
| `POST /scan/summarise` | Summarize violations |
