Skip to main content
Glama
Daytona Playwright MCP Server

Daytona Playwright MCP Server

by jamesmurdza

Servidor MCP de Daytona Playwright

Un servidor MCP (Model Context Protocol) que te permite controlar un navegador Chrome con parches de sigilo (stealth) ejecutándose dentro de un sandbox en la nube de Daytona. Úsalo con Claude Code, Claude Desktop o cualquier cliente compatible con MCP para navegar por la web, tomar capturas de pantalla, rellenar formularios y más.

https://github.com/user-attachments/assets/23b13e1f-4ed3-4204-ad0d-b2fdb1f77d0d

Características

  • Chrome con sigilo: Chrome real (no headless, mediante los parches de sigilo de patchright) renderizado en una pantalla virtual

  • Vista VNC en vivo: La URL de vista previa firmada devuelta por browser_start transmite el escritorio del sandbox, para que puedas ver lo que está haciendo Claude

  • Sandbox en la nube: El navegador se ejecuta de forma segura en un sandbox de Daytona, aislado de tu máquina local

  • Conjunto de herramientas enriquecido: Navegar, hacer clic, escribir, desplazarse, tomar capturas de pantalla, extraer contenido, gestionar pestañas

  • Soporte para capturas de pantalla: Devuelve capturas de pantalla como imágenes que Claude puede ver y analizar

  • Múltiples transportes: Funciona con stdio (predeterminado), SSE o HTTP

Related MCP server: Glance

Inicio rápido

1. Instalar el paquete

pipx install git+https://github.com/jamesmurdza/playwright-daytona-mcp-server.git

2. Obtener una clave API de Daytona

  1. Regístrate en daytona.io

  2. Ve a tu panel de control y genera una clave API

3. Configurar Claude Code / Claude Desktop

Añade a tu configuración de MCP:

{
  "mcpServers": {
    "daytona-playwright": {
      "command": "daytona-playwright-mcp",
      "env": {
        "DAYTONA_API_KEY": "your-api-key-here"
      }
    }
  }
}

Uso

Una vez configurado, puedes pedirle a Claude que navegue por la web:

"Start a browser and go to https://news.ycombinator.com"

"Take a screenshot of the page"

"Click on the first article link"

"Search for 'AI news' on Google and show me the results"

"Fill out the contact form on example.com with test data"

Flujo de trabajo

  1. Iniciar el navegador: Claude llamará a browser_start para crear un sandbox de Daytona e iniciar Chrome

  2. Navegar e interactuar: Usa herramientas de navegación, clic, escritura y otras

  3. Tomar capturas de pantalla: Mira lo que hay en la página con browser_screenshot

  4. Limpiar: Llama a browser_stop cuando termines para eliminar el sandbox

Herramientas disponibles

Ciclo de vida del navegador

Herramienta

Descripción

browser_start

Iniciar una nueva sesión de navegador en un sandbox de Daytona

browser_stop

Detener el navegador y limpiar el sandbox

browser_status

Comprobar si el navegador se está ejecutando

Navegación

Herramienta

Descripción

browser_navigate

Navegar a una URL

browser_back

Volver atrás en el historial

browser_forward

Ir adelante en el historial

browser_refresh

Actualizar la página actual

Interacción

Herramienta

Descripción

browser_click

Hacer clic en un elemento (CSS, XPath o selector de texto)

browser_type

Escribir texto en un campo de entrada

browser_press

Presionar teclas del teclado (Enter, Tab, etc.)

browser_hover

Pasar el ratón sobre un elemento

browser_select

Seleccionar de un menú desplegable

browser_scroll

Desplazarse por la página o un elemento

Extracción de contenido

Herramienta

Descripción

browser_screenshot

Tomar una captura de pantalla (página completa o elemento)

browser_get_text

Obtener contenido de texto de la página

browser_get_html

Obtener contenido HTML

browser_get_attribute

Obtener el atributo de un elemento

browser_evaluate

Ejecutar JavaScript y obtener resultados

Espera

Herramienta

Descripción

browser_wait_for_selector

Esperar a que un elemento aparezca/desaparezca

