mcp-stealthy-chrome-driver
Facilitates control over the Chrome web browser for automation tasks, specifically engineered to circumvent contemporary anti-bot defense systems utilizing the undetected-chromedriver framework. It exposes a rich set of capabilities for diverse automated web manipulations.
Author

dragons96
Quick Info
Actions
Tags
MCP-Stealthy-Chrome-Driver
This MCP (Multi-Channel Protocol) service leverages the power of undetected-chromedriver to offer robust control over Chrome, ensuring successful navigation past common web defense mechanisms designed to block automated scripts.
中文文档
Acquisition & Deployment
Install MCP-Stealthy-Chrome-Driver for your Claude Desktop environment seamlessly via the Smithery platform:
bash npx -y @smithery/cli install @dragons96/mcp-undetected-chromedriver --client claude
Configuration for Undetected Chromedriver Backend
To integrate this stealthy automation server with your Claude Desktop setup, utilize the following JSON configuration:
{ "mcpServers": { "mcp-undetected-chromedriver": { "command": "npx", "args": [ "-y", "@smithery/cli@latest", "run", "@dragons96/mcp-undetected-chromedriver", "--config", "{}" ] } } }
Prerequisites
- Python version must be 3.11 or higher.
- A functional installation of the Google Chrome browser is required.
Dependency Management with uv
Follow these steps to set up your isolated environment and install necessary packages:
bash
Environment setup
uv venv
Environment activation
On Windows systems
.venv\Scripts\activate
On Unix-like systems (Linux/macOS)
source .venv/bin/activate
Installing project dependencies
uv pip install -e .
Service Overview
MCP-Stealthy-Chrome-Driver functions as an intermediary MCP service, abstracting the sophisticated capabilities of the undetected-chromedriver library into a collection of accessible, high-level Application Programming Interfaces (APIs). It is ideally suited for demanding applications such as sophisticated web harvesting, continuous automated quality assurance, or any scripting scenario where bypassing modern bot detection barriers is paramount.
Core Capabilities
- Built upon
undetected-chromedriverfor superior evasion of anti-bot countermeasures. - Exposes an extensive suite of browser manipulation interfaces.
- Supports critical utilities including page capture (screenshots) and document rendering (PDF export).
- Handles intricate user interactions: element selection, form population, graphical dragging operations, and more.
- Guarantees smooth interoperability within the broader MCP application ecosystem.
Developmental Roadmap (To Do)
- [ ] Enhance robustness in managing the browser driver lifecycle, especially handling unexpected terminations.
- [ ] Expand the repertoire of available API functions.
- [ ] Implement more thorough error reporting and detailed operational logging.
- [ ] Augment documentation with practical, in-depth usage blueprints.
- [ ] Introduce support for custom browser profiles and third-party extensions.
Service Initiation
To launch the automation backend:
bash mcp-server-undetected-chromedriver
Accessible Methods
The service exposes the following primary operational endpoints:
browser_navigate: Directs the browser to a specified Uniform Resource Locator (URL).browser_screenshot: Captures the visual state of the current viewport.browser_click: Simulates a mouse click event on a designated page component.browser_iframe_click: Facilitates clicking elements nested within isolated iframe contexts.browser_fill: Populates data into form input elements.browser_select: Manages selections within HTML<select>elements (dropdowns).browser_hover: Moves the cursor to simulate a mouse-over effect on elements.browser_evalute: Executes arbitrary JavaScript code within the browser's context.browser_close: Terminates the active browser session.browser_get_visible_text: Retrieves all human-readable, rendered text from the visible DOM.browser_get_visible_html: Fetches the HTML structure of the currently rendered view.browser_go_back: Reverts to the previous page in the navigation history.browser_go_forward: Advances to the next page in the navigation history.browser_drag: Executes a drag-and-drop action between two points or elements.browser_press_key: Emulates physical keyboard key inputs.browser_save_as_pdf: Renders and saves the current page content as a Portable Document Format (PDF) file.
Application Blueprint
python from mcp.client import Client
Instantiate the MCP communication interface
client = Client() client.start("undetected-chromedriver-mcp-server")
Navigate to a demonstration site
response = client.call("browser_navigate", {"url": "https://example.com"}) print(response)
Capture the current screen state
response = client.call("browser_screenshot", {"name": "demo_capture"}) print(response)
Extract displayed textual content
response = client.call("browser_get_visible_text") print(response.content[0].text)
Terminate the remote browser process
client.call("browser_close")
Operational Mechanism
This backend leverages the undetected-chromedriver library to instantiate a highly customized Chrome browser environment. This environment is inherently designed to mask automation signatures, thus thwarting detection mechanisms prevalent on modern websites. The service encapsulates these advanced capabilities via the MCP framework, delivering a user-friendly API layer beneficial for streamlining both advanced QA routines and large-scale web data acquisition projects.
Licensing Terms
This software is distributed under the permissive terms outlined in the MIT License. Consult the accompanying LICENSE file for complete details.
Collaborative Guidelines
We actively encourage the reporting of defects and the suggestion of new features via the official GitHub Issues tracker. For contributions involving code modification, please initiate a discussion thread first to align on the proposed enhancements.
Frequently Asked Questions (FAQ)
Q: What is the primary advantage of using undetected-chromedriver over the standard Selenium WebDriver?
A: undetected-chromedriver is purpose-built to successfully circumvent the anti-bot security layers deployed by major platforms (e.g., Cloudflare, DataDome). This resilience significantly enhances reliability for data harvesting endeavors and critical automated validation testing.
Q: How does the service manage persistent browser sessions?
A: By default, the service maintains a singular, shared browser instance which initializes upon the very first invocation of a browser-dependent API. Users possess the ability to forcibly terminate this session at any time using the browser_close method.
Q: What is the protocol for interacting with content embedded within iframes?
A: Interaction within nested frame structures is simplified via the dedicated browser_iframe_click method, eliminating the necessity for developers to manually manage frame context switching logic.
