Setup in VS Code with Copilot
The following configuration can be used at either a project-level or a user-settings-level (across all projects). For project-level configuration, create a .vscode/mcp.json file in your workspace. For a user-settings-level configuration, add an MCP server to your existing user configuration file.
{
"inputs": [
{
"type": "promptString",
"id": "axe-api-key",
"description": "axe MCP Server API Key",
"password": true
}
],
"servers": {
"axe-mcp-server": {
"command": "docker",
"args": [
"run",
"--add-host=host.docker.internal:host-gateway",
"-i",
"--rm",
"-e",
"AXE_SERVER_URL",
"-e",
"AXE_API_KEY",
"dequesystems/axe-mcp-server:latest"
],
"env": {
"AXE_API_KEY": "${input:axe-api-key}"
}
}
}
}Note: The configuration uses "AXE_API_KEY": "${input:axe-api-key}" for secure input handling. This will prompt you for your API key when the server starts for the first time. For more information about VS Code MCP configuration, see the VS Code MCP documentation.
Using a regional, private cloud, or on-premises axe instance? Add AXE_SERVER_URL to the env block with your instance's base URL:
"env": {
"AXE_API_KEY": "${input:axe-api-key}",
"AXE_SERVER_URL": "https://your-axe-instance.example.com"
}If omitted, the server defaults to https://axe.deque.com (Deque's shared US SaaS instance). See Configuration Options for details.
For a full list of configurable options, refer to the Configuration Options section.
Using OAuth 2.0 authentication
If you prefer OAuth over an API key, replace the configuration above with the following. This uses @deque/axe-auth token to obtain a fresh access token each time the server starts. No inputs block is needed — the token is retrieved from your system keychain automatically.
Before configuring, complete Step 1: Authenticate in the OAuth 2.0 Authentication guide.
{
"servers": {
"axe-mcp-server": {
"command": "sh",
"args": [
"-c",
"docker run --add-host=host.docker.internal:host-gateway -i --rm -e \"AXE_ACCESS_TOKEN=$(npx -y @deque/axe-auth token)\" dequesystems/axe-mcp-server:latest"
]
}
}
}Using a regional, private cloud, or on-premises axe instance? Add AXE_SERVER_URL to the Docker command and an env block with your instance's base URL:
"args": [
"-c",
"docker run --add-host=host.docker.internal:host-gateway -i --rm -e AXE_SERVER_URL -e \"AXE_ACCESS_TOKEN=$(npx -y @deque/axe-auth token)\" dequesystems/axe-mcp-server:latest"
],
"env": {
"AXE_SERVER_URL": "https://your-axe-instance.example.com"
}If omitted, the server defaults to https://axe.deque.com (Deque's shared US SaaS instance). See Configuration Options for details.
This configuration uses sh -c to allow shell substitution. $(npx -y @deque/axe-auth token) runs at server startup and injects a valid access token into the Docker container. The -y flag skips the first-run "Ok to proceed?" prompt that npx would otherwise ask in a non-interactive shell. Do not set AXE_API_KEY alongside AXE_ACCESS_TOKEN.
Windows users: This configuration uses a POSIX shell (sh) and command substitution ($(...)), which is not available in cmd.exe or PowerShell by default. Run VS Code from a Git Bash or WSL shell so that sh is on your PATH.
Start the MCP Server
- Open VS Code with your configured settings
- Locate the
"axe-mcp-server"entry in yourmcp.jsonfile - Click the Start button that appears above the server configuration
- If you configured API key authentication, enter your API key when prompted. If you configured OAuth, the server starts without a prompt and retrieves a token from your system keychain.
Submit Prompts to Copilot
Once the axe MCP Server is running, you can use it through VS Code's Copilot chat interface:
- Open Copilot chat in VS Code
- Ensure you're in agent mode to allow tool usage
- Submit prompts to analyze websites and remediate accessibility issues
