Integrations
Provides a containerized version of the Patchright MCP server, accessible through Docker Hub for easy deployment and integration with AI tools
Allows GitHub Copilot to leverage Patchright's stealth browser automation capabilities through VS Code, enabling undetected web scraping and interaction
Patchright Lite MCP Server
A streamlined Model Context Protocol (MCP) server that wraps the Patchright Node.js SDK to provide stealth browser automation capabilities to AI models. This lightweight server focuses on essential functionality to make it easier for simpler AI models to use.
What is Patchright?
Patchright is an undetected version of the Playwright testing and automation framework. It's designed as a drop-in replacement for Playwright, but with advanced stealth capabilities to avoid detection by anti-bot systems. Patchright patches various detection techniques including:
- Runtime.enable leak
- Console.enable leak
- Command flags leaks
- General detection points
- Closed Shadow Root interactions
This MCP server wraps the Node.js version of Patchright to make its capabilities available to AI models through a simple, standardized protocol.
Features
- Simple Interface: Focused on core functionality with just 4 essential tools
- Stealth Automation: Uses Patchright's stealth mode to avoid detection
- MCP Standard: Implements the Model Context Protocol for easy AI integration
- Stdio Transport: Uses standard input/output for seamless integration
Prerequisites
- Node.js 18+
- npm or yarn
Installation
- Clone this repository:Copy
- Install dependencies:Copy
- Build the TypeScript code:Copy
Usage
Run the server with:
This will start the server with stdio transport, making it ready to integrate with AI tools that support MCP.
Integrating with AI Models
Claude Desktop
Add this to your claude-desktop-config.json
file:
VS Code with GitHub Copilot
Use the VS Code CLI to add the MCP server:
Available Tools
The server provides just 4 essential tools:
1. browse
Launches a browser, navigates to a URL, and extracts content.
Returns:
- Page title
- Visible text preview
- Browser ID (for subsequent operations)
- Page ID (for subsequent operations)
- Screenshot path
2. interact
Performs a simple interaction on a page.
Returns:
- Action result
- Current URL
- Screenshot path
3. extract
Extracts specific content from the current page.
Returns:
- Extracted content based on the requested type
4. close
Closes a browser to free resources.
Example Usage Flow
- Launch a browser and navigate to a site:Copy
- Fill in a login form:Copy
- Fill in password:Copy
- Click the login button:Copy
- Extract text to verify login:Copy
- Close the browser:Copy
Security Considerations
- This server provides powerful automation capabilities. Use it responsibly and ethically.
- Avoid automating actions that would violate websites' terms of service.
- Be mindful of rate limits and don't overload websites with requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Patchright-nodejs by Kaliiiiiiiiii-Vinyzu
- Model Context Protocol by modelcontextprotocol
Docker Usage
You can run this server using Docker:
Building the Docker Image Locally
Build the Docker image:
Run the container:
Docker Hub
The image is automatically published to Docker Hub when changes are merged to the main branch. You can find the latest image at: dylangroos/patchright-mcp
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A streamlined Model Context Protocol server that enables AI models to perform stealth browser automation using Patchright, avoiding detection by anti-bot systems while providing essential web interaction capabilities.
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that enables Claude and other LLMs to make HTTP requests with realistic browser fingerprinting, bypassing common anti-bot measures and interacting with websites more naturally.Last updated -3PythonMIT License
- -securityFlicense-qualityA web browser automation server that allows AI assistants to control Chrome with persistent state management, enabling complex browsing tasks through asynchronous browser operations.Last updated -1Python
- -securityAlicense-qualityAI-driven browser automation server that implements the Model Context Protocol to enable natural language control of web browsers for tasks like navigation, form filling, and visual interaction.Last updated -1PythonMIT License
- -security-license-qualityA Model Context Protocol server that enables AI assistants to control Chrome browsers through the Chrome DevTools Protocol, allowing for navigation, clicking, typing, and extracting page information.Last updated -3TypeScript