MCP-Undetected-Chromedriver
Controlador de Chrome no detectado por MCP
Un servicio MCP creado con undetected-chromedriver y que proporciona una interfaz integral para automatizar el control del navegador Chrome y al mismo tiempo evitar la detección anti-bots.
Instalación
Para instalar MCP-Undetected-Chromedriver para Claude Desktop automáticamente a través de Smithery :
npx -y @smithery/cli install @dragons96/mcp-undetected-chromedriver --client claudeRelated MCP server: web-scraper-server
Configuración para utilizar el servidor Chromedriver no detectado
Aquí está la configuración de Claude Desktop para utilizar el servidor Undetected-chromedriver:
{
"mcpServers": {
"mcp-undetected-chromedriver": {
"command": "npx",
"args": [
"-y",
"@smithery/cli@latest",
"run",
"@dragons96/mcp-undetected-chromedriver",
"--config",
"{}"
]
}
}
}Requisitos
Python >= 3.11
Navegador Chrome
Instalación con 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 .Introducción del proyecto
MCP-Undetected-Chromedriver es un servicio MCP (Protocolo Multicanal) que integra la funcionalidad de la biblioteca undetected-chromedriver en una serie de API fáciles de usar. Este proyecto es especialmente adecuado para escenarios que requieren eludir los mecanismos modernos de detección anti-bots de sitios web en pruebas automatizadas, extracción de datos o scripts de automatización web.
Características principales
Basado en undetected-chromedriver, que evita eficazmente la detección anti-bots de sitios web
Proporciona interfaces API de operación del navegador enriquecidas
Admite capturas de pantalla, exportación a PDF y otras funcionalidades.
Admite operaciones complejas de interacción de página, como hacer clic, completar formularios, arrastrar, etc.
Se integra perfectamente con otras herramientas del ecosistema MCP
Lista de tareas pendientes
[ ] Optimice la administración del controlador del navegador y gestione las interrupciones del controlador
[ ] Ampliar las capacidades de la API
[ ] Agregar un manejo y registro de errores más completo
[ ] Mejorar la documentación con más ejemplos de uso
[ ] Agregar soporte para perfiles y extensiones del navegador
Uso
Iniciando el servicio
mcp-server-undetected-chromedriverAPI disponibles
El servicio proporciona las siguientes interfaces API principales:
browser_navigate: Navegar a una URL específicabrowser_screenshot: Toma una captura de pantalla de la página actualbrowser_click: Hacer clic en los elementos de la páginabrowser_iframe_click: Haga clic en los elementos dentro de un iframebrowser_fill: Rellena el contenido de los campos de entradabrowser_select: Seleccionar opciones en los cuadros de selección desplegablesbrowser_hover: Pase el ratón sobre los elementosbrowser_evalute: Ejecutar código JavaScriptbrowser_close: Cierra el navegadorbrowser_get_visible_text: Obtener texto visible en la páginabrowser_get_visible_html: Obtener HTML visible en la páginabrowser_go_back: Navegar hacia atrás en el historial del navegadorbrowser_go_forward: Navegar hacia adelante en el historial del navegadorbrowser_drag: Arrastrar elementosbrowser_press_key: Simular pulsaciones de teclasbrowser_save_as_pdf: Guardar la página como PDF
Ejemplo de código
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")Cómo funciona
Este servicio utiliza la biblioteca undetected-chromedriver para crear una instancia especializada del navegador Chrome que evade eficazmente los mecanismos comunes de detección antibots. El servicio integra estas funciones mediante el protocolo MCP, proporcionando una interfaz API fácil de usar que facilita las pruebas automatizadas y el web scraping.
Licencia
Este proyecto está licenciado bajo la licencia MIT: consulte el archivo de LICENCIA para obtener más detalles.
Pautas de contribución
Los informes de errores y las solicitudes de funcionalidad son bienvenidos en la página de incidencias de GitHub. Si quieres contribuir con código, crea primero una incidencia para discutir tus ideas.
Preguntas frecuentes
P: ¿Por qué elegir undetected-chromedriver en lugar del controlador web Selenium estándar?
A: undetected-chromedriver está diseñado específicamente para eludir los mecanismos de detección anti-bots de sitios web modernos, como Cloudflare, Distil Networks, etc., lo que lo hace más confiable para el raspado de datos y escenarios de pruebas automatizadas.
P: ¿Cómo maneja el servicio las instancias del navegador?
R: El servicio mantiene una instancia global del navegador, que se crea automáticamente al llamar por primera vez a una API que requiere un navegador. El navegador se puede cerrar explícitamente mediante la API browser_close .
P: ¿Cómo manejar elementos dentro de iframes?
R: La API browser_iframe_click puede operar directamente sobre elementos dentro de iframes, sin la necesidad de cambiar manualmente los contextos de los marcos.
Available Tools
16 toolsbrowser_clickC
Click an element on the page
Args:
selector: The selector of the element to click - required
Inputs: selector (required).
browser_closeA
Close the browser and release all resources
Inputs: no named parameters.
browser_dragC
Drag an element to another element
Args:
sourceSelector: The selector for the element to drag - required
targetSelector: The selector for the target location - required
Inputs: sourceSelector (required), targetSelector (required).
browser_evaluteC
Evaluate a JavaScript expression in the browser console
Args:
script: The JavaScript expression to evaluate - required
Inputs: script (required).
browser_fillC
fill out an input field
Args:
selector: CSS selector for input field - required
value: The value to fill - required
Inputs: selector (required), value (required).
browser_get_visible_htmlB
Get the HTML of the current page
Inputs: no named parameters.
browser_get_visible_textB
Get the visible text of the current page
Inputs: no named parameters.
browser_go_backA
Navigate back in browser history
Inputs: no named parameters.
browser_go_forwardB
Navigate forward in browser history
Inputs: no named parameters.
browser_hoverC
Hover over an element on the page
Args:
selector: CSS selector for element to hover over - required
Inputs: selector (required).
browser_iframe_clickB
Click an element inside an iframe on the page
Args:
iframeSelector: The selector of the iframe - required
selector: The selector of the element to click - required
Inputs: iframeSelector (required), selector (required).
browser_press_keyB
Press a key on the keyboard
Args:
key: The key to press - required, (e.g. 'Enter', 'ArrowDown', 'a')
selector: Optional CSS selector to focus on before pressing the key - optional
Inputs: key (required), selector.
browser_save_as_pdfB
Save the current page as a PDF
Args:
outputPath: The path to save the PDF to - required
filename: The name of the PDF file - optional, default is "page.pdf"
format: The format of the PDF - optional, default is "A4" (e.g. "A4", "LETTER", "LEGAL", "TABLOID")
printBackground: Whether to print the background - optional, default is True
margin: The margin of the PDF - optional, default is None (e.g. {"top": "1cm", "right": "1cm", "bottom": "1cm", "left": "1cm"})
Inputs: outputPath (required), filename, format, margin, +1 more.
browser_screenshotC
Take a screenshot of the current page or a specific element
Args:
name: The name of the screenshot - required, default is "screenshot"
storeBase64: Whether to store the screenshot as a base64 string - optional, default is True
downloadsDir: The directory to save the screenshot to - optional, default is the user's Downloads directory
Inputs: name (required), downloadsDir, storeBase64.
browser_selectC
Select an element on the page with Select tag
Args:
selector: CSS selector for element to select - required
value: The value to select - required
Inputs: selector (required), value (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Most tools have distinct purposes targeting specific browser automation tasks like navigation, interaction, and content extraction. However, some overlap exists between browser_click and browser_iframe_click, where the latter is essentially a specialized version of the former for iframes, which could cause minor confusion.
All tools follow a consistent snake_case naming pattern with a clear 'browser_' prefix followed by a verb_noun structure (e.g., browser_click, browser_navigate, browser_screenshot). This uniformity makes the tool set predictable and easy to understand.
With 16 tools, the count is slightly high but reasonable for a browser automation server, covering a wide range of common web interaction tasks. It might feel a bit heavy, but each tool appears to serve a specific function without obvious redundancy.
The tool set provides comprehensive coverage for core browser automation, including navigation, clicking, typing, hovering, and content extraction. Minor gaps exist, such as no explicit tool for handling cookies, managing tabs, or waiting for elements, but agents can likely work around these using existing tools like browser_evalute or timeouts.
Maintenance
Related MCP Connectors
Browser automation MCP for whole web tasks in a cloud browser: saved logins, bot checks, replays.
Crawl, scrape, search the web, and automate browsers at scale with anti-bot bypass.
Web scraping MCP server — scrape, extract structured data, screenshot any site with anti-bot bypass.
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn MCP server for stealth browser automation that uses human-like interaction patterns to bypass bot detection via the Chrome DevTools Protocol. It enables users to navigate, interact with elements, and capture data from websites using undetectable behaviors like Bezier mouse movements and Gaussian typing delays.2MIT
- AlicenseCqualityDmaintenanceProvides browser automation and web scraping as MCP tools, enabling autonomous URL ingestion, crawling, extraction, and anti-bot handling with interactive browser control.626MIT
- FlicenseCqualityDmaintenanceEnables browser automation, including navigation, form filling, login with CAPTCHA handling, and element manipulation, using a Chrome-based MCP server.364-
- AlicenseCqualityBmaintenanceMCP server for agent-piloted browser automation that clears Cloudflare, providing multi-session parallel Chromes, persistent profiles, stealth features, credential vault, and vision-first clicking.8940 PyPI9Apache 2.0