chore: allow passing cdp endpoint (#86)

Fixes https://github.com/microsoft/playwright-mcp/issues/84
This commit is contained in:
Pavel Feldman
2025-03-30 09:05:58 -07:00
committed by GitHub
parent 88fbf50841
commit a7392fc266
6 changed files with 63 additions and 17 deletions

View File

@@ -39,6 +39,7 @@ program
.option('--user-data-dir <path>', 'Path to the user data directory')
.option('--vision', 'Run server that uses screenshots (Aria snapshots are used by default)')
.option('--port <port>', 'Port to listen on for SSE transport.')
.option('--cdp-endpoint <endpoint>', 'CDP endpoint to connect to.')
.action(async options => {
const launchOptions: LaunchOptions = {
headless: !!options.headless,
@@ -49,6 +50,7 @@ program
userDataDir,
launchOptions,
vision: !!options.vision,
cdpEndpoint: options.cdpEndpoint,
}));
setupExitWatchdog(serverList);