Chronos Browser
# Chronos-Browser
A fast, lightweight browser and Model Context Protocol (MCP) server written in Rust. It eliminates token waste from vision/screenshot models by parsing web pages into a compact, numeric-referenced semantic tree.
## Highlights
- **Pure Rust Engine**: Communicates directly with Chromium over WebSocket Chrome DevTools Protocol (CDP). No Node.js or Playwright needed.
- **Zero-Screenshot Workflow**: Turns pages into actionable element maps (`[1] Button "Submit"`, `[2] Input "Username"`). Actions target numeric IDs directly.
- **Dialog & Overlay Isolation**: Automatically detects modal dialogs and presents modal controls first so agents never click occluded backdrop elements.
- **Table & Content Parsing**: Extracts tables and key content into structured text alongside controls.
- **Session Persistence**: Stores sessions in named profiles (`~/.local/share/chronos-browser/profiles/`). Log in once (e.g. WhatsApp Web QR code in headful mode), then automate headlessly.
- **Memory Footprint**: Capped V8 heaps and resource limits keep active RAM around 350 MB PSS. `sleep` mode drops idle RAM to ~3.8 MB with instant wake.
## Installation
Requires Rust 1.75+ and a Chromium binary (`google-chrome`, `chromium`, or `brave`).
```bash
cargo build --release
cargo install --path .
```
## CLI Usage
Run directly from your shell:
```bash
# Open page headlessly and print snapshot
chronos-browser open "https://news.ycombinator.com"
# Open in visible window with named profile (for QR scan or manual login)
chronos-browser open "https://web.whatsapp.com" --profile whatsapp --headful
# List saved persistent profiles
chronos-browser profiles
```
## MCP Configuration
### Antigravity (`~/.gemini/config/mcp_config.json`)
```json
{
"mcpServers": {
"chronos-browser": {
"command": "chronos-browser",
"args": ["mcp"]
}
}
}
```
### Claude Desktop (`claude_desktop_config.json`)
```json
{
"mcpServers": {
"chronos-browser": {
"command": "chronos-browser",
"args": ["mcp"]
}
}
}
```
## Verification
```bash
cargo test --lib --tests
```
TDQS
Scored across 20 tools
Most tools map to a distinct browser action (navigate, click, type, scroll, screenshot, etc.), and the descriptions differentiate the tricky pair browser_evaluate (JS in page context) vs browser_run_code (Python in the daemon). Minor overlaps remain: browser_status also reports active tabs, browser_tabs lists them, and browser_focus vs browser_launch(focus=True) can be confused with browser_batch abstracting over multiple actions.
Every tool uses the same browser_ prefix followed by a concise snake_case verb or verb_noun (browser_navigate, browser_new_tab, browser_close_tab). There are no camelCase or style deviations, making the set highly predictable.
20 tools is on the heavy side, but for a full browser automation daemon each tool covers a real capability (lifecycle, navigation, input, extraction, tab management, waiting, plus batch/JS/Python escape hatches). It is slightly over the comfortable 3-15 band but not gratuitously bloated.
Core lifecycle, navigation, interaction, extraction, screenshotting, tab management, and waiting are all covered, with evaluate/run_code/batch acting as powerful escape hatches. Gaps exist for history actions (back/forward/reload), hover/select/file-upload, and cookie/storage management, but most are workaroundable via browser_evaluate.