@playwright/mcp 0.0.37 → 0.0.38-alpha-2025-09-18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -104
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ For more information, see the [Codex MCP documentation](https://github.com/opena
|
|
|
76
76
|
|
|
77
77
|
#### Click the button to install:
|
|
78
78
|
|
|
79
|
-
[<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](cursor
|
|
79
|
+
[<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](https://cursor.com/en/install-mcp?name=Playwright&config=eyJjb21tYW5kIjoibnB4IEBwbGF5d3JpZ2h0L21jcEBsYXRlc3QifQ%3D%3D)
|
|
80
80
|
|
|
81
81
|
#### Or install manually:
|
|
82
82
|
|
|
@@ -180,65 +180,76 @@ Playwright MCP server supports following arguments. They can be provided in the
|
|
|
180
180
|
|
|
181
181
|
```
|
|
182
182
|
> npx @playwright/mcp@latest --help
|
|
183
|
-
--allowed-origins <origins>
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
--blocked-origins <origins>
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
--
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
--
|
|
201
|
-
|
|
202
|
-
--
|
|
203
|
-
--
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
--
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
--
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
--
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
--
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
--
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
--
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
183
|
+
--allowed-origins <origins> semicolon-separated list of origins to
|
|
184
|
+
allow the browser to request. Default is
|
|
185
|
+
to allow all.
|
|
186
|
+
--blocked-origins <origins> semicolon-separated list of origins to
|
|
187
|
+
block the browser from requesting.
|
|
188
|
+
Blocklist is evaluated before allowlist.
|
|
189
|
+
If used without the allowlist, requests
|
|
190
|
+
not matching the blocklist are still
|
|
191
|
+
allowed.
|
|
192
|
+
--block-service-workers block service workers
|
|
193
|
+
--browser <browser> browser or chrome channel to use,
|
|
194
|
+
possible values: chrome, firefox,
|
|
195
|
+
webkit, msedge.
|
|
196
|
+
--caps <caps> comma-separated list of additional
|
|
197
|
+
capabilities to enable, possible values:
|
|
198
|
+
vision, pdf.
|
|
199
|
+
--cdp-endpoint <endpoint> CDP endpoint to connect to.
|
|
200
|
+
--cdp-header <headers...> CDP headers to send with the connect
|
|
201
|
+
request, multiple can be specified.
|
|
202
|
+
--config <path> path to the configuration file.
|
|
203
|
+
--device <device> device to emulate, for example: "iPhone
|
|
204
|
+
15"
|
|
205
|
+
--executable-path <path> path to the browser executable.
|
|
206
|
+
--extension Connect to a running browser instance
|
|
207
|
+
(Edge/Chrome only). Requires the
|
|
208
|
+
"Playwright MCP Bridge" browser
|
|
209
|
+
extension to be installed.
|
|
210
|
+
--grant-permissions <permissions...> List of permissions to grant to the
|
|
211
|
+
browser context, for example
|
|
212
|
+
"geolocation", "clipboard-read",
|
|
213
|
+
"clipboard-write".
|
|
214
|
+
--headless run browser in headless mode, headed by
|
|
215
|
+
default
|
|
216
|
+
--host <host> host to bind server to. Default is
|
|
217
|
+
localhost. Use 0.0.0.0 to bind to all
|
|
218
|
+
interfaces.
|
|
219
|
+
--ignore-https-errors ignore https errors
|
|
220
|
+
--isolated keep the browser profile in memory, do
|
|
221
|
+
not save it to disk.
|
|
222
|
+
--image-responses <mode> whether to send image responses to the
|
|
223
|
+
client. Can be "allow" or "omit",
|
|
224
|
+
Defaults to "allow".
|
|
225
|
+
--no-sandbox disable the sandbox for all process
|
|
226
|
+
types that are normally sandboxed.
|
|
227
|
+
--output-dir <path> path to the directory for output files.
|
|
228
|
+
--port <port> port to listen on for SSE transport.
|
|
229
|
+
--proxy-bypass <bypass> comma-separated domains to bypass proxy,
|
|
230
|
+
for example
|
|
231
|
+
".com,chromium.org,.domain.com"
|
|
232
|
+
--proxy-server <proxy> specify proxy server, for example
|
|
233
|
+
"http://myproxy:3128" or
|
|
234
|
+
"socks5://myproxy:8080"
|
|
235
|
+
--save-session Whether to save the Playwright MCP
|
|
236
|
+
session into the output directory.
|
|
237
|
+
--save-trace Whether to save the Playwright Trace of
|
|
238
|
+
the session into the output directory.
|
|
239
|
+
--secrets <path> path to a file containing secrets in the
|
|
240
|
+
dotenv format
|
|
241
|
+
--storage-state <path> path to the storage state file for
|
|
242
|
+
isolated sessions.
|
|
243
|
+
--timeout-action <timeout> specify action timeout in milliseconds,
|
|
244
|
+
defaults to 5000ms
|
|
245
|
+
--timeout-navigation <timeout> specify navigation timeout in
|
|
246
|
+
milliseconds, defaults to 60000ms
|
|
247
|
+
--user-agent <ua string> specify user agent string
|
|
248
|
+
--user-data-dir <path> path to the user data directory. If not
|
|
249
|
+
specified, a temporary directory will be
|
|
250
|
+
created.
|
|
251
|
+
--viewport-size <size> specify browser viewport size in pixels,
|
|
252
|
+
for example "1280, 720"
|
|
242
253
|
```
|
|
243
254
|
|
|
244
255
|
<!--- End of options generated section -->
|
|
@@ -431,7 +442,7 @@ http.createServer(async (req, res) => {
|
|
|
431
442
|
// Creates a headless Playwright MCP server with SSE transport
|
|
432
443
|
const connection = await createConnection({ browser: { launchOptions: { headless: true } } });
|
|
433
444
|
const transport = new SSEServerTransport('/messages', res);
|
|
434
|
-
await connection.
|
|
445
|
+
await connection.connect(transport);
|
|
435
446
|
|
|
436
447
|
// ...
|
|
437
448
|
});
|
|
@@ -503,7 +514,7 @@ http.createServer(async (req, res) => {
|
|
|
503
514
|
- Title: Upload files
|
|
504
515
|
- Description: Upload one or multiple files
|
|
505
516
|
- Parameters:
|
|
506
|
-
- `paths` (array): The absolute paths to the files to upload. Can be
|
|
517
|
+
- `paths` (array, optional): The absolute paths to the files to upload. Can be single file or multiple files. If omitted, file chooser is cancelled.
|
|
507
518
|
- Read-only: **false**
|
|
508
519
|
|
|
509
520
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
@@ -722,48 +733,6 @@ http.createServer(async (req, res) => {
|
|
|
722
733
|
<details>
|
|
723
734
|
<summary><b>Verify (opt-in via --caps=verify)</b></summary>
|
|
724
735
|
|
|
725
|
-
<!-- NOTE: This has been generated via update-readme.js -->
|
|
726
|
-
|
|
727
|
-
- **browser_verify_element_visible**
|
|
728
|
-
- Title: Verify element visible
|
|
729
|
-
- Description: Verify element is visible on the page
|
|
730
|
-
- Parameters:
|
|
731
|
-
- `role` (string): ROLE of the element. Can be found in the snapshot like this: `- {ROLE} "Accessible Name":`
|
|
732
|
-
- `accessibleName` (string): ACCESSIBLE_NAME of the element. Can be found in the snapshot like this: `- role "{ACCESSIBLE_NAME}"`
|
|
733
|
-
- Read-only: **true**
|
|
734
|
-
|
|
735
|
-
<!-- NOTE: This has been generated via update-readme.js -->
|
|
736
|
-
|
|
737
|
-
- **browser_verify_list_visible**
|
|
738
|
-
- Title: Verify list visible
|
|
739
|
-
- Description: Verify list is visible on the page
|
|
740
|
-
- Parameters:
|
|
741
|
-
- `element` (string): Human-readable list description
|
|
742
|
-
- `ref` (string): Exact target element reference that points to the list
|
|
743
|
-
- `items` (array): Items to verify
|
|
744
|
-
- Read-only: **true**
|
|
745
|
-
|
|
746
|
-
<!-- NOTE: This has been generated via update-readme.js -->
|
|
747
|
-
|
|
748
|
-
- **browser_verify_text_visible**
|
|
749
|
-
- Title: Verify text visible
|
|
750
|
-
- Description: Verify text is visible on the page. Prefer browser_verify_element_visible if possible.
|
|
751
|
-
- Parameters:
|
|
752
|
-
- `text` (string): TEXT to verify. Can be found in the snapshot like this: `- role "Accessible Name": {TEXT}` or like this: `- text: {TEXT}`
|
|
753
|
-
- Read-only: **true**
|
|
754
|
-
|
|
755
|
-
<!-- NOTE: This has been generated via update-readme.js -->
|
|
756
|
-
|
|
757
|
-
- **browser_verify_value**
|
|
758
|
-
- Title: Verify value
|
|
759
|
-
- Description: Verify element value
|
|
760
|
-
- Parameters:
|
|
761
|
-
- `type` (string): Type of the element
|
|
762
|
-
- `element` (string): Human-readable element description
|
|
763
|
-
- `ref` (string): Exact target element reference that points to the element
|
|
764
|
-
- `value` (string): Value to verify. For checkbox, use "true" or "false".
|
|
765
|
-
- Read-only: **true**
|
|
766
|
-
|
|
767
736
|
</details>
|
|
768
737
|
|
|
769
738
|
<details>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playwright/mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38-alpha-2025-09-18",
|
|
4
4
|
"description": "Playwright Tools for MCP",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"playwright": "1.56.0-alpha-2025-09-
|
|
37
|
-
"playwright-core": "1.56.0-alpha-2025-09-
|
|
36
|
+
"playwright": "1.56.0-alpha-2025-09-17",
|
|
37
|
+
"playwright-core": "1.56.0-alpha-2025-09-17"
|
|
38
38
|
},
|
|
39
39
|
"bin": {
|
|
40
40
|
"mcp-server-playwright": "cli.js"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@modelcontextprotocol/sdk": "^1.17.5",
|
|
44
|
-
"@playwright/test": "1.56.0-alpha-2025-09-
|
|
44
|
+
"@playwright/test": "1.56.0-alpha-2025-09-17",
|
|
45
45
|
"@types/node": "^24.3.0",
|
|
46
46
|
"zod-to-json-schema": "^3.24.6"
|
|
47
47
|
}
|