MCP Browser

MCP Browser

NeoForge Browser MCP server - used to test the frontend

neoforge-dev

Browser Automation
Visit Server

README

MCP Browser

A headless browser interface for the Model Control Protocol (MCP).

Features

  • Headless browser automation using Playwright
  • Web UI for browser interaction
  • WebSocket communication for real-time updates
  • Real-time browser event subscription system
  • Integration with MCP for AI agents

Prerequisites

  • Python 3.13+
  • uv for dependency management
  • Docker (for containerized usage)

Installation

One-Line Installation

To install MCP Browser on your Mac with one command:

curl -sSL https://raw.githubusercontent.com/neoforge-dev/mcp-browser/main/install_one_line.sh | bash

This command will download and run the installer with proper line ending handling to avoid common issues.

Manual Installation

For manual installation:

  1. Clone this repository
  2. Run the installer script:
git clone https://github.com/neoforge-dev/mcp-browser.git
cd mcp-browser
./install.sh

XQuartz Requirements

MCP Browser requires XQuartz (X11) for proper visualization. The installer will:

  1. Check if XQuartz is already installed and install it if needed
  2. Attempt to start the X11 server in various ways
  3. Prompt you to start it manually if automatic methods fail

If you encounter issues, see the Troubleshooting XQuartz Issues section.

Local Development

Setup with uv

# Clone the repository
git clone https://github.com/yourusername/mcp-browser.git
cd mcp-browser

# Install dependencies
uv venv .venv
source .venv/bin/activate
uv pip install -e .

# Install Playwright browsers
python -m playwright install

Running Locally

For a simple test without Xvfb:

./simple_test.sh

For a full test with Xvfb (requires X11):

./test_local.sh

Docker Deployment

Build and run using Docker Compose:

# Set your MCP secret
export MCP_SECRET=your_secret_key

# Build and run
docker-compose up --build

Or use the provided script:

./run.sh

Configuration

The following environment variables can be set:

  • MCP_SECRET: Secret key for MCP authentication
  • SERVER_PORT: Port to run the server on (default: 7665)
  • PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: Set to 1 to skip browser download and run in headless-only mode

API Endpoints

  • GET /: Web UI
  • GET /api/status: Get browser and MCP client status
  • WebSocket /ws: WebSocket endpoint for real-time communication
  • WebSocket /ws/browser/events: WebSocket endpoint for browser event subscriptions
  • GET /api/browser/subscribe: Subscribe to browser events
  • GET /api/browser/unsubscribe: Unsubscribe from browser events
  • GET /api/browser/subscriptions: List active event subscriptions

Event Subscriptions

The MCP Browser supports real-time event subscriptions via WebSockets. This allows clients to receive browser events as they happen, including:

  • Page events (navigation, load, error)
  • DOM events (mutations, changes)
  • Console events (logs, warnings, errors)
  • Network events (requests, responses, errors)

For detailed documentation and examples of the event subscription system, see:

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Playwright MCP Server

Playwright MCP Server

Provides a server utilizing Model Context Protocol to enable human-like browser automation with Playwright, allowing control over browser actions such as navigation, element interaction, and scrolling.

Featured
Local
TypeScript
@kazuph/mcp-fetch

@kazuph/mcp-fetch

Model Context Protocol server for fetching web content and processing images. This allows Claude Desktop (or any MCP client) to fetch web content and handle images appropriately.

Featured
Local
JavaScript
DuckDuckGo MCP Server

DuckDuckGo MCP Server

A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.

Featured
Python
YouTube Transcript MCP Server

YouTube Transcript MCP Server

This server retrieves transcripts for given YouTube video URLs, enabling integration with Goose CLI or Goose Desktop for transcript extraction and processing.

Featured
Python
serper-search-scrape-mcp-server

serper-search-scrape-mcp-server

This Serper MCP Server supports search and webpage scraping, and all the most recent parameters introduced by the Serper API, like location.

Featured
TypeScript
The Verge News MCP Server

The Verge News MCP Server

Provides tools to fetch and search news from The Verge's RSS feed, allowing users to get today's news, retrieve random articles from the past week, and search for specific keywords in recent Verge content.

Featured
TypeScript
Tavily MCP Server

Tavily MCP Server

Provides AI-powered web search capabilities using Tavily's search API, enabling LLMs to perform sophisticated web searches, get direct answers to questions, and search recent news articles.

Featured
Python
mcp-pinterest

mcp-pinterest

A Pinterest Model Context Protocol (MCP) server for image search and information retrieval

Featured
TypeScript
Crawlab MCP Server

Crawlab MCP Server

Official
Python