# Zero-CDP AI Agent Browsers Explained: Moordeck vs Bare CDP, Playwright MCP & Cloud Sandboxes

> Engineering teardown comparing Moordeck v0.2.8 Native IPC (fd 7/8), Out-of-Band SoM, HTTP 423 handoffs, and curl_cffi replay against bare CDP wrappers and playwright-mcp.

- Verified: 2026-11-22
- Reading time: 4 min

## TL;DR

- Stock playwright-mcp and bare CDP wrappers expose DevTools TCP ports, trigger Runtime.enable evaluation traps, and bloat LLM context with full raw DOM trees.
- Moordeck agent mode (default in Local MCP) runs over anonymous pipes (fd 7/8) on kernel mc-155-v4 with zero --remote-debugging-port exposed.
- Paint-Order pruning + Myers structural diffs keep snapshots compact, while pure-Node offscreen PNG SoM overlays leave webpage DOM trees completely untouched.

## Control Plane Architecture Comparison

AI browser tooling splits across three control paradigms: legacy Playwright/CDP MCP bridges, hosted datacenter browser containers, and kernel-integrated Zero-CDP engines. Each has measurable trade-offs across stealth, token efficiency, and protocol handoff.

| Capability | Moordeck v0.2.8 (agent) | Bare Anti-Detect CDP Wrapper | playwright-mcp / Stock Chrome | Cloud Browser Sandbox |
| --- | --- | --- | --- | --- |
| Transport Channel | Anonymous Pipe Native IPC (fd 7/8) | Loopback TCP WebSocket + wsEndpoint | Playwright -> CDP WebSocket | Remote Container CDP/API |
| DevTools Port Open | Zero (--remote-debugging-port omitted) | Yes (random local TCP port) | Yes (local TCP port) | Remote container port |
| Visual Annotations | Pure-Node Offscreen PNG SoM + Redaction | DOM script injection or none | DOM script / raw screenshot | Varies / raw screenshot |
| Human 2FA / Checkout | 1-click Takeover Queue + HTTP 423 Fence | Manual coordination; write races occur | Unprotected shared session | Live viewer stream |
| Protocol Promotion | Patch 9008 NetTap -> curl_cffi descriptor | External MITM proxy required | HAR export only | Built-in recording |
| Hardware Fingerprint | Patched Chromium 155 + OS font/WebRTC lock | Fingerprint profile + bare CDP risk | Stock machine fingerprint | Datacenter IP / uniform host |

## Out-of-Band PNG SoM & 4-Tuple Stale-Ref Safety

Injecting colored number badges directly into live webpage DOM nodes immediately trips MutationObserver anti-bot scripts. Moordeck computes layout bounding geometry inside the browser process, strips occluded elements via Paint Order, and draws numbered boxes and password/OTP redaction masks purely in Node offscreen PNG buffers.

Each interactive reference (@eN) binds to a 4-tuple (profileId, sessionId, loaderId/documentId, backendNodeId). If an iframe reloads or navigates between observation and click, Moordeck fails cleanly with HTTP 409 StaleRefError rather than clicking the wrong element.

```bash
# 1. Verify mc-155-v4 Zero-CDP Native IPC kernel
mdk doctor --json

# 2. Launch profile #1 in Zero-CDP stealth mode with passive NetTap
mdk browser start --serial 1 --mode agent --trace-net

# 3. Capture Myers diff snapshot & clean out-of-band SoM screenshot
mdk page snapshot --serial 1 --diff
mdk page screenshot --serial 1 --som --out .tmp/som.png

# 4. Promote repeatable read endpoints to curl_cffi
mdk profiles http-descriptor <profileId> --domain api.example.com --json
```

## Hard Handoff Fence (HTTP 423) & Prompt-Injection Defense

When an agent reaches payment confirmation, SMS verification, or a human challenge, operators click Takeover in Moordeck Desktop (or run mdk handoff request). Every competing agent write call receives HTTP 423 Locked until control is released.

Simultaneously, page snapshots wrap untrusted web text inside per-session randomized boundary tags, while mdk_* API keys isolate scope to specific allowedProfileIds and allowedDomains.

## Frequently Asked Questions

### How many tokens does a Paint-Order snapshot use compared with raw HTML?

By pruning hidden/occluded DOM nodes and supporting incremental Myers diffs (--diff), typical structured snapshots stay in the ~800–1,500 token range.

### Can existing Playwright code still connect when needed?

Yes. Pass mode: "cdp_compat" to /api/v1/browser/start to enable a cross-site-fenced loopback CDP proxy with Stealth CDP protections.

### How do I connect Claude Code or Cursor to Moordeck?

Configure Streamable HTTP http://127.0.0.1:9112/mcp or run mdk mcp over stdio to access all 12 local browser tools.

### Does Zero-CDP mode support passive network recording without a MITM proxy?

Yes. Pass --trace-net (or traceNet: true) to stream sanitized Patch 9008 JSONL network traces straight from the Chromium process.
---

- Canonical: https://moordeck.com/blog/zero-cdp-ai-agent-browser-vs-playwright-mcp
- Language: en
- Agent Index: https://moordeck.com/llms.txt
- MCP Server: https://moordeck.com/mcp
