In-Process Mode
Run the BAP Playwright server in the same process as the MCP server, bypassing WebSocket entirely. UsesDirectTransport for zero-overhead communication.
Enable In-Process Mode
How It Works
Default Mode (WebSocket)
In-Process Mode (DirectTransport)
DirectTransport passes messages directly in memory — no serialization, no network, no child process.
Trade-offs
Advantages
- Lower latency (no WebSocket overhead) - No child process management - Simpler deployment (single process) - Slightly lower memory usage
Limitations
- Server-push notifications are not supported - No event streaming (console errors, network failures) - Cannot share the server with other clients - If the server crashes, the MCP server crashes too
When to Use
| Scenario | Recommended Mode |
|---|---|
| Latency-sensitive single-agent workflows | In-process |
| Need event streaming (console/network errors) | Default (WebSocket) |
| Sharing server across multiple MCP clients | Default with --url |
| Simple deployment, single process | In-process |
| Long-running monitoring tasks | Default (WebSocket) |
Combining with Other Flags
In-process mode works with other MCP flags:The
--url flag is incompatible with --in-process. You cannot connect to an external server in
in-process mode — the whole point is running everything in one process.