Skip to main content

MCP Server

The meshbrow-mcp server exposes Meshbrow’s stealth browser capabilities as MCP tools. Compatible with Claude Desktop, VS Code Copilot, Cursor, and any MCP-compatible client.

Installation

brew tap meshbrow-dev/tap
brew install meshbrow-mcp
Verify the installation:
meshbrow-mcp --version
# meshbrow-mcp v0.1.0

Configuration

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
  "mcpServers": {
    "meshbrow": {
      "command": "meshbrow-mcp",
      "args": ["--mode", "stdio"],
      "env": {
        "MESHBROW_API_KEY": "mb_live_your_key_here"
      }
    }
  }
}

VS Code (GitHub Copilot)

Add to .vscode/mcp.json in your project:
{
  "servers": {
    "meshbrow": {
      "command": "meshbrow-mcp",
      "args": ["--mode", "stdio"],
      "env": {
        "MESHBROW_API_KEY": "mb_live_your_key_here"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json:
{
  "mcpServers": {
    "meshbrow": {
      "command": "meshbrow-mcp",
      "args": ["--mode", "stdio"],
      "env": {
        "MESHBROW_API_KEY": "mb_live_your_key_here"
      }
    }
  }
}

Standalone (WebSocket)

Run the MCP server over WebSocket for remote/shared access:
meshbrow-mcp --mode ws --port 9090 --api-key mb_live_...

CLI Flags

FlagEnv VariableDefaultDescription
--modeMESHBROW_MCP_MODEstdioTransport: stdio or ws
--portMESHBROW_MCP_PORT9090WebSocket listen port
--api-urlMESHBROW_API_URLhttps://api.meshbrow.devAPI endpoint
--api-keyMESHBROW_API_KEY(required)Your API key
--log-levelMESHBROW_LOG_LEVELinfoLog level

Available Tools

Session Management

ToolDescription
session_createLaunch a stealth browser session with proxy and fingerprint
session_listList all active sessions
session_getGet session details and CDP endpoint
session_destroyDestroy a session (optionally save profile)

Browser Actions

ToolDescription
browser_navigateNavigate to a URL
browser_screenshotTake a screenshot (base64 PNG)
browser_clickClick an element by CSS selector
browser_typeType text into an input field
browser_extractExtract text/data from the page
browser_executeExecute arbitrary JavaScript
browser_waitWait for an element to appear
browser_scrollScroll the page

Profiles

ToolDescription
profile_createCreate a persistent browser profile
profile_listList saved profiles
profile_getGet profile details
profile_deleteDelete a profile

Fleet

ToolDescription
fleet_createLaunch multiple sessions in parallel
fleet_statusCheck fleet session statuses
fleet_destroyDestroy all fleet sessions

Example: AI Agent Web Research

User: "Find the current price of Bitcoin on CoinGecko"

Agent calls: session_create({ stealth: "max", proxy_country: "US" })
→ Returns: { id: "sess_abc123", cdp_endpoint: "wss://..." }

Agent calls: browser_navigate({ session_id: "sess_abc123", url: "https://coingecko.com/en/coins/bitcoin" })
→ Returns: { status: "loaded" }

Agent calls: browser_extract({ session_id: "sess_abc123", selector: "[data-target='price.price']" })
→ Returns: { result: "$67,432.12" }

Agent calls: session_destroy({ session_id: "sess_abc123" })
→ Returns: { status: "destroyed" }

Agent responds: "The current Bitcoin price on CoinGecko is $67,432.12"

Security

The MCP server enforces:
  • API key required — all tool calls require a valid MESHBROW_API_KEY
  • Session isolation — each session runs in its own network namespace
  • No credential leakage — proxy credentials and fingerprint internals are never exposed in tool responses
  • Structured logging — all operations are logged to stderr (never stdout, which is reserved for MCP protocol)

Best Practices

Store login cookies in profiles so agents don’t need to re-authenticate each time.
Include cleanup in your agent’s error handling. Leaked sessions cost money and resources.
Text extraction is faster and uses fewer tokens than screenshot-based approaches.