chore: ping client and disconnect on connection termination (#764)

This commit is contained in:
Pavel Feldman
2025-07-25 12:17:51 -07:00
committed by GitHub
parent 26a2a6fc83
commit a9b9fb85da
4 changed files with 39 additions and 13 deletions

View File

@@ -46,7 +46,7 @@ export class Context {
static async create(config: FullConfig) {
const client = new Client({ name: 'Playwright Proxy', version: '1.0.0' });
const browserContextFactory = contextFactory(config.browser);
const server = mcpServer.createServer(new BrowserServerBackend(config, browserContextFactory));
const server = mcpServer.createServer(new BrowserServerBackend(config, browserContextFactory), false);
await client.connect(new InProcessTransport(server));
await client.ping();
return new Context(config, client);