feat(args): allow configuring proxy, UA, viewport, https errors (#410)

This commit is contained in:
Pavel Feldman
2025-05-13 14:40:03 -07:00
committed by GitHub
parent ce72367208
commit 7be0c8872e
3 changed files with 82 additions and 34 deletions

View File

@@ -110,6 +110,9 @@ Follow the MCP install [guide](https://modelcontextprotocol.io/quickstart/user),
Playwright MCP server supports following arguments. They can be provided in the JSON configuration above, as a part of the `"args"` list:
- `--allowed-origins <origins>`: Semicolon-separated list of origins to allow the browser to request. Default is to allow all. Origins matching both `--allowed-origins` and `--blocked-origins` will be blocked.
- `--blocked-origins <origins>`: Semicolon-separated list of origins to block the browser to request. Origins matching both `--allowed-origins` and `--blocked-origins` will be blocked.
- `--block-service-workers`: Block service workers
- `--browser <browser>`: Browser or chrome channel to use. Possible values:
- `chrome`, `firefox`, `webkit`, `msedge`
- Chrome channels: `chrome-beta`, `chrome-canary`, `chrome-dev`
@@ -117,18 +120,21 @@ Playwright MCP server supports following arguments. They can be provided in the
- Default: `chrome`
- `--caps <caps>`: Comma-separated list of capabilities to enable, possible values: tabs, pdf, history, wait, files, install. Default is all.
- `--cdp-endpoint <endpoint>`: CDP endpoint to connect to
- `--isolated`: Keep the browser profile in memory, do not save it to disk
- `--config <path>`: Path to the configuration file
- `--device`: Emulate mobile device
- `--executable-path <path>`: Path to the browser executable
- `--headless`: Run browser in headless mode (headed by default)
- `--device`: Emulate mobile device
- `--user-data-dir <path>`: Path to the user data directory
- `--port <port>`: Port to listen on for SSE transport
- `--host <host>`: Host to bind server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.
- `--allowed-origins <origins>`: Semicolon-separated list of origins to allow the browser to request. Default is to allow all. Origins matching both `--allowed-origins` and `--blocked-origins` will be blocked.
- `--blocked-origins <origins>`: Semicolon-separated list of origins to block the browser to request. Origins matching both `--allowed-origins` and `--blocked-origins` will be blocked.
- `--vision`: Run server that uses screenshots (Aria snapshots are used by default)
- `--ignore-https-errors`: Ignore https errors
- `--isolated`: Keep the browser profile in memory, do not save it to disk
- `--output-dir`: Directory for output files
- `--config <path>`: Path to the configuration file
- `--port <port>`: Port to listen on for SSE transport
- `--proxy-bypass <bypass>`: Comma-separated domains to bypass proxy, for example ".com,chromium.org,.domain.com"'
- `--proxy-server <proxy>`: Proxy server, for example "http://myproxy:3128" or "socks5://myproxy:8080"'
- `--user-agent <ua string>`: Specify user agent string
- `--user-data-dir <path>`: Path to the user data directory. If not specified, a temporary directory will be created
- `--viewport-size <size>`: Specify browser viewport size in pixels, for example "1280, 720"
- `--vision`: Run server that uses screenshots (Aria snapshots are used by default)
### User profile