A standalone CDP server is useful for shared dev infrastructure, multi-client attachment, or manual debugging. For scripts and tests, Browser.launch() is simpler — it spawns Koko, waits for CDP, and connects in one call.
Start the server
koko serve --host 127.0.0.1 --port 9222
From a source checkout after building:
zig-out/bin/koko serve --host 127.0.0.1 --port 9222
Discovery endpoints
GET /json/version— browser version and WebSocket debugger URLGET /json/list— open page targetsGET /json/new— create a new page target
curl http://127.0.0.1:9222/json/version
curl http://127.0.0.1:9222/json/list
Connect clients
import { Browser } from "koko-sdk";
const browser = await Browser.connect("http://127.0.0.1:9222");
Profiles and cookies
koko serve \
--host 127.0.0.1 --port 9222 \
--browser-profile chrome-macos-catalina \
--cookie-jar browser/profiles/sessions/my-session-cookies.json
See Profiles & fingerprints and Multi-session runtime for scaling patterns.