Undetected ChromeDriver MCP server

Provides a browser automation server that bypasses anti-bot measures for web scraping, automated testing, and data collection from sophisticated websites.
Back to servers
Provider
dragons96
Release date
Apr 19, 2025
Language
Python
Stats
4 stars

MCP-Undetected-Chromedriver is a service that provides a comprehensive interface for automating Chrome browser control while bypassing anti-bot detection mechanisms. It wraps the functionality of the undetected-chromedriver library into easy-to-use APIs, making it ideal for automated testing, data scraping, or web automation tasks that need to avoid detection.

Installation Options

Automatic Installation via Smithery

To install MCP-Undetected-Chromedriver automatically via Smithery:

npx -y @smithery/cli install @dragons96/mcp-undetected-chromedriver --client claude

Manual Installation with Python

Requirements

  • Python >= 3.11
  • Chrome browser

Installation with uv

# Create virtual environment
uv venv

# Activate virtual environment
# Windows
.venv\Scripts\activate
# Linux/MacOS
source .venv/bin/activate

# Install dependencies
uv pip install -e .

Configuration

Configure Claude Desktop to use the Undetected-chromedriver server:

{
  "mcpServers": {
    "mcp-undetected-chromedriver": {
      "command": "npx",
      "args": [
        "-y",
        "@smithery/cli@latest",
        "run",
        "@dragons96/mcp-undetected-chromedriver",
        "--config",
        "{}"
      ]
    }
  }
}

Usage

Starting the Service

Start the service with:

mcp-server-undetected-chromedriver

Available APIs

The service offers the following main API interfaces:

  • browser_navigate: Navigate to a specified URL
  • browser_screenshot: Take a screenshot of the current page
  • browser_click: Click on page elements
  • browser_iframe_click: Click on elements within an iframe
  • browser_fill: Fill content in input fields
  • browser_select: Select options in dropdown selection boxes
  • browser_hover: Hover the mouse over elements
  • browser_evalute: Execute JavaScript code
  • browser_close: Close the browser
  • browser_get_visible_text: Get visible text on the page
  • browser_get_visible_html: Get visible HTML on the page
  • browser_go_back: Navigate backward in browser history
  • browser_go_forward: Navigate forward in browser history
  • browser_drag: Drag elements
  • browser_press_key: Simulate key presses
  • browser_save_as_pdf: Save the page as a PDF

Code Example

Here's a simple example of how to use the service:

from mcp.client import Client

# Create MCP client
client = Client()
client.start("undetected-chromedriver-mcp-server")

# Navigate to website
response = client.call("browser_navigate", {"url": "https://example.com"})
print(response)

# Take a screenshot
response = client.call("browser_screenshot", {"name": "example"})
print(response)

# Get page text
response = client.call("browser_get_visible_text")
print(response.content[0].text)

# Close the browser
client.call("browser_close")

How It Works

This service creates a specialized Chrome browser instance using the undetected-chromedriver library to evade common anti-bot detection mechanisms. The service maintains a global browser instance, which is automatically created when an API requiring a browser is first called. The browser can be explicitly closed using the browser_close API.

FAQ

Why choose undetected-chromedriver instead of the standard selenium webdriver?

Undetected-chromedriver is specifically designed to bypass anti-bot detection mechanisms of modern websites, such as Cloudflare and Distil Networks, making it more reliable for data scraping and automated testing scenarios.

How does the service handle browser instances?

The service maintains a global browser instance, which is automatically created when an API requiring a browser is first called. The browser can be explicitly closed using the browser_close API.

How to handle elements within iframes?

The browser_iframe_click API can directly operate on elements within iframes, without the need to manually switch frame contexts.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later