Chronos Browser
# Chronos Browser
**High-Speed Headed Browser Engine & Model Context Protocol (MCP) Server for Autonomous AI Agents.**
Chronos Browser solves the fundamental bottleneck of AI browser automation: latency and setup overhead. Instead of spinning up new browser instances, CDP connections, or ad-hoc Python scripts for every interaction, Chronos uses a **resident background daemon** communicating over a high-performance **UNIX domain socket** (`/tmp/chronos-browser.sock`).
Every click, typing stroke, navigation, or DOM inspection completes in **2 to 15 milliseconds**.
---
## Key Features
- **Sub-15ms Latency**: Resident background daemon keeps Playwright and the browser context persistently warm in memory. Zero process-startup lag.
- **Native Google Chrome**: Prioritizes system `/usr/bin/google-chrome-stable` with hardware GPU acceleration, VA-API video decoding, and natural color rendering (no forced dark mode).
- **Embedded Script Runner**: Run complex Playwright logic instantly inside the resident daemon (`chronos-browser run "await page.title()"`) without writing or spawning Python files.
- **Standard Model Context Protocol (MCP)**: 18 high-performance tools ready for Hermes, Claude Desktop, Cursor, or Goose.
- **Smart Locators**: Automatically resolves CSS, text content, XPath, aria-labels, placeholders, and button titles.
- **Tab & Profile Isolation**: Manages multiple tabs, headless or headed modes (`DISPLAY=:1`), and persistent sessions (WhatsApp Web, Google Workspace, GitHub).
---
## Architecture
```
+--------------------------------------------------------+
| AI Agent / User CLI / Claude / Cursor |
+--------------------------------------------------------+
|
JSON-RPC over UNIX Domain Socket
(/tmp/chronos-browser.sock)
| (< 15ms latency)
+--------------------------------------------------------+
| Chronos Resident Daemon |
| - In-memory Playwright instance |
| - Active Page/Context references |
| - Embedded Python Snippet Execution Engine |
+--------------------------------------------------------+
|
Persistent Chrome DevTools Protocol
| (127.0.0.1:9222)
+--------------------------------------------------------+
| Google Chrome Stable (Headed) |
| - Hardware GPU Acceleration (VA-API / OpenGL) |
| - Persistent Profile (~/.config/chronos-chrome-prof) |
+--------------------------------------------------------+
```
---
## Installation
```bash
git clone https://github.com/Thorn-probably/chronos-browser.git ~/Documents/MAIN/NEW/chronos-browser
cd ~/Documents/MAIN/NEW/chronos-browser
pip install -e .
```
To create convenience aliases / symlinks:
```bash
ln -sf $(which chronos-browser) ~/.local/bin/ordis-browser
ln -sf $(which chronos-browser-mcp) ~/.local/bin/ordis-browser-mcp
```
---
## CLI Quickstart
The CLI automatically starts the resident daemon on first use:
```bash
# Check status and open tabs
chronos-browser status
# Navigate
chronos-browser goto "https://web.whatsapp.com"
chronos-browser search "autonomous coding agents"
# Instant DOM Interaction (< 15ms)
chronos-browser click "button#submit"
chronos-browser click "Shashank Jangid"
chronos-browser type "input[type='text']" "Hello world" --press-enter
chronos-browser press "Enter"
chronos-browser scroll down
# Instant Content Extraction
chronos-browser markdown
chronos-browser text "div.message-in"
chronos-browser links
chronos-browser screenshot /tmp/preview.png
# Embedded Script Runner (No separate Python files needed!)
chronos-browser run "await page.title()"
chronos-browser run "await page.locator('textarea').fill('Fast agent'); await page.keyboard.press('Enter')"
# Tab Management
chronos-browser tabs
chronos-browser new-tab "https://github.com"
chronos-browser switch-tab 1
chronos-browser close-tab 0
# Stop Browser
chronos-browser stop
```
---
## MCP Server Integration
Add Chronos Browser to your MCP configuration:
### Claude Desktop (`~/.config/Claude/claude_desktop_config.json`) / Cursor:
```json
{
"mcpServers": {
"chronos-browser": {
"command": "chronos-browser-mcp"
}
}
}
```
### Hermes Agent (`~/.hermes/config.yaml`):
```yaml
mcp_servers:
chronos-browser:
command: /home/pranshoo/.local/bin/chronos-browser-mcp
enabled: true
```
### Available MCP Tools (18 Tools):
| Tool | Description |
|---|---|
| `browser_launch` | Launch or ensure headed Chromium/Chrome is running |
| `browser_status` | Return running state, active tabs, and port |
| `browser_navigate` | Navigate active or specified tab to URL |
| `browser_click` | Click elements by selector, text, aria-label, or title |
| `browser_type` | Type/fill text into inputs, textareas, contenteditable |
| `browser_press_key` | Send keyboard keys (Enter, Escape, Tab, etc.) |
| `browser_scroll` | Scroll up, down, top, bottom, or exact delta |
| `browser_get_content` | Extract clean markdown, text, or HTML |
| `browser_get_links` | Return all interactive page links with URLs |
| `browser_screenshot` | Capture viewport or full-page PNG |
| `browser_evaluate` | Run arbitrary JavaScript in page context |
| `browser_tabs` | List open tabs with title and URL |
| `browser_new_tab` | Open a new tab |
| `browser_switch_tab` | Focus specific tab index |
| `browser_close_tab` | Close specified tab index |
| `browser_wait` | Wait for selector or duration |
| `browser_batch` | Execute chained multi-step actions in one request |
| `browser_run_code` | Execute Python snippets directly in resident daemon |
| `browser_stop` | Terminate browser and resident daemon |
---
## License
MIT License. See [LICENSE](LICENSE) for details.
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.