browser_wait_for_navigation

Esperar a que la navegación se complete

Gestión de pestañas

Herramienta

Descripción

browser_new_tab

Abrir una nueva pestaña

browser_list_tabs

Listar todas las pestañas abiertas

browser_switch_tab

Cambiar a una pestaña diferente

browser_close_tab

Cerrar una pestaña

Operaciones de archivo

Herramienta

Descripción

browser_upload_file

Subir un archivo a una entrada de archivo

Ejecución con diferentes transportes

Stdio (Predeterminado - para Claude Code/Desktop)

daytona-playwright-mcp

Transporte HTTP (para conexiones remotas)

daytona-playwright-mcp --transport http --host 0.0.0.0 --port 8765

Luego conéctate a través de: http://localhost:8765/mcp

Transporte SSE (legado)

daytona-playwright-mcp --transport sse --host 0.0.0.0 --port 8765

Variables de entorno

Variable

Descripción

Predeterminado

DAYTONA_API_KEY

Tu clave API de Daytona (obligatorio)

-

DAYTONA_API_URL

URL del servidor API de Daytona

https://app.daytona.io/api

Desarrollo

Ejecutar desde el código fuente

# Clone the repository
git clone https://github.com/jamesmurdza/playwright-daytona-mcp-server.git
cd playwright-daytona-mcp-server

# Install dependencies
uv sync

# Run the server
uv run daytona-playwright-mcp

Configurar MCP para el desarrollo

Al desarrollar localmente, usa esta configuración de MCP:

{
  "mcpServers": {
    "daytona-playwright": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/playwright-daytona-mcp-server", "daytona-playwright-mcp"],
      "env": {
        "DAYTONA_API_KEY": "your-api-key-here"
      }
    }
  }
}

Ejecutar pruebas

uv run pytest

Cómo funciona

  1. Cuando llamas a browser_start, el servidor:

    • Construye una imagen de sandbox de Daytona mínima de forma declarativa (pila xfce + VNC para computer_use, además de patchright con el canal Chrome)

    • Inicia computer_use para que el escritorio del sandbox se transmita en el puerto 6080 (la URL de "Vista en vivo" devuelta)

    • Inicia Chrome a través de patchright en DISPLAY=:0 con CDP vinculado en 0.0.0.0:9222 — no se necesita proxy TCP, ya que los parches de sigilo de patchright se aplican en el momento del inicio

    • Se conecta a Chrome a través de un WebSocket CDP firmado mediante la URL de vista previa segura de Daytona

  2. Todos los comandos del navegador se ejecutan a través de la API asíncrona de Playwright conectada al navegador remoto

  3. Las capturas de pantalla se capturan como imágenes PNG y se devuelven a través del tipo de contenido de imagen de MCP

  4. Cuando llamas a browser_stop, el sandbox se elimina y todos los recursos se liberan

Créditos

Available Tools

26 tools
browser_backB

Navigate back in browser history.

Inputs: no named parameters. Returns: result

browser_clickA

Click on an element on the page.

Supports CSS selectors, XPath, and text selectors. Examples:

  • CSS: "button.primary", "#submit-btn", "[data-testid='login']"

  • XPath: "//button[@type='submit']"

  • Text: "text=Sign In", "text=Submit"

Inputs: selector (required), button, click_count, timeout. Returns: result

browser_close_tabB

Close a browser tab.

Inputs: index. Returns: result

browser_download_waitA

Wait for a download to start and complete, returning the downloaded file path.

Call this before triggering the download action.

Inputs: timeout. Returns: result

browser_evaluateA

Execute JavaScript in the page context and return the result.

Examples:

  • "document.title"

  • "window.location.href"

  • "document.querySelectorAll('a').length"

  • "JSON.stringify(localStorage)"

Inputs: script (required). Returns: result

browser_forwardB

Navigate forward in browser history.

Inputs: no named parameters. Returns: result

browser_get_attributeB

Get an attribute value from an element.

Inputs: selector (required), attribute (required), timeout. Returns: result

browser_get_htmlB

Get HTML content from the page or a specific element.

