Stealth browser infrastructure for AI agents. A standalone, self-hostable control plane that pairs CloakBrowser (source-level C++ stealth Chromium) with PinchTab (token-efficient orchestration, MCP/CLI/API, AutoSolver, handoff, profiles).
Any agent connects via MCP (60 tools), CLI, or HTTP.
Deep dive: the full documentation (problem → solution → how it works → usage → comparison → verification) lives in
docs/— start withdocs/01-problem.md.
Status: Phases 0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 complete and verified — setup, identity registry, humanize parity, agent graph, isolation gateway, Cloak-always-on enforcement, extended MCP bridge (60 tools), parallel instances, solver/handoff graph nodes, persistent session memory, all four end-to-end proofs, full-capability bridge, and the v2 CloakServe Pool MVP (workers, leases, gateway router, egress honesty) are built and verified. 86 checks across
make pool-verify-all. Phase 2 (logged-in profile import) is deferred to v2. PinchTab is consumed as a vanilla upstream dependency — Cerberus owns realism in its own layer (no source forks).
- CloakBrowser stealth Chromium installed and verified to launch.
- PinchTab running Cloak-first (
provider=cloak,native=true,navigatorOverridesAbsent=true). - A 60-tool MCP bridge over stdio (control plane + Cloak side-channel)
plus PinchTab's own ~43 tab-centric MCP tools, plus an HTTP API on
127.0.0.1:9867. - A
/stealth/statusthat proves the stack is native-stealth, not JS-injected. - Cloak-always-on enforcement at three layers (config lock, gateway preflight, agent preflight) — a stock-Chrome instance can never silently replace the Cloak browser.
Install these once per machine (the setup checks for them):
| Tool | Why | Install |
|---|---|---|
| uv | reproducible Python env for CloakBrowser | curl -LsSf https://astral.sh/uv/install.sh | sh |
| make | orchestrates the setup | build tools (build-essential / Xcode) |
| Node.js 18+ | runs the PinchTab npm wrapper | https://nodejs.org or nvm |
| npm | installs PinchTab | comes with Node |
| curl, jq | smoke checks | coreutils / package manager |
Go is not required — PinchTab ships a managed Go binary via npm postinstall.
# 1. Configure your environment (token, optional Pro license, identity seed)
cp .env.example .env
# - PINCHTAB_TOKEN is auto-generated on `make config` if left blank.
# 2. One command: prerequisites → CloakBrowser → PinchTab → config → verify
make setupmake setup is idempotent — re-run it any time to refresh or repair. If
anything fails, it tells you exactly which step and where the logs are
(.cerberus/server.log). Re-run the specific step, e.g. make cloak or
make pinchtab.
The server and the MCP bridge run in separate terminals.
# Terminal 1 — the HTTP API + dashboard (foreground; Ctrl-C to stop)
make server
# Terminal 2 — the Cerberus MCP bridge (60 tools; foreground)
make mcpThe Cerberus bridge (
uv run python -m cerberus.bridge) talks to PinchTab at127.0.0.1:9867by default. Point it at the Phase 5 gateway (CERBERUS_BRIDGE_BASE=http://127.0.0.1:9870+CERBERUS_BRIDGE_TOKEN) for scoped multi-agent use. PinchTab's own tab-centric MCP remains available viapinchtab mcp— the Cerberus bridge adds the control-plane + Cloak surface on top.
Run the full server-side stack as three containers — pinchtab (stealth
browser API), gateway (Phase 5 auth/isolation proxy on :9870), and
router (CloakServe pool router on :9871):
# 1. Configure (set PINCHTAB_TOKEN; see docker/compose.env.example for all vars)
cp docker/compose.env.example .env
# 2. Build + start (first boot downloads the ~200MB CloakBrowser Chromium
# into the shared volume, then gateway and router start once pinchtab
# passes its healthcheck)
docker compose up -d --build
# 3. Verify
curl -s localhost:9870/health # gateway → upstream http://pinchtab:9867
curl -s localhost:9871/health # pool router
docker compose down # data persists in the cerberus-data volumeAll services share one named volume (cerberus-data → /data) so pool
state, identity stores, and the CloakBrowser binary are written exactly
once. Secrets come from .env only — never bake tokens into images.
Two MCP servers are available:
| Server | Command | Tools | Role |
|---|---|---|---|
| Cerberus bridge | .venv/bin/python -m cerberus.bridge |
cerberus_* (60) |
Control plane + Cloak side-channel |
| PinchTab MCP | node_modules/.bin/pinchtab mcp |
pinchtab_* (~43) |
Tab-centric browser ops |
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or
%APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"cerberus": {
"command": "/ABSOLUTE/PATH/TO/Cerberus/.venv/bin/python",
"args": ["-m", "cerberus.bridge"],
"env": {
"PINCHTAB_TOKEN": "YOUR_TOKEN_FROM_.env",
"PINCHTAB_CONFIG": "/ABSOLUTE/PATH/TO/Cerberus/.cerberus/pinchtab.json"
}
},
"pinchtab": {
"command": "/ABSOLUTE/PATH/TO/Cerberus/node_modules/.bin/pinchtab",
"args": ["mcp"],
"env": {
"PINCHTAB_TOKEN": "YOUR_TOKEN_FROM_.env",
"PINCHTAB_CONFIG": "/ABSOLUTE/PATH/TO/Cerberus/.cerberus/pinchtab.json"
}
}
}
}.cursor/mcp.json (or .vscode/mcp.json) in your project — same shape with
"type": "stdio" and absolute command paths (use make mcp-path and
make bridge-path).
Restart the client. cerberus_* lists the control-plane + Cloak tools
(cerberus_instance_start, cerberus_cloak_launch, cerberus_stealth_status,
cerberus_handoff_pause, cerberus_solve, …). Then just ask:
Go to https://example.com and tell me the page title.
The agent will call pinchtab_navigate({url, snap:true}) then
pinchtab_get_text({}) — or, for a behavioral-sensitive flow, launch a
cerberus_cloak_* session and drive humanized input there.
make verify # doctor + nav + /health + /stealth/status
make identity-verify # Phase 1: identity stable across restarts
make agent-graph-verify # Phase 4: agent graph end-to-end
make gateway-verify # Phase 5: gateway isolation (two agents)
make cloak-lock-verify # Phase 6: Cloak-always-on locks
make bridge-verify # Phase 7: extended MCP bridge (60 tools, 22 checks)
make parallel-verify # Phase 8a: parallel profile-isolated Cloak instances
make graph-nodes-verify # Phase 8b: solver + handoff graph nodes
make memory-verify # Phase 9: persistent per-profile session memory
make login-proof # Phase 10: login-gated task via cloak_node
make docker-sweep # Phase 10: 15-site stealth sweep
make pool-verify-all # Phase 12: full v2 pool suite (86 checks)Every target is green in CI and on this machine.
Full docs live in docs/ — problem → solution → how it works →
usage → comparison → verification. Suggested reading order:
| # | Doc | What you'll learn | Time |
|---|---|---|---|
| 1 | docs/01-problem.md |
Bot detection, fingerprint vs behavior, why Playwright/Puppeteer lose | 5 min |
| 2 | docs/02-solution.md |
The three-layer defense: native stealth → humanized behavior → orchestration + agents | 5 min |
| 3 | docs/03-how-it-works.md |
Components, data flow, identity lifecycle, agent graph, the honest constraints | 15 min |
| 4 | docs/04-usage.md |
Setup, CLI, MCP clients, agent recipes, gateway, bridge — hands-on | 15 min |
| 5 | docs/05-comparison.md |
PinchTab's own Cloak integration, PinchTab alone, CloakBrowser alone, Playwright+stealth plugins | 5 min |
| 6 | docs/06-verification.md |
Every make <target> proof, the evidence files, how to reproduce |
10 min |
Cerberus documents what it cannot do. The three things most likely to bite:
- One server = one live fingerprint. A single PinchTab server runs many
parallel instances, but they all launch with the same live fingerprint
(the child re-resolves the global
defaultTarget; thebrowser=request field is server-side only). Phase 12 fixes this with the v2 CloakServe Pool — one worker server per fingerprint. Seespecs/PARALLEL_INSTANCES_FINDING.mdfor the root cause anddocs/03-how-it-works.mdfor the pool architecture. - Cloudflare Turnstile blocks this egress IP regardless of browser — it's a network-level block, not a fingerprint failure. The 15-site sweep is honestly 14/15.
- No logged-in profile import yet (Phase 2, v2). You start with fresh identities; importing an existing Chrome profile with sessions is deferred.
- Single egress by default. The pool's distinct-egress enforcement
requires residential proxies (a recurring-cost decision). Mechanism proven
at N=1 (
make pool-egress-verify), distinct-IP mode needs real proxies.
make setup
├─ 00-tools.sh check uv/make/node/npm/curl/jq
├─ 01-cloak.sh uv sync → cloakbrowser → python -m cloakbrowser install (~200MB binary)
├─ 02-pinchtab.sh npm install ([email protected]) → postinstall downloads Go binary
├─ 03-config.sh render config/pinchtab.json.tmpl → .cerberus/pinchtab.json
│ ATOMIC Cloak lock: renders to a temp file, asserts
│ browsers.default=="cloak" + executable + --version is
│ Chromium, then moves into place. Tampered template → exit 1.
└─ 04-verify.sh doctor + nav + /health + /stealth/status
cerberus/bridge/server.py # 60-tool MCP bridge (control plane + Cloak)
cerberus/bridge/cloak.py # CloakBrowser side-channel via CloakChannel
cerberus/agent/graph.py # LangGraph agent (preflight → planner → tool/cloak/solver/handoff)
cerberus/identity/ # per-profile registry (seeds, platform, tz, locale, proxy)
cerberus/gateway/ # multi-agent isolation gateway (token + preflight)
- CloakBrowser (Python, uv-managed) → binary cached at
~/.cloakbrowser/ - PinchTab (npm) → Go binary cached at
~/.pinchtab/bin/ - Config → project-local
.cerberus/pinchtab.json(keeps$HOMEclean) - Token →
.env(gitignored); also readable asPINCHTAB_TOKENenv var
All knobs live in .env (see .env.example):
| Variable | Default | Purpose |
|---|---|---|
PINCHTAB_TOKEN |
auto-generated | Server/MCP auth secret |
CERBERUS_BIND |
127.0.0.1 |
Server bind (keep local) |
CERBERUS_PORT |
9867 |
Server port |
CLOAKBROWSER_LICENSE_KEY |
(empty) | Pro binary (Chromium 150, 71 patches) |
CLOAKBROWSER_CACHE_DIR |
~/.cloakbrowser |
Relocate the binary cache |
CERBERUS_FINGERPRINT_SEED |
42069 |
Default-profile fingerprint seed |
CERBERUS_EXTRA_FLAGS |
--js-flags=--stress-compaction |
Native timing entropy |
CERBERUS_BRIDGE_BASE / CERBERUS_BRIDGE_TOKEN |
127.0.0.1:9867 / (empty) |
Bridge upstream + token |
The Cloak identity (timezone, locale, platform, webrtc) is set in
config/pinchtab.json.tmpl; edit it and re-run make config.
| Symptom | Fix |
|---|---|
pinchtab doctor warns cloakbrowser_present |
browser.binary path wrong — re-run make cloak then make config |
pinchtab --version empty |
managed binary didn't download — npm rebuild pinchtab |
/stealth/status 503 "no running instances" |
an instance must be running; pinchtab nav <url> --snap launches one |
/stealth/status shows native: false |
set disableDefaultStealthArgs: true in the template, re-run make config, restart server |
| Config lock refuses to render | browsers.default isn't "cloak" or the binary doesn't self-identify as Chromium — the template was tampered; fix it, the old good config stays live |
Ubuntu 23.10+ crashes: cdp_reachable / fingerprint_flags_accepted FAIL, "signal: aborted (core dumped)" |
AppArmor blocks unprivileged user namespaces → Chromium needs --no-sandbox. make config auto-detects this and wraps browser.binary in .cerberus/bin/cloak-nosandbox.sh. Re-run make config if the binary path changes. |
| MCP tools return 401 | PINCHTAB_TOKEN in the client env ≠ token in .env |
| MCP client can't find the bridge | use the absolute path from make bridge-path |
make setup fails at verify |
see .cerberus/server.log; re-run make verify for details |
| Phase | What | Status |
|---|---|---|
| 0 | Reproducible setup + Cloak-first verification | ✅ Verified (make verify green) |
| 1 | Profile-identity registry (cerberus identity …) |
✅ Verified (make identity-verify PASS) |
| 3 | Humanize parity — Cloak side-channel (cerberus cloak …) |
✅ Verified (Layer-4 flags all false) |
| 4 | Cerberus agent (cerberus run / cerberus chat) |
✅ Verified (make agent-graph-verify PASS) |
| 5 | Multi-agent isolation gateway (cerberus gateway) |
✅ Verified (make gateway-verify PASS) |
| 6 | Cloak-always-on enforcement (config + gateway + agent preflight) | ✅ Verified (make cloak-lock-verify PASS) |
| 7 | Extended MCP bridge (19 → 60 tools) | ✅ Verified (make bridge-verify PASS, 22 checks) |
| 8 | Parallel instances + solver/handoff graph nodes | ✅ Verified (make parallel-verify, graph-nodes-verify) |
| 9 | Persistent per-profile session memory | ✅ Verified (make memory-verify PASS) |
| 10 | End-to-end proofs (login-gated task, 15-site sweep, parallel, memory) | ✅ All four evidence files committed |
| 11 | Full-capability MCP bridge (CloakBrowser + PinchTab surface) | ✅ Verified (make bridge-verify PASS, 60 tools) |
| 12 | CloakServe Pool MVP — workers, leases, gateway router, egress honesty | ✅ Verified (make pool-verify-all PASS, 86 checks) |
| 13 | v2 hard gate — real distinct-egress proxies + per-worker Turnstile probe | ⏳ Mechanism proven, budget decision; pool-egress-verify --expect-distinct |
| 2 | Connect existing logged-in profiles | ⏳ Deferred to v2 |
| — | Managed cloud / SaaS | ⏳ Deferred (needs Cloak SaaS terms) |
The roadmap lives in specs/ROADMAP.md; the current audit is in
specs/DEEP_DIVE_REPORT.md; the bridge tool catalogue is in
specs/BRIDGE_SURFACE.md. Full documentation (problem → solution → how it
works → usage → comparison → verification): see docs/.
Cerberus glue (this repo): MIT. CloakBrowser's Chromium binary has a separate
license and is never redistributed here — make cloak downloads it on
your behalf under its own terms. PinchTab is consumed as a dependency under its
own license.