MCP Web Browser Server logo

MCP Web Browser Server

by random-robbie

The MCP Web Browser Server is an advanced web browsing server for the Model Context Protocol (MCP), powered by Playwright. It enables headless browser interactions through a flexible, secure API.

View on GitHub

Last updated: N/A

What is MCP Web Browser Server?

The MCP Web Browser Server is a server that allows you to control a headless web browser programmatically using the Model Context Protocol (MCP). It leverages Playwright to provide a robust and feature-rich browsing experience without a graphical user interface.

How to use MCP Web Browser Server?

To use the server, you need Python 3.10+, the MCP SDK, and Playwright. Install the dependencies using pip install mcp playwright and playwright install. Configure the server in your claude_desktop_config.json file, specifying the command to run the server script. Then, you can use the provided API functions (e.g., browse_to, extract_text_content, click_element) to interact with web pages.

Key features of MCP Web Browser Server

  • Headless Web Browsing with SSL bypass

  • Full Page Content Extraction

  • Multi-Tab Support

  • Advanced Web Interaction Tools (click, input, screenshot, scroll, execute JavaScript)

  • Automatic Resource Management

  • Enhanced Page Information retrieval

Use cases of MCP Web Browser Server

  • Automated web scraping

  • Web application testing

  • Generating screenshots of web pages

  • Interacting with web forms programmatically

FAQ from MCP Web Browser Server

How do I handle SSL certificate errors?

SSL certificate errors are automatically bypassed by the server.

What should I do if a page loads slowly?

Adjust the timeout in the browse_to() method.

What if an element is not found?

Verify the CSS selectors carefully to ensure they are correct.

How is browser resource usage managed?

The server automatically cleans up unused resources after an inactivity period.

How do I contribute to the project?

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