How amir89hamzah/s22-web-agent works
S22 Web Agent is a phone-hosted MCP and browser-automation node with two principal workflows: webpage scanning and persistent browser tasks, including human-assisted login and later authenticated scans. The graph also preserves the documented MCP exposure modes, local persistence, and diagnostics. Some subsystem links use enclosing paths because their implementation was not sampled; those links are limited to documented capabilities and sampled call boundaries.
Main entry points: scanner.js Page scanner · mcp-core.mjs MCP tool registry · index.js CLI commands · server.js Local HTTP API
Components 28
User interfaces
- CLI commands
src/index.js - Local HTTP API
src/server.js
Scanning and reports
- Page scanner
src/scanner.js - Page classifier
src/classifier.js - Scan history
src/db.js - Markdown reports
src/report.js
Browser and sessions
- Browser MCP tools
src/mcp-browser-task-tools.mjs - Browser task control
tools/browser-task-orchestrator.mjs - Playwright worker API
tools/proot-playwright-worker/server.mjs - Persistent browser
tools/proot-playwright-worker/persistent-browser-engine.mjs - Manual login worker
tools/proot-playwright-worker/session-manual-login-worker.mjs - Session profiles
tools/session-profile-common.mjs - Authenticated task tools
src/mcp-auth-task-tools.mjs - Auth task lifecycle
tools/authenticated-task-orchestrator.mjs - Login gateway tools
src/mcp-auth-login-gateway-tools.mjs - Login gateway control
tools/auth-login-gateway-orchestrator.mjs - Temporary noVNC gateway
scripts/session-novnc-public-temp-tunnel-start.sh
MCP and connectivity
- MCP stdio
src/mcp-server.mjs - MCP HTTP
src/mcp-http-server.mjs - MCP tool registry
src/mcp-core.mjs - Route A tunnel
scripts/start-route-a.sh - Secure MCP tunnel
scripts/start-openai-tunnel-mode.sh
Device runtime
- Device health
src/device-health.mjs
Other components
- Operator
- MCP client
- Websites
- Human login
- Cloudflare
Connections 37
- Operator → CLI commands: runs commands
- Operator → Local HTTP API: requests scans
- MCP client → MCP stdio: sends tools
- MCP client → MCP HTTP: sends tools
- MCP stdio → MCP tool registry: dispatches
- MCP HTTP → MCP tool registry: dispatches
- CLI commands → Page scanner: calls scan
- Local HTTP API → Page scanner: calls scan
- Page scanner → Websites: fetches page
- Page scanner → Page classifier: classifies content
- Page scanner → Scan history: stores scan
- CLI commands → Scan history: reads history
- Local HTTP API → Scan history: reads history
- CLI commands → Markdown reports: generates report
- Local HTTP API → Markdown reports: generates report
- MCP tool registry → Browser MCP tools: registers tools
- Browser MCP tools → Browser task control: invokes lifecycle
- Browser task control → Playwright worker API: calls worker
- Playwright worker API → Persistent browser: delegates tasks
- Persistent browser → Websites: navigates
- Persistent browser → Session profiles: uses profile
- Human login → Manual login worker: completes login
- Manual login worker → Session profiles: saves session
- MCP tool registry → Authenticated task tools: registers tools
- Authenticated task tools → Auth task lifecycle: runs task actions
- Auth task lifecycle → Session profiles: probes profile
- Auth task lifecycle → Websites: checks target
- MCP tool registry → Login gateway tools: registers tools
- Login gateway tools → Login gateway control: runs gateway actions
- Login gateway control → Temporary noVNC gateway: controls gateway
- Temporary noVNC gateway → Human login: provides login access
- Browser task control → Device health: collects health
- Cloudflare → Route A tunnel: tunnels traffic
- Route A tunnel → MCP HTTP: forwards MCP
- Cloudflare → Secure MCP tunnel: supports tunnel
- Secure MCP tunnel → MCP HTTP: connects client
- Cloudflare → Temporary noVNC gateway: protects access