This repository implements an MCP (Model Context Protocol) server that exposes Chrome DevTools capabilities as tools for AI coding assistants. In production, it launches a headless or headed Chrome browser via Puppeteer, connects to the DevTools frontend SDK, and provides over 50 tools covering navigation, input automation, network inspection, performance tracing, heap snapshot analysis, CSS inspection, accessibility auditing (via Lighthouse), PWA management, and extension debugging. The architecture is a Node.js server that runs either as a long-lived daemon (Unix socket IPC) or as a CLI tool, with a configuration pipeline supporting CLI flags, config files, and environment variables. Key entry points are `src/bin/chrome-devtools-mcp.ts` (MCP server) and `src/bin/chrome-devtools.ts` (standalone CLI). Data flows involve collecting console messages, network requests, and DevTools issues per page via `PageCollector`, processing performance traces via `ChunkedTraceParser` and `PerformanceTrace`, and formatting results through specialized formatters (`ConsoleFormatter`, `CssFormatter`, `HeapSnapshotFormatter`, etc.) that support both text and structured JSON output. External dependencies include Puppeteer for browser control, the DevTools frontend SDK for advanced features (heap snapshots, stack traces), Lighthouse for audits, and a telemetry system (Clearcut) for usage statistics.
This repository contains a VS Code extension that acts as a bridge between the Antigravity IDE and a mobile device, enabling remote interaction via a local HTTPS server. The extension starts a self-signed HTTPS server on the LAN, uses the Chrome DevTools Protocol (CDP) to inspect and manipulate Antigravity IDE instances, and leverages the Language Server Protocol (LSP) to monitor and control code generation processes. A companion mobile web interface, served by the local server, provides real-time chat mirroring, message sending, file uploads, voice input, and generation control through a WebSocket connection. The architecture consists of three main parts: the VS Code extension (managing the server lifecycle and IDE integrations), the Express/WebSocket server (handling API requests, real-time communication, and static file serving), and the mobile SPA (rendering the IDE state and forwarding user interactions). Key capabilities include QR-code based pairing, end-to-end encrypted local communication, multi-instance switching, and programmatic control via an MCP server that exposes the API over stdio JSON-RPC. The extension demonstrates solid engineering practices with TypeScript, modular service layers, middleware for authentication and security, and a test suite covering core functionality. While tightly coupled to Antigravity's UI and protocols by necessity, it isolates concerns through well-defined services (CDP, LSP, antigravity interactions) and reusable patterns such as the CSP middleware, CDP wrapper, and stdio JSON-RPC proxy. Ongoing maintenance addresses selector fragility and API updates, ensuring compatibility with evolving IDE and VS Code versions.
The OpenCode Browser plugin provides browser automation capabilities through direct connections to the Chrome DevTools Protocol (CDP). It exposes a set of tools (browser_list, browser_navigate, browser_snapshot, browser_click, browser_fill, browser_eval, browser_screenshot) that allow an AI agent to control a browser by specifying the browser's debugging endpoint (browser_url) and optionally a target ID. The plugin consists of three main parts: the plugin interface (src/plugin.ts), a lightweight CDP client over WebSocket (src/lib/cdp.ts), and accessibility tree snapshot utilities with unique element IDs for interaction (src/lib/snapshot.ts). The CDP client handles connection, message exchange, and event handling, while the snapshot utility processes the accessibility tree to generate a tree of nodes with stable UIDs for use in click and fill operations.
This repository provides a stealth browser automation MCP (Model Context Protocol) server that offers undetectable control over real browser instances (Chrome, Chromium, Edge) via the Chrome DevTools Protocol (CDP) and the `nodriver` library. It exposes 97 tools across 11 sections including navigation, DOM interaction, element extraction (styles, structure, events, animations), network interception and modification (including dynamic Python-powered hooks), CDP command execution, cookie management, tab control, and proxy forwarding with authentication. The architecture is a FastMCP-based server with singleton managers for browser instances, network interception, element cloning, and process cleanup. It supports stdio and HTTP transports, Docker deployment, and optional bearer auth. The system is designed to bypass anti-bot detection (Cloudflare, CreepJS, login walls) and is used for scraping, testing, and AI agent automation. While the codebase is well-structured and the functionality is comprehensive, there is some code duplication across multiple element cloner implementations and technical drift risk due to tight coupling with CDP APIs and the `py2js` transpiler dependency.