browser-mesh
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
High-Speed, Zero-Token-Waste Autonomous Browser Engine for AI Agents & MCP.
Eliminates the 1,500-token vision tax. Built-in Tier-0 indirect prompt injection firewall (<0.4ms overhead), semantic multi-attribute element grounding, and native Model Context Protocol (MCP) server.
Quick Start • Architecture • Benchmarks vs Global Competitors • MCP Setup • Ecosystem
⚡ The Problem with Current Browser Agents
Current browser automation libraries like browser-use, stagehand, and skyvern suffer from 3 critical architectural bottlenecks:
Abusive Vision Token Burn: Sending 1080p screenshots for every
clickorscrollburns 1,500+ tokens per action. A simple 10-step flow costs $0.40–$0.90 and takes 30–50 seconds.Brittle Numeric/XPath Grounding: Floating numeric bounding boxes or raw XPaths invalidate the moment React or Vue components re-render during hydration, causing hallucinated clicks.
Zero Pre-Execution Guardrails: Ingesting untrusted third-party DOM text directly into LLM context leaves agents completely vulnerable to Indirect Prompt Injection hidden in CSS or comments.
Related MCP server: openmcp
🏗️ The agent-browser-mesh Architecture
Claude Code / Cursor / Codex / Autonomous Web Agents
│
├──► Python SDK BrowserMesh.navigate() / snapshot() / click()
└──► STDIO JSON-RPC 2.0 (agent-browser mcp)
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ agent-browser-mesh (ABM) │
│ │
│ ┌───────────────────┐ ┌───────────────────┐ ┌─────────────────┐ │
│ │ Tier-0 Guard │ │ DOM-Delta A11y │ │ Semantic │ │
│ │ (SG-4 & SG-5) │─►│ Compiler │─►│ Fingerprinting │ │
│ │ • SSRF / RFC1918 │ │ • >90% Token Save │ │ • Invariant Hash│ │
│ │ • Prompt Shield │ │ • Noise Stripping │ │ • Fuzzy Anchor │ │
│ └───────────────────┘ └───────────────────┘ └─────────────────┘ │
│ │
│ ┌───────────────────┐ ┌───────────────────┐ ┌─────────────────┐ │
│ │ Action Executor │ │ Live Telemetry │ │ Browser Doctor │ │
│ │ (Click / Type) │ │ & Health Monitor │ │ & Bench Matrix │ │
│ │ • CDP / HTTP Core │ │ • P50/P90/P99 ms │ │ • Guard Probe │ │
│ └───────────────────┘ └───────────────────┘ └─────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘
│ │
▼ ▼
Compact DOMDelta (<150 tokens) ActionResult & Audit Trail
(Markdown View + Anchor Registry) (SSRF & Injection Verdicts)⚡ 92%+ Token Reduction (DOM-Delta A11y Tree): Compiles the web accessibility tree into a compact semantic markdown view (<120 tokens/action). Vision screenshots are only triggered as an emergency fallback on canvas or visual ambiguity.
🎯 Semantic Fingerprinting: Anchors elements by invariant tuples
(role, aria-label, text_hash, quadrant). Immune to Tailwind class scrambles and DOM re-ordering.🛡️ Tier-0 Guardrails (SG-4 SSRF + SG-5 Injection Firewall): Blocks private RFC1918 subnets and cloud metadata endpoints (
169.254.169.254) while sanitizing adversarial prompts in-place.🔌 Native Model Context Protocol (MCP) Server: Plug-and-play with Claude Desktop, Cursor, and Codex with zero custom adapter code.
🚀 Zero Heavy Infrastructure: Pure Python. No Docker Compose, no Redis, no PostgreSQL required.
🏆 Benchmarks vs Global Competitors
Empirical comparison on real-world multi-step web tasks (E-commerce Checkout & Documentation Search):
Metric |
|
|
|
|
Token Cost per Action | ~1,500 tokens (Vision) | ~800 tokens | ~2,000 tokens | ⚡ <120 tokens (92% cheaper) |
Action Execution Latency | ~4,500 ms | ~3,800 ms | ~8,200 ms | ⚡ <650 ms (CDP Native) |
Prompt Injection Defense | ❌ None | ❌ None | ❌ None | 🛡️ Built-in SG-5 Real-time Firewall |
SSRF / Intranet Blocking | ❌ None | ⚠️ Partial | ❌ None | 🔒 SG-4 Cloud Metadata & RFC1918 Gate |
Element Stability on Re-render | ❌ Fragile indices | ⚠️ XPath fallback | ⚠️ OCR fallback | 🎯 Multi-Attribute Invariant Hash |
Setup Complexity | Playwright + Chromium | Browserbase API Key | Docker + Redis + Postgres | ⚡ 1-Line |
Native MCP Server | ⚠️ Community wrapper | ⚠️ Cloud-only | ❌ No | 💎 Built-in First-Class MCP |
🚀 Quick Start
1. Installation
pip install agent-browser-mesh2. Python SDK
from agent_browser_mesh import BrowserMesh
# Initialize with strict zero-trust guardrails
mesh = BrowserMesh(strict_security=True)
# 1. Navigate (with automatic SSRF & prompt-injection sanitization)
result = mesh.navigate("https://news.ycombinator.com")
print(result.message)
# 2. Get ultra-compact DOM-Delta (<150 tokens)
delta = mesh.snapshot()
print(f"Token savings: {delta.token_savings_pct}% (~{delta.estimated_tokens} tokens)")
print(delta.markdown_view[:500])
# 3. Click actionable semantic anchor
click_res = mesh.click("@link-comments-4a12")
print(click_res.message)
# 4. Extract structured data with zero visual overhead
data = mesh.extract()3. Command-Line Interface (CLI)
# Inspect any URL and view token compression analysis
agent-browser inspect https://github.com/trending
# Run token savings benchmark
agent-browser benchmark
# Start native MCP stdio server
agent-browser mcp🏗️ Claude Desktop & Cursor MCP Integration
Add agent-browser-mesh directly to your claude_desktop_config.json:
{
"mcpServers": {
"browser-mesh": {
"command": "agent-browser",
"args": ["mcp"]
}
}
}Now your AI coding agent has native, high-speed web browsing with zero vision token waste and built-in prompt injection defense!
📁 Project Structure
agent-browser-mesh/
├── src/agent_browser_mesh/
│ ├── __init__.py # Backwards-compatible public API exports
│ ├── cli.py # CLI entrypoint bridge
│ ├── core/
│ │ ├── __init__.py # Core browser mesh primitives package
│ │ ├── actions.py # Deterministic ActionExecutor (click, type, extract)
│ │ ├── dom_compiler.py # Semantic DOM-Delta compiler (>90% token savings)
│ │ ├── engine.py # BrowserMesh session & navigation orchestrator
│ │ ├── fingerprint.py # Multi-attribute invariant SemanticAnchor & registry
│ │ └── guardrails.py # SG-4 SSRF gate & SG-5 prompt-injection sanitizer
│ ├── serve/
│ │ ├── __init__.py # Serving & observability exports
│ │ ├── __main__.py # Unified Click CLI (inspect, mcp, doctor, matrix, health)
│ │ ├── health_monitor.py # DOMCompiler & BrowserGuardrails health probe
│ │ ├── mcp_bridge.py # Native MCP JSON-RPC 2.0 stdio server
│ │ └── telemetry.py # Thread-safe P50/P90/P99 latency & savings telemetry
│ └── tools/
│ ├── __init__.py # Diagnostics & benchmarking exports
│ ├── bench_matrix.py # Multi-page DOM-Delta compaction matrix
│ └── doctor.py # End-to-end browser mesh diagnostic probe
├── examples/
│ ├── quickstart_browser_mesh.py # Minimal offline DOM-Delta & anchor click example
│ └── guardrails_and_telemetry.py # SSRF blocking, prompt sanitization & telemetry
├── scripts/
│ ├── benchmark_dom_delta.py # Multi-page DOM-Delta compaction benchmark
│ └── gate_ssrf_guardrails.py # SSRF, injection & runtime health gate runner
├── docs/
│ └── ARCHITECTURE.md # Three-tier package architecture reference
└── tests/ # Full pytest suite (18 tests)🌐 The Benni OS Open-Source Ecosystem
agent-browser-mesh is part of the coordinated Benni Master OS v9.4 open-source infrastructure suite:
Repository | Focus & Architecture | Stars |
Zero-Dependency Spec-Driven Development, Static AST Drift Detector & MCP Guardrail | ||
High-Throughput Sovereign Local Inference for 8GB–16GB Consumer GPUs | ||
Deterministic Zero-Cloud Agent Evaluation, Red-Teaming & Benchmark Harness | ||
Micro-Second Zero-Dependency Code Sandbox & Execution Shield for AI Agents | ||
Autonomous Multi-Source Deep Research & Evidence Synthesis Engine | ||
Token-Saving Resilient Headless Browser Automation & A11y DOM Compiler | ||
Deterministic Intent Compiler & Typed DAG Execution Planner for AI Agents | ||
Sub-Millisecond Context Compression & Semantic Deduplication Engine | ||
Real-Time Biometric Swarm Governance & 120 FPS Resonant Kinetic Interface | ||
Zero-Trust Runtime Security, Prompt Injection Firewall & Secrets Redaction | ||
Deterministic Multi-Step Task Execution Ledger & Anti-Looping Engine | ||
Cryptographic State Verification & Invariant Proof Engine for Agents | ||
Hybrid Vector + BM25 Hierarchical Session Memory & Continuity Engine | ||
Human-in-the-Loop Approval & Policy Enforcement Gateway | ||
Rapid Model Context Protocol (MCP) Server Scaffolding & Dynamic Tooling | ||
Autonomous Multi-Agent Intent Routing & Swarm Coordination Hub | ||
Autonomous GitHub Community Triaging & PR Feedback Agent |
🏛️ Commercial & Sovereign Architecture
Need autonomous multi-agent swarm orchestration, private datacenter infrastructure, or enterprise governance?
Official Website: https://benni-os.net
Operator Mode Playbook: https://benni-os.net/blog/academy.html
GitHub Organization: https://github.com/Benni-OS
Maintainer: Benni Alencar
📄 License & Provenance
License: Distributed under the Apache License, Version 2.0 (
Apache-2.0).Author: Benni Alencar (
benni@benni.ai)Architecture: Benni Master OS v9.4 Tier-0 Governance Standard
agent-browser-mesh — Token-Saving Resilient Headless Browser Automation & A11y DOM Compiler • benni-os.net • Apache-2.0 License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Cloud browser, web extraction, screenshots, and remote CDP tools for AI agents.
Hosted browser for AI agents: screenshots, post-JS DOM, console, WCAG. No install, no API key.
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceBrowser automation for AI agents via the Model Context Protocol, enabling web navigation, form filling, screenshots, and more using Chromium.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to automate web tasks such as browsing, clicking, typing, and taking screenshots via the Model Context Protocol.1MIT
- AlicenseAqualityBmaintenanceEnables browser automation through the Model Context Protocol, allowing AI agents to control Chrome, Firefox, or Edge for tasks like navigation, clicking, typing, and screenshots.4165 npmMIT

Browseagent MCPofficial
AlicenseAqualityDmaintenanceEnables AI agents to control web browsers through the Model Context Protocol, supporting navigation, clicking, typing, and screenshots.1210 npm1MIT