fix: createConnection() via public API (#384)

Fixes https://github.com/microsoft/playwright-mcp/issues/382
This commit is contained in:
Max Schmitt 2025-05-09 21:50:38 +02:00 committed by GitHub
parent 75f74a54bc
commit 65716b60dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 48 additions and 6 deletions

View file

@ -231,7 +231,7 @@ http.createServer(async (req, res) => {
// ...
// Creates a headless Playwright MCP server with SSE transport
const connection = await createConnection({ headless: true });
const connection = await createConnection({ browser: { launchOptions: { headless: true } } });
const transport = new SSEServerTransport('/messages', res);
await connection.connect(transport);