Inputs: selector, outer. Returns: result

browser_get_textB

Get text content from the page or specific elements.

Inputs: selector, timeout. Returns: result

browser_hoverB

Hover over an element on the page.

Inputs: selector (required), timeout. Returns: result

browser_list_tabsA

List all open tabs with their URLs and titles.

Inputs: no named parameters. Returns: result

browser_navigateB

Navigate the browser to a URL.

Inputs: url (required), wait_until. Returns: result

browser_new_tabA

Open a new browser tab and switch to it.

Inputs: url. Returns: result

browser_pressB

Press a keyboard key, optionally on a specific element.

Key examples: Enter, Tab, Escape, Backspace, Delete, ArrowUp, ArrowDown, Control+a, Control+c, Control+v, Shift+Tab, Alt+F4

Inputs: key (required), selector, timeout. Returns: result

browser_refreshB

Refresh the current page.

Inputs: no named parameters. Returns: result

browser_screenshotC

Take a screenshot of the current page or a specific element.

Returns the screenshot as an image that can be displayed.

Inputs: full_page, selector.

browser_scrollB

Scroll the page or a specific element.

Inputs: direction, amount, selector. Returns: result

browser_selectA

Select an option from a dropdown ( element).

Provide one of: value, label, or index.

Inputs: selector (required), value, label, index, +1 more. Returns: result

browser_startA

Start a new browser session in a Daytona sandbox.

This creates a cloud sandbox with Chrome installed, launches the browser, and establishes a connection for remote control. Must be called before using any other browser tools.

Inputs: timeout. Returns: result

browser_statusB

Check the current status of the browser session.

Inputs: no named parameters. Returns: result

browser_stopA

Stop the browser and clean up the Daytona sandbox.

Call this when you're done using the browser to free up resources.

Inputs: no named parameters. Returns: result

browser_switch_tabB

Switch to a different browser tab by index.

Inputs: index (required). Returns: result

browser_typeB

Type text into an input field or editable element.

Inputs: selector (required), text (required), clear_first, delay, +1 more. Returns: result

browser_upload_fileB

Upload a file to a file input element.

Note: The file must exist on the machine running this MCP server.

Inputs: selector (required), file_path (required), timeout. Returns: result

browser_wait_for_navigationB

Wait for a navigation to complete.

Inputs: url, timeout. Returns: result

browser_wait_for_selectorB

Wait for an element to reach a specific state.

States:

  • attached: Element is in the DOM

  • detached: Element is removed from the DOM

  • visible: Element is visible on the page

  • hidden: Element is hidden or removed

Inputs: selector (required), state, timeout. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 26 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no ambiguity. For example, browser_click is for clicking, browser_type is for typing, browser_screenshot is for capturing images, and browser_wait_for_selector is for waiting on element states. The descriptions reinforce these distinctions, making misselection unlikely.

    Naming Consistency5/5

    All tools follow a consistent 'browser_verb' or 'browser_verb_noun' naming pattern (e.g., browser_back, browser_click, browser_screenshot). This uniformity makes the tool set predictable and easy to navigate, with no deviations in style or convention.

    Tool Count3/5

    With 26 tools, the count feels heavy for a browser automation server, though not extreme. While it covers many operations, some tools could potentially be consolidated (e.g., browser_back and browser_forward are simple navigations), making the set borderline in scope.

    Completeness5/5

    The tool set provides complete coverage for browser automation, including session management (start, stop, status), navigation, interaction (click, type, hover), inspection (get_html, get_text), and utilities (screenshot, download). There are no obvious gaps, and agents can handle typical workflows without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      An MCP server that provides AI models with full browser automation capabilities through Chrome. It enables navigation, interaction, screenshots, and complete DevTools access by bridging AI clients with a companion Chrome extension.
      99
      11 npm
      3
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server to control Chrome browsers locally or remotely via the Claude extension, enabling navigation, form filling, screenshots, and JavaScript execution from any MCP client.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Local browser automation MCP server for Claude Code, enabling navigation, clicking, typing, and inspecting real web pages via Google Chrome.
      1
      MIT