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.
To install MCP-Undetected-Chromedriver automatically via Smithery:
npx -y @smithery/cli install @dragons96/mcp-undetected-chromedriver --client claude
# Create virtual environment
uv venv
# Activate virtual environment
# Windows
.venv\Scripts\activate
# Linux/MacOS
source .venv/bin/activate
# Install dependencies
uv pip install -e .
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",
"{}"
]
}
}
}
Start the service with:
mcp-server-undetected-chromedriver
The service offers the following main API interfaces:
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")
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.
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.
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.
The browser_iframe_click API can directly operate on elements within iframes, without the need to manually switch frame contexts.
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.
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"
]
}
}
}
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.
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.