Skip to main content
Glama
johannschiffer

BrowserBridge MCP

README.md
# BrowserBridge MCP (Lite Edition)

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Protocol: MCP](https://img.shields.io/badge/MCP-2024--11--05-green.svg)](https://modelcontextprotocol.io/)
[![Python: >=3.10](https://img.shields.io/badge/Python->=3.10-yellow.svg)](https://python.org/)

**BrowserBridge MCP** is a lightweight headless browser session bridge and Accessibility Object Model (AOM) inspector designed for AI coding assistants (Claude Desktop, Cursor, OpenAI Codex, LangGraph).

It enables agents to navigate web applications, extract semantic clean text, and interact with web pages without drowning the LLM context window in massive HTML blobs.

---

## ๐ŸŽฏ The Problem

When autonomous AI agents interact with web pages:
1. **Context Window Exhaustion:** Dumping 2MB of raw HTML, scripts, CSS, and SVG icons into an LLM exhausts the token budget within 3 turns.
2. **Brittle Selectors:** Agents fail to find buttons when modern websites use dynamic, hashed class names (`class="btn_3x9a_primary"`).
3. **Zombie Memory Leaks:** Unmanaged headless browsers leak memory on the host system when agents drop sessions without cleanup.

**BrowserBridge** solves this by converting web pages into a compact, token-efficient Accessibility Object Model (AOM) tree (~95% token reduction) and providing clean interaction primitives.

---

## โœจ Features (Lite Edition)

- ๐ŸŒ **Headless Navigation:** Fetch and navigate web pages with automatic redirect handling.
- ๐ŸŒณ **Accessibility Tree (AOM) Extraction:** Filters noisy DOMs into structured interactive nodes (buttons, links, textboxes) with stable `@node` identifiers.
- ๐Ÿงน **Clean Text Extractor:** Strips scripts, ads, and formatting for fast summarization.
- โšก **Zero Browser Overhead:** Pure Python runtime compatible with Claude Desktop and Cursor.

---

## ๐Ÿš€ Quickstart

### 1. Installation

```bash
git clone https://github.com/johannschiffer/browserbridge-mcp.git
cd browserbridge-mcp
pip install -e .
```

### 2. Configure in Claude Desktop or Cursor

Add to your `claude_desktop_config.json` or Cursor MCP settings:

```json
{
  "mcpServers": {
    "browserbridge": {
      "command": "browserbridge",
      "args": ["run"]
    }
  }
}
```

### 3. CLI Inspection

```bash
# Inspect clean accessibility nodes of any website
browserbridge aom https://news.ycombinator.com
```

---

## ๐Ÿ› ๏ธ MCP Tools Reference

| Tool | Parameters | Description |
|---|---|---|
| `navigate_page` | `url`, `session_id` | Navigates headless browser to destination URL |
| `extract_clean_text` | `session_id` | Extracts cleaned markdown text from page |
| `extract_accessibility_tree` | `session_id` | Extracts compact interactive elements (AOM) |
| `click_element` | `selector`, `session_id` | Simulates click on interactive element |
| `fill_form_field` | `selector`, `value`, `session_id` | Fills input or textarea field |
| `get_page_status` | `session_id` | Returns current URL, title, and response code |

---

## ๐Ÿš€ Upgrade to BrowserBridge Pro

Need enterprise-grade auditability, durable execution receipts, and browser pool sandboxing?

The **BrowserBridge Pro Edition** adds:
- ๐Ÿ“œ **Durable Action Receipts Engine:** Generates cryptographic SHA-256 receipts for every web action, linking pre/post DOM hashes with visual state snapshots.
- ๐Ÿ›ก๏ธ **Session Pool Manager con Anti-Zombie Auto-Cleanup:** Manages multiple browser contexts with strict inactivity TTLs, preventing memory leaks on your host.
- ๐ŸŽฏ **Visual Element Selector & Coordinate Resolver:** Resolves robust CSS/XPath selectors and handles dynamic single-page applications (SPAs).
- ๐Ÿณ **Production Docker & Compose:** Containerized headless Chromium runtime ready for cloud execution.
- ๐Ÿงช **100% Passing Pytest Suite.**

๐Ÿ‘‰ **[Get BrowserBridge Pro on Gumroad ($14.99 USD)](https://johanld.gumroad.com/l/cfqto)**

---

## ๐Ÿ“„ License

MIT ยฉ 2026 [Johann Schiffer](https://github.com/johannschiffer)

TDQS

A3.5/5.0

Scored across 6 tools

Disambiguation5/5

Each tool targets a distinct action: navigation, two extraction modes with clearly different outputs (markdown vs AOM), clicking, status inspection, and form filling. The two extraction tools are differentiated by description, so an agent can choose correctly.

Naming Consistency5/5

All names use snake_case verb_noun format (navigate_page, extract_clean_text, click_element, etc.). Consistent and predictable.

Tool Count5/5

Six tools is well-scoped for a focused headless browser bridge. Each tool covers a core operation without redundancy.

Completeness3/5

Core navigation, extraction, and basic interaction are covered, but common browser automation operations like scrolling, waiting for elements, taking screenshots, executing JavaScript, or handling multiple tabs are absent. These gaps may force workarounds for complex workflows.

Maintenance

ActivityMaintained
ResponsivenessNo issues