@playwright/mcp 0.0.47 → 0.0.48
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 +138 -44
- package/config.d.ts +5 -0
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -270,6 +270,21 @@ Playwright MCP server supports following arguments. They can be provided in the
|
|
|
270
270
|
server is allowed to serve from.
|
|
271
271
|
Defaults to the host the server is bound
|
|
272
272
|
to. Pass '*' to disable the host check.
|
|
273
|
+
--allowed-origins <origins> semicolon-separated list of TRUSTED
|
|
274
|
+
origins to allow the browser to request.
|
|
275
|
+
Default is to allow all.
|
|
276
|
+
Important: *does not* serve as a
|
|
277
|
+
security boundary and *does not* affect
|
|
278
|
+
redirects.
|
|
279
|
+
--blocked-origins <origins> semicolon-separated list of origins to
|
|
280
|
+
block the browser from requesting.
|
|
281
|
+
Blocklist is evaluated before allowlist.
|
|
282
|
+
If used without the allowlist, requests
|
|
283
|
+
not matching the blocklist are still
|
|
284
|
+
allowed.
|
|
285
|
+
Important: *does not* serve as a
|
|
286
|
+
security boundary and *does not* affect
|
|
287
|
+
redirects.
|
|
273
288
|
--block-service-workers block service workers
|
|
274
289
|
--browser <browser> browser or chrome channel to use,
|
|
275
290
|
possible values: chrome, firefox,
|
|
@@ -438,72 +453,151 @@ npx @playwright/mcp@latest --config path/to/config.json
|
|
|
438
453
|
|
|
439
454
|
```typescript
|
|
440
455
|
{
|
|
441
|
-
|
|
456
|
+
/**
|
|
457
|
+
* The browser to use.
|
|
458
|
+
*/
|
|
442
459
|
browser?: {
|
|
443
|
-
|
|
460
|
+
/**
|
|
461
|
+
* The type of browser to use.
|
|
462
|
+
*/
|
|
444
463
|
browserName?: 'chromium' | 'firefox' | 'webkit';
|
|
445
464
|
|
|
446
|
-
|
|
465
|
+
/**
|
|
466
|
+
* Keep the browser profile in memory, do not save it to disk.
|
|
467
|
+
*/
|
|
447
468
|
isolated?: boolean;
|
|
448
469
|
|
|
449
|
-
|
|
470
|
+
/**
|
|
471
|
+
* Path to a user data directory for browser profile persistence.
|
|
472
|
+
* Temporary directory is created by default.
|
|
473
|
+
*/
|
|
450
474
|
userDataDir?: string;
|
|
451
475
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
476
|
+
/**
|
|
477
|
+
* Launch options passed to
|
|
478
|
+
* @see https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context
|
|
479
|
+
*
|
|
480
|
+
* This is useful for settings options like `channel`, `headless`, `executablePath`, etc.
|
|
481
|
+
*/
|
|
482
|
+
launchOptions?: playwright.LaunchOptions;
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Context options for the browser context.
|
|
486
|
+
*
|
|
487
|
+
* This is useful for settings options like `viewport`.
|
|
488
|
+
*/
|
|
489
|
+
contextOptions?: playwright.BrowserContextOptions;
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Chrome DevTools Protocol endpoint to connect to an existing browser instance in case of Chromium family browsers.
|
|
493
|
+
*/
|
|
469
494
|
cdpEndpoint?: string;
|
|
470
495
|
|
|
471
|
-
|
|
496
|
+
/**
|
|
497
|
+
* CDP headers to send with the connect request.
|
|
498
|
+
*/
|
|
499
|
+
cdpHeaders?: Record<string, string>;
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Remote endpoint to connect to an existing Playwright server.
|
|
503
|
+
*/
|
|
472
504
|
remoteEndpoint?: string;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Paths to TypeScript files to add as initialization scripts for Playwright page.
|
|
508
|
+
*/
|
|
509
|
+
initPage?: string[];
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Paths to JavaScript files to add as initialization scripts.
|
|
513
|
+
* The scripts will be evaluated in every page before any of the page's scripts.
|
|
514
|
+
*/
|
|
515
|
+
initScript?: string[];
|
|
473
516
|
},
|
|
474
517
|
|
|
475
|
-
// Server configuration
|
|
476
518
|
server?: {
|
|
477
|
-
|
|
478
|
-
|
|
519
|
+
/**
|
|
520
|
+
* The port to listen on for SSE or MCP transport.
|
|
521
|
+
*/
|
|
522
|
+
port?: number;
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* The host to bind the server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.
|
|
526
|
+
*/
|
|
527
|
+
host?: string;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* The hosts this server is allowed to serve from. Defaults to the host server is bound to.
|
|
531
|
+
* This is not for CORS, but rather for the DNS rebinding protection.
|
|
532
|
+
*/
|
|
533
|
+
allowedHosts?: string[];
|
|
479
534
|
},
|
|
480
535
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
536
|
+
/**
|
|
537
|
+
* List of enabled tool capabilities. Possible values:
|
|
538
|
+
* - 'core': Core browser automation features.
|
|
539
|
+
* - 'pdf': PDF generation and manipulation.
|
|
540
|
+
* - 'vision': Coordinate-based interactions.
|
|
541
|
+
*/
|
|
542
|
+
capabilities?: ToolCapability[];
|
|
488
543
|
|
|
489
|
-
|
|
490
|
-
|
|
544
|
+
/**
|
|
545
|
+
* Whether to save the Playwright session into the output directory.
|
|
546
|
+
*/
|
|
547
|
+
saveSession?: boolean;
|
|
491
548
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
549
|
+
/**
|
|
550
|
+
* Whether to save the Playwright trace of the session into the output directory.
|
|
551
|
+
*/
|
|
552
|
+
saveTrace?: boolean;
|
|
496
553
|
|
|
497
|
-
|
|
498
|
-
|
|
554
|
+
/**
|
|
555
|
+
* If specified, saves the Playwright video of the session into the output directory.
|
|
556
|
+
*/
|
|
557
|
+
saveVideo?: {
|
|
558
|
+
width: number;
|
|
559
|
+
height: number;
|
|
499
560
|
};
|
|
500
|
-
|
|
561
|
+
|
|
501
562
|
/**
|
|
502
|
-
*
|
|
503
|
-
|
|
563
|
+
* Reuse the same browser context between all connected HTTP clients.
|
|
564
|
+
*/
|
|
565
|
+
sharedBrowserContext?: boolean;
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Secrets are used to prevent LLM from getting sensitive data while
|
|
569
|
+
* automating scenarios such as authentication.
|
|
570
|
+
* Prefer the browser.contextOptions.storageState over secrets file as a more secure alternative.
|
|
571
|
+
*/
|
|
572
|
+
secrets?: Record<string, string>;
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* The directory to save output files.
|
|
576
|
+
*/
|
|
577
|
+
outputDir?: string;
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Specify the attribute to use for test ids, defaults to "data-testid".
|
|
581
|
+
*/
|
|
582
|
+
testIdAttribute?: string;
|
|
583
|
+
|
|
584
|
+
timeouts?: {
|
|
585
|
+
/*
|
|
586
|
+
* Configures default action timeout: https://playwright.dev/docs/api/class-page#page-set-default-timeout. Defaults to 5000ms.
|
|
587
|
+
*/
|
|
588
|
+
action?: number;
|
|
589
|
+
|
|
590
|
+
/*
|
|
591
|
+
* Configures default navigation timeout: https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout. Defaults to 60000ms.
|
|
592
|
+
*/
|
|
593
|
+
navigation?: number;
|
|
594
|
+
};
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Whether to send image responses to the client. Can be "allow", "omit", or "auto". Defaults to "auto", which sends images if the client can display them.
|
|
504
598
|
*/
|
|
505
599
|
imageResponses?: 'allow' | 'omit';
|
|
506
|
-
}
|
|
600
|
+
};
|
|
507
601
|
```
|
|
508
602
|
</details>
|
|
509
603
|
|
package/config.d.ts
CHANGED
|
@@ -69,6 +69,11 @@ export type Config = {
|
|
|
69
69
|
*/
|
|
70
70
|
remoteEndpoint?: string;
|
|
71
71
|
|
|
72
|
+
/**
|
|
73
|
+
* Paths to TypeScript files to add as initialization scripts for Playwright page.
|
|
74
|
+
*/
|
|
75
|
+
initPage?: string[];
|
|
76
|
+
|
|
72
77
|
/**
|
|
73
78
|
* Paths to JavaScript files to add as initialization scripts.
|
|
74
79
|
* The scripts will be evaluated in every page before any of the page's scripts.
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playwright/mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.48",
|
|
4
4
|
"description": "Playwright Tools for MCP",
|
|
5
|
+
"mcpName": "com.microsoft/playwright-mcp",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
7
8
|
"url": "git+https://github.com/microsoft/playwright-mcp.git"
|
|
@@ -37,15 +38,15 @@
|
|
|
37
38
|
}
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
40
|
-
"playwright": "1.
|
|
41
|
-
"playwright-core": "1.
|
|
41
|
+
"playwright": "1.58.0-alpha-1763757971000",
|
|
42
|
+
"playwright-core": "1.58.0-alpha-1763757971000"
|
|
42
43
|
},
|
|
43
44
|
"bin": {
|
|
44
45
|
"mcp-server-playwright": "cli.js"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
48
|
"@modelcontextprotocol/sdk": "^1.17.5",
|
|
48
|
-
"@playwright/test": "1.
|
|
49
|
+
"@playwright/test": "1.58.0-alpha-1763757971000",
|
|
49
50
|
"@types/node": "^24.3.0",
|
|
50
51
|
"zod-to-json-schema": "^3.24.6"
|
|
51
52
|
}
|