Docs > CLI
Two npm packages give you command-line tools. @webability/cli scans sites and reviews code from the terminal and from CI. @webability/mcp runs the WebAbility MCP server locally and opens tunnels to local dev servers.
Product overview: WebAbility MCP server.
WCAG accessibility scanner for your terminal. The package installs two commands that behave the same: webability and abilyo.
npm install -g @webability/cliwebability scan https://example.com
webability scan localhost:3000
webability scan example.com --format json
webability scan example.com --format html > report.html
webability scan example.com --format sarif > results.sarif
webability scan example.com --exit # CI mode: exit 1 if issues found
webability scan example.com --viewport mobile| Command | What it does |
|---|---|
scan <url> | Scan a site. Options: --format json|html|sarif, --viewport mobile, --exit for CI. |
flow <url> | Scan a multi-page user journey into one consolidated report. |
review [paths...] | Static code review of changed files. Offline, free, no login. |
init | Create a .webability.yml config file. |
mcp | Connect WebAbility to your AI editor (Claude Code, Cursor). |
login / logout / whoami | Account sign-in, sign-out and status. |
webability review # review files changed vs main, added lines only
webability review src/ # review a whole directory
webability flow https://example.com/cart # follow a journey, one report
webability mcp # register the MCP server with your editorsRun webability --help or webability <command> --help for the full option list of your installed version.
Run webability init to create .webability.yml in your project:
# .webability.yml
project: my-app
urls:
- http://localhost:3000
standard: WCAG2.1AA
threshold:
critical: 0
serious: 5Use --exit to fail the job when issues are found, and --format sarif to upload results to GitHub code scanning:
# URL scan with SARIF upload
- run: npx @webability/cli scan ${{ env.URL }} --exit --format sarif > results.sarif
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarifEvery pull request gets an accessibility review of its added lines. The review uses the static engine plus one AI turn, posts a PR comment, and fails the check on errors.
plan:read permission. Save it as the repo secret WEBABILITY_API_KEY..github/workflows/a11y-review.yml. The full version also posts the report as a PR comment.name: a11y-review
on:
pull_request:
branches: ["**"]
jobs:
review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- id: check
env:
WEBABILITY_API_KEY: ${{ secrets.WEBABILITY_API_KEY }}
BASE_REF: ${{ github.base_ref }}
run: |
set +e
FLAG=""; [ -n "$WEBABILITY_API_KEY" ] && FLAG="--agent"
npx -y "@webability/cli@^1.5.1" review --base "origin/$BASE_REF" $FLAG > "$RUNNER_TEMP/a11y-report.txt"
echo "exit=$?" >> "$GITHUB_OUTPUT"
- if: steps.check.outputs.exit != '0'
run: exit 1Without a key the workflow still runs the static checks. Findings are limited to added lines. A file whose diff has no added lines (a deletion-only or renamed file) is scanned in full, so an existing issue in such a file can still fail the check. On pull requests from forks the token is read-only, so the report goes to the job summary instead of a PR comment.
The MCP package adds these commands. For the hosted server and the tool list, see the MCP setup guide and the API reference.
npm install -g @webability/mcp| Command | What it does |
|---|---|
webability-mcp | The MCP server over stdio. Add it to your editor's MCP config. |
webability-mcp-http | The same server over Streamable HTTP. Listens on the port in the PORT environment variable (default 8080). |
webability-tunnel | Opens a tunnel so the hosted scanner can reach a local dev server. Options: --port, --token, --relay. |
Add this to your editor’s MCP config, or run npx -y @webability/mcp:
{
"mcpServers": {
"webability": {
"command": "webability-mcp"
}
}
}The local server runs the browser on your machine, so it can scan http://localhost:3000 directly. The first scan downloads Chromium once. Set WEBABILITY_NO_AUTO_INSTALL=1 to turn the download off. Set WEBABILITY_API_URL to use a self-hosted backend (default https://api.webability.io).
The hosted server cannot reach localhost. Use a tunnel only when the scan must run on the hosted server, for example in CI or from a remote agent. Most people should run webability-mcp locally instead.
WEBABILITY_API_KEY=<your-token> npx -y -p @webability/mcp webability-tunnel --port 3000The command prints a https://tunnel.webability.io/t/<id>/ URL and a secret. Pass the URL as url and the secret as tunnel_secret in scan_page. Options: --port (required), --token (default: the WEBABILITY_API_KEY variable), --relay.
Runs the MCP server over Streamable HTTP for hosting. Set PORT to change the listen port (default 8080).
docker run -i --rm webabilityio/mcp:latest