Server data from the Official MCP Registry
MCP server for automated web accessibility scanning with Playwright and Axe-core.
About
MCP server for automated web accessibility scanning with Playwright and Axe-core.
Security Report
Valid MCP server (5 strong, 5 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.
8 files analyzed Β· 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Permissions Required
This plugin requests these system permissions. Most are normal for its category.
How to Install
Add this to your MCP configuration file:
{
"mcpServers": {
"mcp-accessibility-scanner": {
"command": "npx",
"args": [
"-y",
"mcp-accessibility-scanner@2.0.10"
]
}
}
}Some servers take additional arguments. See the repository for details.
Documentation
View on GitHubFrom the project's GitHub README.
MCP Accessibility Scanner π
Accessibility checks inside your coding agent: axe scans, keyboard-focus checks and repeatable reports.

An intentionally flawed local demo page, checked with automated tools. These annotations were generated by scan_page with annotateScreenshot: true, not added by hand.
This MCP server lets your coding agent inspect a page, run axe checks, exercise keyboard focus and save findings for review. Automated checks don't certify WCAG compliance; manual accessibility testing is still needed. audit_screen_reader inspects the browser's accessibility tree, accessible names and element geometry. It does not test with an actual screen reader.
Quickstart: connect your coding agent
Install Google Chrome before the first audit. The configuration below uses system Chrome; installing the npm package does not install a browser. See browser configuration for alternatives.
Install the scanner:
npm install -g mcp-accessibility-scanner --allow-scripts=re2
The flag allows the native re2 dependency to install on npm 12. If a prebuilt binary is unavailable, its installer needs a native build toolchain; see re2's installation notes.
Add this stdio server to your coding agent's MCP configuration, then restart or reconnect the client:
{
"mcpServers": {
"accessibility-scanner": {
"command": "mcp-accessibility-scanner",
"args": ["--headless", "--isolated", "--output-dir", "./a11y-output"]
}
}
}
The client must be able to find the installed command on its PATH. --isolated uses a fresh browser profile, not your personal Chrome session. Output paths are relative to the server's working directory; use an absolute --output-dir if your client starts it elsewhere. Client-specific setup and other installation methods are in the reference below.
Your first audit
Start your app locally, then ask your connected coding agent to run these tools in order, replacing the URL with your app's address:
browser_navigate {"url":"http://localhost:3000"}
scan_page {"annotateScreenshot":true}
audit_keyboard {"maxTabs":30}
audit_screen_reader {}
audit_text_spacing {}
These are MCP tool calls, not shell subcommands. For terminal use, see interactive mode.
scan_page returns text findings with JSON node details and remediation links. With annotateScreenshot: true, it also saves a full-page annotated PNG and returns a file resource link. It does not save a JSON report. audit_keyboard, audit_keyboard_operation, audit_form_validation, audit_screen_reader and audit_text_spacing save JSON reports and return summaries and report links; audit_site and scan_page_matrix also save JSON reports. There is no generated HTML report dashboard. Review incomplete checks, coverage warnings and the page states you haven't tested.
To reproduce the screenshot, serve the demo from this repository with python3 -m http.server 8765 --bind 127.0.0.1 --directory docs/assets, navigate to http://127.0.0.1:8765/accessibility-demo.html, then run scan_page with annotateScreenshot: true. The screenshot used a 1000Γ720 viewport (--viewport-size 1000,720).
Badges
Star History
Features
Accessibility Scanning
β
Automated checks for WCAG 2.0/2.1/2.2 criteria (A, AA, AAA levels)
π Saved JSON audit reports and scan findings with remediation guidance
π― Support for specific violation categories (color contrast, ARIA, forms, keyboard navigation, etc.)
Browser Automation
π±οΈ Click, hover, and drag elements using accessibility snapshots
β¨οΈ Type text and handle keyboard inputs
π Capture page snapshots to discover all interactive elements
πΈ Take screenshots and save PDFs
π― Support for both element-based and coordinate-based interactions
Advanced Features
π Tab management for multi-page workflows
π Monitor console messages and network requests
β±οΈ Wait for dynamic content to load
π Handle file uploads and browser dialogs
π Navigate through browser history
Installation
You can install the package using any of these methods:
Using npm:
npm install -g mcp-accessibility-scanner --allow-scripts=re2
npm 12 does not run dependency install scripts unless you allow them. The scanner depends on re2, a native module whose install script downloads or builds re2.node; without it the server fails to start with Cannot find module './build/Release/re2.node'. Pass --allow-scripts=re2 to npm install -g and npx (older npm versions accept and ignore the flag). For a project dependency on npm 12 or later, run npm install-scripts approve re2 followed by npm rebuild re2 (approving does not run the script that was already skipped). On npm 11 and earlier, install scripts run by default; use npm rebuild re2 to restore a missing binary, provided scripts have not been explicitly disabled. To allow it for every global install on npm 12, run npm config set allow-scripts=re2 --location=user.
Installation with Docker
A pre-built image is available on Docker Hub. The image includes Chromium and is pre-configured for containerized use β no extra flags needed.
Pull from Docker Hub:
docker pull justasmonkev/mcp-accessibility-scanner
Claude Code
claude mcp add mcp-accessibility-scanner -s user -- docker run -i --rm justasmonkev/mcp-accessibility-scanner
To persist screenshots and reports on your host, add a volume mount:
claude mcp add mcp-accessibility-scanner -s user \
-- docker run -i --rm -v /tmp/mcp-output:/app/output justasmonkev/mcp-accessibility-scanner
Without the -v mount, output files only exist inside the container and are lost when it exits.
Docker Compose
docker compose up -d
The Compose configuration publishes the unauthenticated MCP HTTP transport on 127.0.0.1:8931 only. Do not expose this port to untrusted networks.
The Compose service defines a Docker healthcheck that sends a JSON-RPC ping to /mcp and expects HTTP 200. The image itself declares no HEALTHCHECK, because its default stdio mode opens no HTTP listener; add the Compose healthcheck to your own HTTP deployments if you need one.
Build from source
docker build -t mcp-accessibility-scanner .
Images built from this Dockerfile include tini as an init process; Docker's --init flag is optional.
Docker smoke test
npm run test:docker
Installation in VS Code
Install the Accessibility Scanner in VS Code using the VS Code CLI:
For VS Code:
code --add-mcp '{"name":"accessibility-scanner","command":"npx","args":["--allow-scripts=re2","mcp-accessibility-scanner"]}'
For VS Code Insiders:
code-insiders --add-mcp '{"name":"accessibility-scanner","command":"npx","args":["--allow-scripts=re2","mcp-accessibility-scanner"]}'
CLI Modes
The scanner can run in two modes depending on how you use it.
MCP server (default, no subcommand)
When launched without a subcommand, the process starts an MCP server that communicates over stdio. This is the mode used by MCP clients such as Claude Desktop, VS Code, and Claude Code -- you should never need to run it by hand.
npx --allow-scripts=re2 mcp-accessibility-scanner # starts the MCP server (stdio)
All of the MCP client configuration examples in this README already use this default mode.
On POSIX systems, stdin closure, SIGINT, SIGTERM and SIGHUP trigger the same graceful server cleanup. Locally owned browser processes and temporary browser directories are released; caller-supplied persistent-profile directories are retained.
Interactive REPL (interactive subcommand)
For manual terminal use, the interactive subcommand starts a readline REPL where you can call any tool directly:
$ npx --allow-scripts=re2 mcp-accessibility-scanner interactive
Interactive mode. Type "<tool-name> <json>" to call a tool. Ctrl+D to exit.
> browser_navigate {"url": "https://example.com"}
> scan_page {"violationsTag": ["wcag21aa"]}
> audit_keyboard {"maxTabs": 30}
> audit_screen_reader {}
Each line is <tool-name> <json-arguments>. Omit the JSON to pass {}.
When input ends (Ctrl+D or the end of piped input), calls still running finish and are printed and saved before shutdown begins. Ctrl+C, SIGINT, SIGTERM and SIGHUP start shutdown right away without waiting for running calls. Either way, closing the browser and saving the session are bounded by a 15-second shutdown limit that starts only when shutdown begins.
Global browser connection flags still apply here, for example npx --allow-scripts=re2 mcp-accessibility-scanner --headless interactive.
Use --mobile or PLAYWRIGHT_MCP_MOBILE=1 to emulate a generic mobile device (Pixel 10 for Chromium, iPhone 17 for WebKit). It cannot be combined with --device, CDP attach/launch modes, remote browser endpoints, or --extension.
Device names supplied through --device or PLAYWRIGHT_MCP_DEVICE must match a Playwright device descriptor; unknown names fail at startup. An explicit --device overrides PLAYWRIGHT_MCP_DEVICE.
Browser extension mode
Use --extension to connect through the current Playwright Extension, which must support extension protocol v2.
npx --allow-scripts=re2 mcp-accessibility-scanner --extension
Controlled tabs are grouped by default. Pass --no-tab-group with --extension, set PLAYWRIGHT_MCP_NO_TAB_GROUP=1, or use "tabGroup": false in the config file to leave controlled tabs in their existing groups. This also applies when selecting the extension browser provider through --connect-tool; it has no effect on other browser providers. Connection approval and single-client tab ownership are unchanged. The environment accepts 1/true to disable grouping and 0/false to enable it, overriding the config file; --no-tab-group takes precedence over both.
This requires an extension build containing upstream change #43814 (commit deb7e86, October 31, 2026). As of November 1, the Chrome Web Store still lists version 0.4.0, updated September 1, which predates this change and ignores the setting. No supporting released version is confirmed yet; use a build containing that commit until one is available. The upstream manifest is also still 0.4.0, so the version number alone does not establish support.
Set PLAYWRIGHT_MCP_EXTENSION_TOKEN to the token shown by the extension to bypass the connection approval dialog. The relay's CDP WebSocket endpoint always requires a separate random token, generated per relay and appended automatically for the server's own connection. This CDP token is never passed in Chrome's launch arguments or extension URL; the extension approval token cannot authenticate a CDP client.
Token-bypass connections are not background-safe: Chrome focuses the connection tab and window, and client-created tabs remain open after disconnect (upstream limitation).
With a token, the extension must connect and finish setup within 30 seconds after the connection page opens. Failed attempts release the relay so the next tool call can retry. Without a token, manual approval waits until you approve or cancel the call.
When --user-data-dir contains multiple Chrome profiles, the profile with the extension installed is selected automatically, preferring Chrome's last-used profile. Pass --profile-dir-name (or set PLAYWRIGHT_MCP_PROFILE_DIR_NAME) to select a profile explicitly; it requires --user-data-dir and accepts a Chrome profile directory name such as Default or Profile 1 (see "Profile Path" at chrome://version). The PLAYWRIGHT_MCP_EXTENSION_TOKEN approval token is specific to the profile, so when selecting a profile explicitly, use the token shown in that profile.
Packed extensions require an enabled record in the profile's preferences; a leftover extension directory alone does not count as installed. Profiles whose preferences mark the extension disabled or uninstalled are excluded from automatic selection and rejected for explicit selection. Explicit selection with a custom executable skips local installation checks. A whitespace-only PLAYWRIGHT_MCP_PROFILE_DIR_NAME is treated as unset; other string environment variables retain their existing blank-value handling.
Discovering available tools (list-tools subcommand)
To print the built-in tool names and descriptions (page-registered WebMCP tools require a live MCP tools/list request):
npx --allow-scripts=re2 mcp-accessibility-scanner list-tools
Note: Tool names like
browser_navigateandscan_pageare MCP tool identifiers (and REPL commands in interactive mode). They are not shell subcommands -- you cannot runnpx mcp-accessibility-scanner browser_navigate.
Programmatic API
createConnection returns an MCP Server directly, not a wrapper with a server
property. Its type is the SDK's Server from @modelcontextprotocol/server. Connect it
with server.connect(transport) and release it with await server.close().
Passing a custom context getter transfers that context's lifecycle to the server:
browser_close or client disconnection closes the supplied context. Its parent
browser and sibling contexts remain open. Supply a dedicated context, not one
whose tabs or storage must survive the MCP connection. Multiple sessions cannot
use a custom getter to obtain independent contexts.
import { createConnection } from 'mcp-accessibility-scanner';
import { StdioServerTransport } from '@modelcontextprotocol/server/stdio';
const server = await createConnection({ browser: { isolated: true } });
await server.connect(new StdioServerTransport());
Configuration
Here's the Claude Desktop configuration:
{
"mcpServers": {
"accessibility-scanner": {
"command": "npx",
"args": ["-y", "--allow-scripts=re2", "mcp-accessibility-scanner"]
}
}
}
Advanced Configuration
Set PLAYWRIGHT_MCP_CONFIG or pass --config <path> to load a JSON configuration file. If both are set, --config selects the file:
{
"mcpServers": {
"accessibility-scanner": {
"command": "npx",
"args": ["-y", "--allow-scripts=re2", "mcp-accessibility-scanner", "--config", "/path/to/config.json"]
}
}
}
Exact-name tool selection
npx --allow-scripts=re2 mcp-accessibility-scanner --allowed-tools browser_pdf_save --blocked-tools browser_evaluate,browser_file_upload
| CLI | Environment | JSON config |
|---|---|---|
--allowed-tools | PLAYWRIGHT_MCP_ALLOWED_TOOLS | allowedTools |
--blocked-tools | PLAYWRIGHT_MCP_BLOCKED_TOOLS | blockedTools |
CLI/environment values are comma-separated exact, case-sensitive names; JSON values are arrays of strings. allowedTools adds named tools to core and enabled capabilities; it is not a restrictive whitelist. For example, allowing browser_pdf_save does not disable navigation or accessibility audits, and allowing browser_install explicitly enables browser downloads without --caps install. Omitted lists preserve existing exposure defaults.
blockedTools wins over core tools, capabilities and allowedTools. Blocked tools are absent from tools/list and rejected on tools/call, even without prior listing and even when a request names a browser session. The server instructions sent at initialization stop recommending blocked tools, so clients are not directed to calls that would be rejected. If the blocked tool is the one that clears an open modal (browser_handle_dialog or browser_file_upload), the modal-state guidance names it and says it is blocked instead of offering it as the way forward; other tools keep refusing while the modal is open. The policy applies to standalone, CDP, extension, provider-switching and VS Code backends, over stdio and HTTP. browser_session_open, browser_session_close, accessibility tools and the proxy-owned browser_connect are not exempt. Allowing a tool does not bypass a provider's limitations or enable a connection mode; browser_connect still requires a mode that supplies it.
Precedence is CLI > environment > config file, independently for each list. A higher-precedence list replaces the lower one; lists are not merged. [] in JSON, --blocked-tools=, or an empty environment value explicitly clears that list (likewise for allowedTools). Empty lists add/block nothing; duplicates are harmless. Blank entries inside nonempty lists, non-array JSON values, unknown names (including generated webmcp_* page-tool names) and wildcards fail at startup.
Page-provided WebMCP tools remain discoverable by default and are outside this policy. Their generated webmcp_<name>_<identity> names hash an identity minted for each server run, document and registration, so a name copied from tools/list never matches after a restart or navigation. Instead of accepting a value that could never take effect, startup rejects webmcp_* names in both lists like any other unknown name. Page tools keep their existing scope and staleness checks; a persistent page-action policy would need a stable registration key and is not part of this feature.
This controls dispatch by tool name, not equivalent actions through other tools: for example, blocking browser_click does not prevent a page click through browser_evaluate. See the adoption decision.
Configuration Options
Relative filesystem paths in a JSON config file resolve from the directory containing that file, not the server's working directory. This applies only to these fields:
| Config field | Paths resolved from the config directory |
|---|---|
| Top level | outputDir |
browser | userDataDir, each allowedUploadDirs entry, cdpLaunch.cwd |
browser.launchOptions | executablePath, downloadsPath, tracesDir, artifactsDir |
browser.contextOptions | String storageState, recordHar.path, recordVideo.dir, each clientCertificates entry's certPath, keyPath, pfxPath |
For example, /project/config/scanner.json with "outputDir": "./reports" writes to /project/config/reports, regardless of where the server starts. Session logs and server-managed traces also use outputDir. Upload roots must still exist and are canonicalized after merging.
Absolute paths and storageState objects are unchanged. Commands such as browser.cdpLaunch.command, launch arguments, profile names, URLs and URL filters are not rewritten. Relative CLI and environment paths still use the server's working directory, as do programmatic Config paths. Precedence remains CLI > environment > config file, so an override is never rebased against the config directory. The --config filename itself is still relative to the server's working directory.
Migration: Earlier versions resolved file-configured relative paths from the server's working directory. If your config relied on that behavior, adjust those paths relative to the config file's directory or use absolute paths. CLI and environment values need no migration.
Create a config.json file with the following options:
{
"browser": {
"browserName": "chromium",
"launchOptions": {
"headless": true,
"channel": "chrome"
},
"cdpLaunch": {
"command": "open",
"args": ["-a", "Slack", "--args", "--remote-debugging-port={port}"],
"startupTimeoutMs": 30000
}
},
"timeouts": {
"navigationTimeout": 60000,
"defaultTimeout": 5000,
"settle": 500,
"idle": 0
},
"network": {
"allowedOrigins": ["example.com", "trusted-site.com"],
"blockedOrigins": ["ads.example.com"]
},
"snapshot": {
"boxes": true
}
}
Available Options:
-
browser.browserName: Browser to use (chromium,firefox,webkit)An open
<details>nested inside a closed<details>stays hidden frombrowser_snapshot,browser_find,browser_verify_element_visibleandbrowser_verify_text_visibleuntil the outer<details>is opened, in Chromium, Firefox and WebKit on the pinned Playwright 1.65.0. With WebKit on Playwright 1.63.0 its contents counted as visible (upstream fix);tests/details-visibility.integration.test.tschecks each engine. See the verification notes. -
browser.allowedUploadDirs: Restrict files sent bybrowser_file_uploadandbrowser_dropto regular files inside these directories, including resolved symlink targets. Restricted uploads and drops use a checked file handle and accept up to 50 MiB total per call. Unset allows any path;[]denies all file uploads and drops (text-only drops still work). Blank list entries are rejected. CLI:--allowed-upload-dirs(semicolon-separated;""denies all), env:PLAYWRIGHT_MCP_ALLOWED_UPLOAD_DIRS(empty string denies all).The list must be an array, not
null. Roots must exist at startup: their canonical paths are resolved once and retained for the server's lifetime, so retargeting a configured symlink does not grant access to a new tree. Non-empty upload allowlists require macOS or Linux with/proc/self/fdavailable. macOS blocks ancestor symlinks during the file open; Linux checks the opened descriptor's path. Other platforms reject restricted file uploads and drops rather than rely on race-prone pathname checks. Unrestricted uploads, deny-all lists, and text-only drops keep working on all platforms. -
browser.launchOptions.headless: Run browser in headless mode (default:trueon Linux without display,falseotherwise) -
browser.launchOptions.channel: Browser channel (chrome,chrome-beta,msedge, etc.) -
browser.contextOptions.clientCertificates: With client certificates, a configured launch proxy is also applied to fresh contexts unlessbrowser.contextOptions.proxyexplicitly overrides it. With certificates, Playwright routes every request through its certificate interceptor, which matchesproxy.bypassentries only as domain suffixes:example.comand.example.comboth bypassexample.comand its subdomains, and IP addresses match exactly. Entries using browser-specific syntax (wildcards such as*.example.com, ports, IP ranges,<local>) would be ignored there, so they are rejected before launch. Playwright 1.63.0 ignored every bypass entry in the interceptor;tests/client-certificate-proxy-probe.mjschecks bypassed and proxied routes on the pinned version. For a fresh context on a remote browser, configure its proxy explicitly; a proxy inherited only from that browser cannot be inspected. Existing attached contexts retain their current settings.Local persistent Firefox cannot combine client certificates with a configured proxy on Playwright 1.65.0: it sends requests without the configured certificate. This combination is rejected before launch. Explicitly use isolated Firefox or Chromium if suitable for your workflow; the server does not change browser, proxy or persistence mode automatically. Firefox without certificates or without a proxy remains supported.
-
browser.launchOptions.proxy: Browser proxy (CLI:--proxy-server,--proxy-bypass; env:PLAYWRIGHT_MCP_PROXY_SERVER,PLAYWRIGHT_MCP_PROXY_BYPASS). Credentials in a CLI or environment proxy URL, such ashttp://user:password@myproxy:3128, are moved intoproxy.usernameandproxy.passwordso the browser can answer407 Proxy Authentication Required; percent-encode reserved characters such as@,:or/in them. A proxy set in the config file keeps its explicitusernameandpasswordfields.Proxy credentials and website authentication: Playwright 1.65.0 sends proxy credentials only in answer to a proxy
407challenge, never to a website's401challenge (upstream fix); Playwright 1.63.0 leaked them, and the server's former startup warning was removed with the upgrade. Usebrowser.contextOptions.httpCredentialsfor website authentication. Without it, full Chromium fails a website's401withnet::ERR_INVALID_AUTH_CREDENTIALS, with or without a proxy, while Firefox and WebKit show the401page.tests/proxy-credentials.integration.test.tschecks the credentials reach only the proxy. -
browser.launchOptions.chromiumSandbox: Defaults tofalsefor downloaded Chromium builds on Linux because they lack the setuid sandbox helper, andtrueotherwise. Remote and VS Code endpoints choose on the remote host. An explicit config orPLAYWRIGHT_MCP_SANDBOXvalue wins;--no-sandboxalways disables it. -
browser.cdpEndpoint: Attach to an already-running Chromium-family app with CDP enabled -
browser.cdpHeaders: Map of HTTP headers to send with the CDP connect request, e.g.{ "Authorization": "Bearer <token>" }, for endpoints that require header-based authentication -
browser.cdpTimeout: Maximum time in milliseconds to wait when connecting to the CDP endpoint (default:30000) -
browser.cdpLaunch: Launch a Chromium-family desktop app with CDP enabled, wait for the endpoint, and manage the child process lifecycle.startupTimeoutMs(default30000) bounds the whole wait, attach attempts included; each attempt also stops atbrowser.cdpTimeout. If the command cannot be started (for example a missing application) or exits with a nonzero code or a signal before the endpoint answers, the tool call fails right away with that error and the server keeps running; a clean exit (code0, as withopen -a <App>) is treated as a hand-off and the wait continues. -
Numeric settings must be integers in range, whether they come from the CLI, the environment, or the config file:
cdpLaunch.startupTimeoutMsfrom 1 andcdpTimeout,timeouts.navigationTimeout,timeouts.defaultTimeoutandtimeouts.settlefrom 0 (cdpTimeout: 0still disables the connect timeout), all up to2147483647ms;cdpLaunch.portfrom 1 andserver.portfrom 0, up to65535. A mistyped value such asPLAYWRIGHT_MCP_CDP_LAUNCH_STARTUP_TIMEOUT=30sstops startup with an error instead of being ignored or disabling a timeout. A JSONnullis rejected the same way rather than treated as omitted; leave the key out to use its default. -
CDP attach modes preserve the target browser's existing default-context settings instead of applying Playwright's defaults.
-
browser.contextOptions.storageState: Start a fresh context from a recorded Playwright storage state. Imports into existing CDP or VS Code contexts are rejected; use--isolatedfor CDP or sign in interactively. If the browser exposes no context, the server creates one with the state. CDP sessions joining that same server-created context inherit its live state without resetting it. In the default persistent mode, pages the profile has open are replaced with blank tabs before the state lands and reopened afterwards; if new pages keep opening for 30 seconds, context creation fails with an error instead of waiting indefinitely. -
browser.profileDirName: Chrome profile directory name used in extension mode, for exampleDefaultorProfile 1(CLI:--profile-dir-name, env:PLAYWRIGHT_MCP_PROFILE_DIR_NAME). Requires--user-data-dirand extension mode (--extensionor--connect-tool); defaults to the last-used profile that has the extension installed. -
timeouts.navigationTimeout: Maximum time for page navigation in milliseconds (default:60000) -
timeouts.defaultTimeout: Default timeout for Playwright operations in milliseconds (default:5000) -
timeouts.settle: How long to wait after every action for triggered work to settle before responding (default:500). With a positive settle delay, an action that finishes quietly is first watched for up to 100ms (or the settle delay, whichever is shorter) so scheduled network work can still be awaited before the settle delay. -
timeouts.idle: Release the default browser context after this many idle milliseconds (default:0, disabled). Accepts integers from0to2147483647. -
network.allowedOrigins: List of host patterns to allow (blocks other HTTP(S) requests and page WebSockets when nonempty), for exampleexample.comor*.example.com. Include the port for nondefault ports. -
network.blockedOrigins: List of host patterns to block; blocklist matches take precedence over the allowlist. -
snapshot.boxes: Include each element's viewport-relative bounding box as[box=x,y,width,height]in snapshots (default:false; CLI:--snapshot-boxes, env:PLAYWRIGHT_MCP_SNAPSHOT_BOXES=1) -
imageResponses:allow(default) returns text and images;omitexcludes images;onlyomits text from successful responses containing images. Errors, browser lifecycle notices, and responses without images (including full-page screenshots) keep their text. Structured results and resource links are always preserved. Inonlymode, screenshot save-path text, generated code and any accompanying text-only findings are omitted; useallowif you need them. Interactive mode rejectsonlybecause its REPL prints text only; usealloworomitthere.autoremains a legacy alias forallow. CLI:--image-responses only; env:PLAYWRIGHT_MCP_IMAGE_RESPONSES=only. Precedence: CLI, then environment, then config file. -
server.authToken: When set, Streamable HTTP requests (--port) requireAuthorization: Bearer <token>or return401(env:PLAYWRIGHT_MCP_AUTH_TOKEN). Blank or malformed tokens fail at startup. The scheme is case-insensitive; the token is exact. Bearer auth does not encrypt traffic: authenticated listeners must bind to loopback, such as--host 127.0.0.1; use a TLS reverse proxy for remote access. The printed client config includes a header placeholder to replace locally, without logging the secret. Unset keeps unauthenticated access. -
filePaths: Optionalrelativeorabsoluterendering for output paths in screenshot/PDF results and generated code, report metadata, annotated/keyboard screenshots, and download summaries. Relative paths are based on the server working directory, not the client workspace or output directory. File writes, stored report contents, and absolutefile://resource URIs are unchanged. Omitted preserves legacy rendering: configured relative output directories produce relative paths, while default temp output paths are absolute (unlike upstream Playwrightβs relative default). CLI:--file-paths absolute; env:PLAYWRIGHT_MCP_FILE_PATHS=absolute. Precedence: CLI, then environment, then config file. -
outputDir: Directory for output files β reports, screenshots, traces, and session logs (CLI:--output-dir, env:PLAYWRIGHT_MCP_OUTPUT_DIR). Defaults to a fresh directory under the system temp folder, resolved once per server run so all of a run's artifacts land together. The output location is always server configuration; the deprecated MCP roots capability (client workspace folders) is no longer consulted. -
redactUrlParams: Optional array of URL query/fragment parameter names whose nonempty values are rendered asREDACTED(CLI:--redact-url-params code,access_token; env:PLAYWRIGHT_MCP_REDACT_URL_PARAMS=code,access_token). Defaults to no URL-parameter redaction. Names match literally and case-insensitively, without decoding keys; repeated matches, relative links and hash-route query parameters are included. Empty values and unselected parameters are preserved. CLI overrides environment, which overrides the config file; lists replace rather than merge.[]in JSON or an empty CLI/environment value clears a lower-precedence list. Non-array config values, non-string entries and blank names fail before browser startup. See URL redaction coverage before sharing output or artifacts.
Origin restrictions require locally launched Chromium (isolated or persistent). Firefox/WebKit and CDP, remote, extension, VS Code or custom-context connections reject restrictions instead of silently applying a partial policy or affecting unrelated browser contexts. Without origin restrictions those modes are unchanged. Enforcement begins when the browser context is acquired and the policy is installed; it does not retroactively filter startup traffic or existing connections (for example, during persistent-profile restoration). HTTP(S) filtering then covers each redirect hop, including subresources, frames and popups, while preserving browser redirect URLs, methods and cookies. Page WebSockets are checked before connecting to a server. Worker-created WebSockets are not filtered by Playwright's page WebSocket routing. These options are not a complete network security sandbox; use external network isolation when worker sockets or other browser traffic must be restricted.
CDP launch settings combine across layers as follows: the application (command, args, cwd, and the config file's env) comes as a unit from the highest-precedence layer (CLI > environment > config file) that sets a command, because arguments written for one application are unsafe to pass to another. port and startupTimeoutMs merge field by field with the same precedence, so --cdp-launch-command app with PLAYWRIGHT_MCP_CDP_LAUNCH_STARTUP_TIMEOUT=45000 uses that timeout (and a mistyped one fails startup), and a config file may set only port or startupTimeoutMs. Setting args or cwd in a layer without a command while another layer sets the command fails startup instead of being ignored, as does any CDP launch setting (from the config file, the environment or the CLI, such as --cdp-launch-port alone) when no layer sets a command.
CLI equivalents are also available: --cdp-launch-command, --cdp-launch-args, --cdp-launch-cwd, --cdp-launch-port, --cdp-launch-startup-timeout, --cdp-endpoint, --cdp-header (repeat for multiple headers, e.g. --cdp-header "Authorization: Bearer <token>"), and --cdp-timeout. The CDP headers and timeout can also be set via the PLAYWRIGHT_MCP_CDP_HEADERS (one Name: Value entry per line) and PLAYWRIGHT_MCP_CDP_TIMEOUT environment variables.
If CDP attachment times out after the WebSocket connects, an existing tab may be blocking Playwright initialization (upstream report). The pinned Playwright 1.65.0 fixes the crashed-renderer attach hang and omits crashed tabs, as tests/cdp-attach.integration.test.ts verifies. A genuine native proactive-discarded tab is different: attachment completes and healthy tabs remain usable, but the discarded tab is still exposed. The strict headed gate in tests/cdp-discard.integration.test.ts records that unresolved omission requirement without reloading the tab or changing its native discard state.
For --cdp-endpoint, use an explicit positive --cdp-timeout to bound initialization; 0 disables it and attachment can wait forever. --cdp-launch-startup-timeout bounds the whole launched-application attempt, with each attachment also bounded by --cdp-timeout. On failure, launch mode stops only its own application. noDefaults and --isolated do not skip initialization of existing tabs. If a tab blocks attachment, reload or close it yourself, or attach to a separate disposable browser; the server does not close or reload browser-owned tabs to repair attachment. See the verification notes.
Playwright does not support back/forward-cache (BFCache) restoration: an attached browser with BFCache enabled can return unusable references and omit iframe contents after back navigation. This was reproduced with full Chromium, Chrome, and Edge on Playwright 1.63.0, and again with full Chromium 158 on the pinned Playwright 1.65.0 (MCP_TEST_ENABLE_BFCACHE=1). For a browser you launch yourself, include --disable-back-forward-cache before attaching, or use the server's normal browser launch mode, which retains Playwright's default flag. The server does not change an attached browser's flags or replace back navigation with a reload. See the upstream maintainer's explanation, Playwright's BFCache limitation, and the verification and reproduction command.
CDP attachment excludes unsupported shared_worker targets from Playwright's browser-level auto-attach. Chromium 158 can otherwise crash when another inspector retains a terminated shared worker. Application shared workers keep running; tests/cdp-worker.integration.test.ts checks live-worker messages, healthy-tab state and follow-up browsing in both bundled headless shell and full Chromium. A nonce-protected loopback relay retains Playwright's standard URL-based remote file-upload behavior. Channel lookup, HTTP discovery and the upstream WebSocket transport reuse exported internals from the pinned Playwright version, so dependency updates must revalidate these contracts.
HTTP listeners accept Host headers for loopback aliases, the bound non-wildcard address, and the configured hostname (--host, server.host, or PLAYWRIGHT_MCP_HOST). A named host must resolve to an address on the server to bind; other hostnames remain forbidden. Wildcard binds (--host 0.0.0.0 or --host ::) do not allow arbitrary hostnames or the wildcard address itself: use a loopback hostname or bind a specific hostname/address. Missing or invalid Host returns 400; disallowed hosts return 403. When present, Origin must use HTTP and exactly match the normalized Host hostname and port; HTTPS or a different authority returns 403. These checks also apply with bearer authentication, which still requires a loopback listener.
Documentation truncated β see the full README on GitHub.
Reviews
No reviews yet
Be the first to review this server!
More Developer Tools MCP Servers
Rea
Freeby Morluto Β· Developer Tools
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Paperclip
Freeby Paperclipai Β· Developer Tools
Trending hip-hop artist momentum scores across four cultural dimensions.
Scrapling
Freeby D4Vinci Β· Developer Tools
Web scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
Toleno
Freeby Toleno Β· Developer Tools
Toleno Network MCP Server β Manage your Toleno mining account with Claude AI using natural language.
MCP Marketplace
Freeby mcp-marketplace Β· Developer Tools
Search and install MCP servers from inside your AI client.
mcp-creator-python
Freeby mcp-marketplace Β· Developer Tools
Create, build, and publish Python MCP servers to PyPI β conversationally.

