# browser-rs-mcp: Lightweight Stealth Browser Server for AI Agents in Rust

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/maestrojeong-browser-rs-mcp
Generated for open source discovery and AI-assisted research.

browser-rs-mcp is a lightweight, stealth-oriented Model Context Protocol (MCP) browser server written in Rust. It enables multiple AI agents to share a single, persistent Chrome instance, offering over 64 Playwright-style tools without requiring a Node.js runtime. This project is ideal for parallel web scraping, automation, and QA, providing efficient and isolated tab control for each agent.

GitHub: https://github.com/maestrojeong/browser-rs-mcp
OSRepos URL: https://osrepos.com/repo/maestrojeong-browser-rs-mcp

## Summary

browser-rs-mcp is a lightweight, stealth-oriented Model Context Protocol (MCP) browser server written in Rust. It enables multiple AI agents to share a single, persistent Chrome instance, offering over 64 Playwright-style tools without requiring a Node.js runtime. This project is ideal for parallel web scraping, automation, and QA, providing efficient and isolated tab control for each agent.

## Topics

- Rust
- AI Agents
- Browser Automation
- Web Scraping
- MCP Server
- Chrome DevTools Protocol
- Playwright Alternative
- Stealth Browser

## Repository Information

Last analyzed by OSRepos: Fri Sep 25 2026 01:19:13 GMT+0100 (Western European Summer Time)
Detail views: 0
GitHub clicks: 0

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

**browser-rs-mcp** is a lightweight, stealth-oriented Model Context Protocol (MCP) browser server built in Rust. It's designed to allow multiple AI agents to efficiently share a single, persistent Chrome instance. With over 64 Playwright-style tools, it provides robust capabilities for parallel web scraping, automation, and quality assurance, all without the need for a Node.js runtime. Each agent operates within its own isolated tab group, ensuring efficient resource utilization and clear separation of tasks.

## Why Use and Key Benefits

browser-rs-mcp offers significant advantages, especially for multi-agent AI systems and web automation tasks:

*   **Efficiency and Performance**: Built in Rust, it compiles into a single, compact binary (~5.5 MB) with a minimal memory footprint (~6 MB RSS for the server), significantly less than Node.js-based alternatives.
*   **Multi-Agent Collaboration**: It allows multiple AI agents to share one logged-in Chrome browser and a persistent profile. Each agent controls only its own tabs, enabling parallel operations without each agent needing to launch its own browser instance.
*   **Stealth-Oriented Design**: The default headful mode uses a locally installed Chrome with a persistent profile and does not inject page patches, minimizing common automation signals. It includes reproducible detector runners for testing against bot detection.
*   **Simplified Deployment**: As a single Rust binary, it eliminates the complexities of Node.js runtimes and npm dependency trees, making deployment straightforward.
*   **Comprehensive Toolset**: It provides 68 `browser_*` tools, covering navigation, interaction, network requests, cookies, storage, and diagnostics, offering Playwright-style functionality.

Here's a comparison with Playwright/Puppeteer-based MCP solutions:

| Feature | browser-rs-mcp | Playwright/Puppeteer-based MCP (Node) |
|---|:--|:--|
| Server runtime | Single Rust binary | Node.js + npm dependency tree |
| Release artifact | ~5.5 MB | Runtime and packages installed separately |
| Server memory¹ | ~6 MB RSS | ~180 MB RSS |
| Multi-agent control | One Chrome, owner-isolated tab groups | Separate coordination required |
| Browser control | Raw CDP over one multiplexed WebSocket | Playwright |

¹ Historical maintainer measurements excluding Chrome, taken from idle local servers. Exact memory varies by OS, build, runtime, and workload; treat these figures as an order-of-magnitude comparison, not a benchmark guarantee.

## Installation

Getting started with browser-rs-mcp is simple. A locally installed Google Chrome or Chromium browser is also required.

**1. Install on macOS arm64 or Linux x64:**

bash
curl -fsSL https://raw.githubusercontent.com/maestrojeong/browser-rs-mcp/main/install.sh | sh
browser-rs --help


**2. Install on Windows x64:**

powershell
irm https://raw.githubusercontent.com/maestrojeong/browser-rs-mcp/main/install.ps1 | iex
browser-rs --help


To pin a specific release instead of following `latest`:

bash
curl -fsSL https://raw.githubusercontent.com/maestrojeong/browser-rs-mcp/main/install.sh | AB_VERSION=v0.3.1 sh


Alternatively, you can build from source using Cargo:

bash
cargo install --git https://github.com/maestrojeong/browser-rs-mcp ab-mcp


Set `AB_CHROME` if Chrome is not in a standard location.

## Examples

### Quick Start

After installation, you can run `browser-rs` and verify its operation:

**1. Run the server:**

bash
browser-rs


**2. Verify with an MCP client:**

Point an MCP client at it and drive the browser. A headful Chrome window will open.

text
browser_navigate  ? https://example.com
browser_snapshot                          # returns the accessibility tree


The common workflow involves `browser_snapshot`, performing an action, and then inspecting the returned accessibility diff. Most interaction tools accept a snapshot `ref` or a CSS selector.

### Connect an MCP Client

`browser-rs` speaks standard MCP over stdio. Any compliant client can connect with a simple configuration. For example, a generic JSON configuration for an MCP client would look like this:

c
{
  "mcpServers": {
    "browser-rs": {
      "command": "browser-rs"
    }
  }
}


For scenarios where several agents need to share one browser process and profile, you can use HTTP mode:

bash
browser-rs --port 9321
# streamable HTTP: http://127.0.0.1:9321/mcp
# legacy SSE:      http://127.0.0.1:9321/sse


Configure your client with `http://127.0.0.1:9321/mcp` for streamable HTTP.

### Multi-Agent Tabs

When using HTTP, each request can identify its owner (via an `?owner=` query parameter or `X-Browser-Owner` header). New tabs are assigned to the request owner, and each agent can only list, switch, and control its own tabs. This allows multiple agents to share the same Chrome process and login state while maintaining task isolation.

## Links

*   **GitHub Repository**: [browser-rs-mcp](https://github.com/maestrojeong/browser-rs-mcp){target="_blank"}
*   **License**: [Apache-2.0](https://github.com/maestrojeong/browser-rs-mcp/blob/main/LICENSE){target="_blank"}
*   **Related Project**: [Negotium](https://github.com/maestrojeong/negotium){target="_blank"}