MCP Web Browser Server

MCP Web Browser Server

mcp-web-browser•byrandom-robbie

A Playwright-powered Model Context Protocol server that enables headless browser navigation, text extraction, screenshots and web interaction tools.

License: MIT License•Runtime: Awaiting documentation review•Category: browser automation

WHAT IT DOES

  • •Navigates to any website and returns page content, either visible text or full HTML.
  • •Extracts visible page text or text from specific elements selected via CSS selectors.
  • •Captures screenshots of the full page, viewport, or a specific element as PNG content.
  • •Interacts with pages by clicking elements, entering text, pressing keys and selecting dropdown options.

BEST FOR

  • •Automated form filling and login flows during agent-driven browsing.
  • •Gathering page text and links for downstream language model use.
  • •Capturing page and element screenshots for visual inspection.

ABOUT MCP-WEB-BROWSER

MCP Web Browser Server is cataloged as an MCP server attributed to random-robbie. A Playwright-powered Model Context Protocol server that enables headless browser navigation, text extraction, screenshots and web interaction tools. It is categorized under browser automation. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP Web Browser Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How can the browsing timeout be changed?

Page navigation uses a fixed 30-second timeout and waits for network idle; the load timeout is not configurable.

Can the User-Agent and viewport be customized?

Yes, through environment variables MCP_BROWSER_UA for a custom User-Agent and MCP_BROWSER_VIEWPORT for viewport dimensions.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 1a62f780e7a2 · 采集于 2026-11-13 09:52:40 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

MCP Web Browser Server

An advanced web browsing server for the Model Context Protocol (MCP) powered by Playwright, enabling headless browser interactions through a flexible API.

Web Browser Server MCP server

Features

  • Headless Web Browsing: Navigate to any website with SSL certificate validation bypass
  • Full Page Content Extraction: Retrieve complete HTML content, including dynamically loaded JavaScript
  • Text Extraction: Extract all visible text or text from specific elements
  • Web Interaction Tools:
    • Click page elements
    • Input text into form fields
    • Capture screenshots (full page, viewport, or specific elements)
    • Extract page links
  • Resource Management: Automatic cleanup of browser resources on shutdown

Quick Start

Prerequisites

  • Python 3.10+
  • Playwright (with Chromium installed)

Installation

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

# Install the package and its dependencies (mcp[cli] and playwright)
pip install -e .

# Install the Chromium browser binary
playwright install chromium

Configuration for Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "web-browser": {
      "command": "mcp-web-browser"
    }
  }
}

Alternatively, you can run the server module directly:

{
  "mcpServers": {
    "web-browser": {
      "command": "python",
      "args": ["-m", "mcp_web_browser.server"]
    }
  }
}

Usage Examples

Basic Web Navigation

# Browse to a website (returns the full page HTML)
page_content = browse_to("https://example.com")

# Extract all visible page text
text_content = extract_text_content()

# Extract text from specific elements
title_text = extract_text_content("h1.title")

Web Interaction

# Navigate to a page
browse_to("https://example.com/login")

# Input text into a form
input_text("#username", "your_username")
input_text("#password", "your_password")

# Click a login button
click_element("#login-button")

Screenshot Capture

# Capture full page screenshot (returns PNG image content)
full_page_screenshot = get_page_screenshots(full_page=True)

# Capture viewport only
viewport_screenshot = get_page_screenshots()

# Capture a specific element
element_screenshot = get_page_screenshots(selector="#main-content")
# Get all links on the current page
page_links = get_page_links()

Security Features

  • SSL certificate validation bypass (ignore_https_errors=True on the browser context)
  • Configurable via environment variables: MCP_BROWSER_UA (custom User-Agent) and MCP_BROWSER_VIEWPORT (e.g. 1920x1080)
  • Browser resources closed and cleaned up on server shutdown

Troubleshooting

Common Issues

  • SSL Certificate Errors: Automatically bypassed
  • Slow Page Load: browse_to() uses a fixed 30-second timeout and waits for networkidle
  • Element Not Found: Verify CSS selectors carefully; tools raise an error if no page is loaded, so call browse_to() first

Logging

Significant events (navigation, extraction, errors, cleanup) are logged to stderr for easy debugging.

Tool Parameters

browse_to(url: str, mode: str = "text")

  • url: Full URL to navigate to
  • mode: "text" (default) returns the visible page text — cheaper for LLM use; "html" returns the full HTML content
  • Returns the page content plus the current URL and page title

extract_text_content(selector: Optional[str] = None)

  • selector: Optional CSS selector to extract text from matching elements

click_element(selector: str)

  • selector: CSS selector of the element to click

get_page_screenshots(full_page: bool = False, selector: Optional[str] = None)

  • full_page: Capture the entire page rather than just the viewport
  • selector: Optional CSS selector to screenshot a specific element
  • Returns the screenshot as PNG image content
  • Returns a list of {"text": label, "href": absolute URL} objects

input_text(selector: str, text: str)

  • selector: CSS selector of the input element
  • text: Text to input

press_key(selector: str, key: str)

  • selector: CSS selector of the element to focus
  • key: Key to press, e.g. "Enter" to submit a form, "Escape", "Tab"
  • Returns a confirmation plus the current URL and title (a key press may trigger navigation)

select_option(selector: str, values: str | list[str])

  • selector: CSS selector of the <select> dropdown
  • values: Value or label to select (or a list for multi-select)
  • Returns a confirmation plus the current URL and title

click_element, input_text, press_key and select_option all append the current page URL and title to their result, so an agent can see where an action landed.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Setup

# Clone the repository
git clone https://github.com/random-robbie/mcp-web-browser.git

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`

# Install dependencies
pip install -e .[dev]

License

MIT License

Support

For issues and questions, please open an issue on GitHub.

Author

Robbie Wiggins — What-Security · GitHub

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP Web Browser Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-web-browser)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related browser automation MCP Servers

Alternative and complementary servers in the same category

View all in browser automation →

A Model Context Protocol (MCP) server for controlling Chrome with debugging capabilities, userscript injection, and extension support.

Repository stats unavailable
Browser & Scraping
Web Browser MCP Server
web-browser-mcp-server•blazickjp

An MCP server that lets AI assistants browse websites and extract content using optional CSS selectors.

Repository stats unavailable
Browser & Scraping
Steel MCP Server
steel-mcp-server•steel-dev

An MCP server that reads pages, fills forms, takes screenshots, and hands the browser to a person for logins or CAPTCHAs.

Repository stats unavailable
Browser & Scraping