@playwright/mcp 0.0.68-alpha-2026-03-30 → 0.0.69
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 +39 -15
- package/config.d.ts +9 -12
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -390,7 +390,7 @@ Playwright MCP server supports following arguments. They can be provided in the
|
|
|
390
390
|
| --save-session | Whether to save the Playwright MCP session into the output directory.<br>*env* `PLAYWRIGHT_MCP_SAVE_SESSION` |
|
|
391
391
|
| --secrets <path> | path to a file containing secrets in the dotenv format<br>*env* `PLAYWRIGHT_MCP_SECRETS` |
|
|
392
392
|
| --shared-browser-context | reuse the same browser context between all connected HTTP clients.<br>*env* `PLAYWRIGHT_MCP_SHARED_BROWSER_CONTEXT` |
|
|
393
|
-
| --snapshot-mode <mode> | when taking snapshots for responses, specifies the mode to use. Can be "
|
|
393
|
+
| --snapshot-mode <mode> | when taking snapshots for responses, specifies the mode to use. Can be "full" or "none". Default is "full".<br>*env* `PLAYWRIGHT_MCP_SNAPSHOT_MODE` |
|
|
394
394
|
| --storage-state <path> | path to the storage state file for isolated sessions.<br>*env* `PLAYWRIGHT_MCP_STORAGE_STATE` |
|
|
395
395
|
| --test-id-attribute <attribute> | specify the attribute to use for test ids, defaults to "data-testid"<br>*env* `PLAYWRIGHT_MCP_TEST_ID_ATTRIBUTE` |
|
|
396
396
|
| --timeout-action <timeout> | specify action timeout in milliseconds, defaults to 5000ms<br>*env* `PLAYWRIGHT_MCP_TIMEOUT_ACTION` |
|
|
@@ -604,9 +604,9 @@ npx @playwright/mcp@latest --config path/to/config.json
|
|
|
604
604
|
sharedBrowserContext?: boolean;
|
|
605
605
|
|
|
606
606
|
/**
|
|
607
|
-
* Secrets are used to
|
|
608
|
-
*
|
|
609
|
-
*
|
|
607
|
+
* Secrets are used to replace matching plain text in the tool responses to prevent the LLM
|
|
608
|
+
* from accidentally getting sensitive data. It is a convenience and not a security feature,
|
|
609
|
+
* make sure to always examine information coming in and from the tool on the client.
|
|
610
610
|
*/
|
|
611
611
|
secrets?: Record<string, string>;
|
|
612
612
|
|
|
@@ -615,11 +615,6 @@ npx @playwright/mcp@latest --config path/to/config.json
|
|
|
615
615
|
*/
|
|
616
616
|
outputDir?: string;
|
|
617
617
|
|
|
618
|
-
/**
|
|
619
|
-
* Whether to save snapshots, console messages, network logs and other session logs to a file or to the standard output. Defaults to "stdout".
|
|
620
|
-
*/
|
|
621
|
-
outputMode?: 'file' | 'stdout';
|
|
622
|
-
|
|
623
618
|
console?: {
|
|
624
619
|
/**
|
|
625
620
|
* The level of console messages to return. Each level includes the messages of more severe levels. Defaults to "info".
|
|
@@ -678,12 +673,14 @@ npx @playwright/mcp@latest --config path/to/config.json
|
|
|
678
673
|
/**
|
|
679
674
|
* When taking snapshots for responses, specifies the mode to use.
|
|
680
675
|
*/
|
|
681
|
-
mode?: '
|
|
676
|
+
mode?: 'full' | 'none';
|
|
682
677
|
};
|
|
683
678
|
|
|
684
679
|
/**
|
|
685
|
-
*
|
|
686
|
-
*
|
|
680
|
+
* allowUnrestrictedFileAccess acts as a guardrail to prevent the LLM from accidentally
|
|
681
|
+
* wandering outside its intended workspace. It is a convenience defense to catch unintended
|
|
682
|
+
* file access, not a secure boundary; a deliberate attempt to reach other directories can be
|
|
683
|
+
* easily worked around, so always rely on client-level permissions for true security.
|
|
687
684
|
*/
|
|
688
685
|
allowUnrestrictedFileAccess?: boolean;
|
|
689
686
|
|
|
@@ -845,6 +842,7 @@ http.createServer(async (req, res) => {
|
|
|
845
842
|
- `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
|
|
846
843
|
- `ref` (string, optional): Exact target element reference from the page snapshot
|
|
847
844
|
- `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available.
|
|
845
|
+
- `filename` (string, optional): Filename to save the result to. If not provided, result is returned as text.
|
|
848
846
|
- Read-only: **false**
|
|
849
847
|
|
|
850
848
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
@@ -909,7 +907,10 @@ http.createServer(async (req, res) => {
|
|
|
909
907
|
- Title: List network requests
|
|
910
908
|
- Description: Returns all network requests since loading the page
|
|
911
909
|
- Parameters:
|
|
912
|
-
- `
|
|
910
|
+
- `static` (boolean): Whether to include successful static resources like images, fonts, scripts, etc. Defaults to false.
|
|
911
|
+
- `requestBody` (boolean): Whether to include request body. Defaults to false.
|
|
912
|
+
- `requestHeaders` (boolean): Whether to include request headers. Defaults to false.
|
|
913
|
+
- `filter` (string, optional): Only return requests whose URL matches this regexp (e.g. "/api/.*user").
|
|
913
914
|
- `filename` (string, optional): Filename to save the network requests to. If not provided, requests are returned as text.
|
|
914
915
|
- Read-only: **true**
|
|
915
916
|
|
|
@@ -938,7 +939,8 @@ http.createServer(async (req, res) => {
|
|
|
938
939
|
- Title: Run Playwright code
|
|
939
940
|
- Description: Run Playwright code snippet
|
|
940
941
|
- Parameters:
|
|
941
|
-
- `code` (string): A JavaScript function containing Playwright code to execute. It will be invoked with a single argument, page, which you can use for any page interaction. For example: `async (page) => { await page.getByRole('button', { name: 'Submit' }).click(); return await page.title(); }`
|
|
942
|
+
- `code` (string, optional): A JavaScript function containing Playwright code to execute. It will be invoked with a single argument, page, which you can use for any page interaction. For example: `async (page) => { await page.getByRole('button', { name: 'Submit' }).click(); return await page.title(); }`
|
|
943
|
+
- `filename` (string, optional): Load code from the specified file. If both code and filename are provided, code will be ignored.
|
|
942
944
|
- Read-only: **false**
|
|
943
945
|
|
|
944
946
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
@@ -961,6 +963,7 @@ http.createServer(async (req, res) => {
|
|
|
961
963
|
- Parameters:
|
|
962
964
|
- `filename` (string, optional): Save snapshot to markdown file instead of returning it in the response.
|
|
963
965
|
- `selector` (string, optional): Element selector of the root element to capture a partial snapshot instead of the whole page
|
|
966
|
+
- `depth` (number, optional): Limit the depth of the snapshot tree
|
|
964
967
|
- Read-only: **true**
|
|
965
968
|
|
|
966
969
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
@@ -1250,6 +1253,16 @@ http.createServer(async (req, res) => {
|
|
|
1250
1253
|
|
|
1251
1254
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
1252
1255
|
|
|
1256
|
+
- **browser_resume**
|
|
1257
|
+
- Title: Resume paused script execution
|
|
1258
|
+
- Description: Resume script execution after it was paused. When called with step set to true, execution will pause again before the next action.
|
|
1259
|
+
- Parameters:
|
|
1260
|
+
- `step` (boolean, optional): When true, execution will pause again before the next action, allowing step-by-step debugging.
|
|
1261
|
+
- `location` (string, optional): Pause execution at a specific <file>:<line>, e.g. "example.spec.ts:42".
|
|
1262
|
+
- Read-only: **false**
|
|
1263
|
+
|
|
1264
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
1265
|
+
|
|
1253
1266
|
- **browser_start_tracing**
|
|
1254
1267
|
- Title: Start tracing
|
|
1255
1268
|
- Description: Start trace recording
|
|
@@ -1262,6 +1275,7 @@ http.createServer(async (req, res) => {
|
|
|
1262
1275
|
- Title: Start video
|
|
1263
1276
|
- Description: Start video recording
|
|
1264
1277
|
- Parameters:
|
|
1278
|
+
- `filename` (string, optional): Filename to save the video.
|
|
1265
1279
|
- `size` (object, optional): Video size
|
|
1266
1280
|
- Read-only: **true**
|
|
1267
1281
|
|
|
@@ -1278,8 +1292,18 @@ http.createServer(async (req, res) => {
|
|
|
1278
1292
|
- **browser_stop_video**
|
|
1279
1293
|
- Title: Stop video
|
|
1280
1294
|
- Description: Stop video recording
|
|
1295
|
+
- Parameters: None
|
|
1296
|
+
- Read-only: **true**
|
|
1297
|
+
|
|
1298
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
1299
|
+
|
|
1300
|
+
- **browser_video_chapter**
|
|
1301
|
+
- Title: Video chapter
|
|
1302
|
+
- Description: Add a chapter marker to the video recording. Shows a full-screen chapter card with blurred backdrop.
|
|
1281
1303
|
- Parameters:
|
|
1282
|
-
- `
|
|
1304
|
+
- `title` (string): Chapter title
|
|
1305
|
+
- `description` (string, optional): Chapter description
|
|
1306
|
+
- `duration` (number, optional): Duration in milliseconds to show the chapter card
|
|
1283
1307
|
- Read-only: **true**
|
|
1284
1308
|
|
|
1285
1309
|
</details>
|
package/config.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type * as playwright from '
|
|
17
|
+
import type * as playwright from '../../..';
|
|
18
18
|
|
|
19
19
|
export type ToolCapability =
|
|
20
20
|
'config' |
|
|
@@ -143,9 +143,9 @@ export type Config = {
|
|
|
143
143
|
sharedBrowserContext?: boolean;
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
|
-
* Secrets are used to
|
|
147
|
-
*
|
|
148
|
-
*
|
|
146
|
+
* Secrets are used to replace matching plain text in the tool responses to prevent the LLM
|
|
147
|
+
* from accidentally getting sensitive data. It is a convenience and not a security feature,
|
|
148
|
+
* make sure to always examine information coming in and from the tool on the client.
|
|
149
149
|
*/
|
|
150
150
|
secrets?: Record<string, string>;
|
|
151
151
|
|
|
@@ -154,11 +154,6 @@ export type Config = {
|
|
|
154
154
|
*/
|
|
155
155
|
outputDir?: string;
|
|
156
156
|
|
|
157
|
-
/**
|
|
158
|
-
* Whether to save snapshots, console messages, network logs and other session logs to a file or to the standard output. Defaults to "stdout".
|
|
159
|
-
*/
|
|
160
|
-
outputMode?: 'file' | 'stdout';
|
|
161
|
-
|
|
162
157
|
console?: {
|
|
163
158
|
/**
|
|
164
159
|
* The level of console messages to return. Each level includes the messages of more severe levels. Defaults to "info".
|
|
@@ -217,12 +212,14 @@ export type Config = {
|
|
|
217
212
|
/**
|
|
218
213
|
* When taking snapshots for responses, specifies the mode to use.
|
|
219
214
|
*/
|
|
220
|
-
mode?: '
|
|
215
|
+
mode?: 'full' | 'none';
|
|
221
216
|
};
|
|
222
217
|
|
|
223
218
|
/**
|
|
224
|
-
*
|
|
225
|
-
*
|
|
219
|
+
* allowUnrestrictedFileAccess acts as a guardrail to prevent the LLM from accidentally
|
|
220
|
+
* wandering outside its intended workspace. It is a convenience defense to catch unintended
|
|
221
|
+
* file access, not a secure boundary; a deliberate attempt to reach other directories can be
|
|
222
|
+
* easily worked around, so always rely on client-level permissions for true security.
|
|
226
223
|
*/
|
|
227
224
|
allowUnrestrictedFileAccess?: boolean;
|
|
228
225
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playwright/mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.69",
|
|
4
4
|
"description": "Playwright Tools for MCP",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"playwright": "1.59.0-alpha-
|
|
37
|
-
"playwright-core": "1.59.0-alpha-
|
|
36
|
+
"playwright": "1.59.0-alpha-1774912654000",
|
|
37
|
+
"playwright-core": "1.59.0-alpha-1774912654000"
|
|
38
38
|
},
|
|
39
39
|
"bin": {
|
|
40
40
|
"playwright-mcp": "cli.js"
|