@playwright/mcp 0.0.47-alpha-2025-11-18 → 0.0.47-alpha-2025-11-20
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 +123 -44
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -438,72 +438,151 @@ npx @playwright/mcp@latest --config path/to/config.json
|
|
|
438
438
|
|
|
439
439
|
```typescript
|
|
440
440
|
{
|
|
441
|
-
|
|
441
|
+
/**
|
|
442
|
+
* The browser to use.
|
|
443
|
+
*/
|
|
442
444
|
browser?: {
|
|
443
|
-
|
|
445
|
+
/**
|
|
446
|
+
* The type of browser to use.
|
|
447
|
+
*/
|
|
444
448
|
browserName?: 'chromium' | 'firefox' | 'webkit';
|
|
445
449
|
|
|
446
|
-
|
|
450
|
+
/**
|
|
451
|
+
* Keep the browser profile in memory, do not save it to disk.
|
|
452
|
+
*/
|
|
447
453
|
isolated?: boolean;
|
|
448
454
|
|
|
449
|
-
|
|
455
|
+
/**
|
|
456
|
+
* Path to a user data directory for browser profile persistence.
|
|
457
|
+
* Temporary directory is created by default.
|
|
458
|
+
*/
|
|
450
459
|
userDataDir?: string;
|
|
451
460
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
461
|
+
/**
|
|
462
|
+
* Launch options passed to
|
|
463
|
+
* @see https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context
|
|
464
|
+
*
|
|
465
|
+
* This is useful for settings options like `channel`, `headless`, `executablePath`, etc.
|
|
466
|
+
*/
|
|
467
|
+
launchOptions?: playwright.LaunchOptions;
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* Context options for the browser context.
|
|
471
|
+
*
|
|
472
|
+
* This is useful for settings options like `viewport`.
|
|
473
|
+
*/
|
|
474
|
+
contextOptions?: playwright.BrowserContextOptions;
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Chrome DevTools Protocol endpoint to connect to an existing browser instance in case of Chromium family browsers.
|
|
478
|
+
*/
|
|
469
479
|
cdpEndpoint?: string;
|
|
470
480
|
|
|
471
|
-
|
|
481
|
+
/**
|
|
482
|
+
* CDP headers to send with the connect request.
|
|
483
|
+
*/
|
|
484
|
+
cdpHeaders?: Record<string, string>;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Remote endpoint to connect to an existing Playwright server.
|
|
488
|
+
*/
|
|
472
489
|
remoteEndpoint?: string;
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Paths to TypeScript files to add as initialization scripts for Playwright page.
|
|
493
|
+
*/
|
|
494
|
+
initPage?: string[];
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Paths to JavaScript files to add as initialization scripts.
|
|
498
|
+
* The scripts will be evaluated in every page before any of the page's scripts.
|
|
499
|
+
*/
|
|
500
|
+
initScript?: string[];
|
|
473
501
|
},
|
|
474
502
|
|
|
475
|
-
// Server configuration
|
|
476
503
|
server?: {
|
|
477
|
-
|
|
478
|
-
|
|
504
|
+
/**
|
|
505
|
+
* The port to listen on for SSE or MCP transport.
|
|
506
|
+
*/
|
|
507
|
+
port?: number;
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* The host to bind the server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.
|
|
511
|
+
*/
|
|
512
|
+
host?: string;
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* The hosts this server is allowed to serve from. Defaults to the host server is bound to.
|
|
516
|
+
* This is not for CORS, but rather for the DNS rebinding protection.
|
|
517
|
+
*/
|
|
518
|
+
allowedHosts?: string[];
|
|
479
519
|
},
|
|
480
520
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
521
|
+
/**
|
|
522
|
+
* List of enabled tool capabilities. Possible values:
|
|
523
|
+
* - 'core': Core browser automation features.
|
|
524
|
+
* - 'pdf': PDF generation and manipulation.
|
|
525
|
+
* - 'vision': Coordinate-based interactions.
|
|
526
|
+
*/
|
|
527
|
+
capabilities?: ToolCapability[];
|
|
488
528
|
|
|
489
|
-
|
|
490
|
-
|
|
529
|
+
/**
|
|
530
|
+
* Whether to save the Playwright session into the output directory.
|
|
531
|
+
*/
|
|
532
|
+
saveSession?: boolean;
|
|
491
533
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
534
|
+
/**
|
|
535
|
+
* Whether to save the Playwright trace of the session into the output directory.
|
|
536
|
+
*/
|
|
537
|
+
saveTrace?: boolean;
|
|
496
538
|
|
|
497
|
-
|
|
498
|
-
|
|
539
|
+
/**
|
|
540
|
+
* If specified, saves the Playwright video of the session into the output directory.
|
|
541
|
+
*/
|
|
542
|
+
saveVideo?: {
|
|
543
|
+
width: number;
|
|
544
|
+
height: number;
|
|
499
545
|
};
|
|
500
|
-
|
|
546
|
+
|
|
501
547
|
/**
|
|
502
|
-
*
|
|
503
|
-
|
|
548
|
+
* Reuse the same browser context between all connected HTTP clients.
|
|
549
|
+
*/
|
|
550
|
+
sharedBrowserContext?: boolean;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Secrets are used to prevent LLM from getting sensitive data while
|
|
554
|
+
* automating scenarios such as authentication.
|
|
555
|
+
* Prefer the browser.contextOptions.storageState over secrets file as a more secure alternative.
|
|
556
|
+
*/
|
|
557
|
+
secrets?: Record<string, string>;
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* The directory to save output files.
|
|
561
|
+
*/
|
|
562
|
+
outputDir?: string;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Specify the attribute to use for test ids, defaults to "data-testid".
|
|
566
|
+
*/
|
|
567
|
+
testIdAttribute?: string;
|
|
568
|
+
|
|
569
|
+
timeouts?: {
|
|
570
|
+
/*
|
|
571
|
+
* Configures default action timeout: https://playwright.dev/docs/api/class-page#page-set-default-timeout. Defaults to 5000ms.
|
|
572
|
+
*/
|
|
573
|
+
action?: number;
|
|
574
|
+
|
|
575
|
+
/*
|
|
576
|
+
* Configures default navigation timeout: https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout. Defaults to 60000ms.
|
|
577
|
+
*/
|
|
578
|
+
navigation?: number;
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* 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
583
|
*/
|
|
505
584
|
imageResponses?: 'allow' | 'omit';
|
|
506
|
-
}
|
|
585
|
+
};
|
|
507
586
|
```
|
|
508
587
|
</details>
|
|
509
588
|
|