Daytona Playwright MCP Server
Daytona Playwright MCP Server
MCP-сервер (Model Context Protocol), позволяющий управлять браузером Chrome с патчами stealth, работающим внутри облачной «песочницы» Daytona. Используйте его с Claude Code, Claude Desktop или любым другим MCP-совместимым клиентом для просмотра веб-страниц, создания скриншотов, заполнения форм и многого другого.
https://github.com/user-attachments/assets/23b13e1f-4ed3-4204-ad0d-b2fdb1f77d0d
Возможности
Stealth Chrome: Настоящий Chrome (не headless, через патчи stealth patchright), отображаемый на виртуальном дисплее
Просмотр через VNC в реальном времени: Подписанный URL предварительного просмотра, возвращаемый
browser_start, транслирует рабочий стол «песочницы», поэтому вы можете видеть, что делает ClaudeОблачная «песочница»: Браузер работает безопасно в «песочнице» Daytona, изолированно от вашей локальной машины
Богатый набор инструментов: Навигация, клики, ввод текста, прокрутка, создание скриншотов, извлечение контента, управление вкладками
Поддержка скриншотов: Возвращает скриншоты в виде изображений, которые Claude может видеть и анализировать
Различные способы передачи данных: Работает через stdio (по умолчанию), SSE или HTTP
Related MCP server: Glance
Быстрый старт
1. Установка пакета
pipx install git+https://github.com/jamesmurdza/playwright-daytona-mcp-server.git2. Получение API-ключа Daytona
Зарегистрируйтесь на daytona.io
Перейдите в панель управления и создайте API-ключ
3. Настройка Claude Code / Claude Desktop
Добавьте в настройки MCP:
{
"mcpServers": {
"daytona-playwright": {
"command": "daytona-playwright-mcp",
"env": {
"DAYTONA_API_KEY": "your-api-key-here"
}
}
}
}Использование
После настройки вы можете попросить Claude просматривать веб-страницы:
"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"Рабочий процесс
Запуск браузера: Claude вызовет
browser_startдля создания «песочницы» Daytona и запуска ChromeНавигация и взаимодействие: Используйте инструменты для навигации, кликов, ввода текста и другие
Создание скриншотов: Смотрите, что находится на странице, с помощью
browser_screenshotОчистка: Вызовите
browser_stopпо завершении, чтобы удалить «песочницу»
Доступные инструменты
Жизненный цикл браузера
Инструмент | Описание |
| Запуск новой сессии браузера в «песочнице» Daytona |
| Остановка браузера и очистка «песочницы» |
| Проверка состояния работы браузера |
Навигация
Инструмент | Описание |
| Переход по URL |
| Назад по истории |
| Вперед по истории |
| Обновление текущей страницы |
Взаимодействие
Инструмент | Описание |
| Клик по элементу (селектор CSS, XPath или текст) |
| Ввод текста в поле ввода |
| Нажатие клавиш клавиатуры (Enter, Tab и т.д.) |
| Наведение курсора на элемент |
| Выбор из выпадающего списка |
| Прокрутка страницы или элемента |
Извлечение контента
Инструмент | Описание |
| Создание скриншота (всей страницы или элемента) |
| Получение текстового контента со страницы |
| Получение HTML-контента |
| Получение атрибута элемента |
| Выполнение JavaScript и получение результатов |
Ожидание
Инструмент | Описание |
| Ожидание появления/исчезновения элемента |
| Ожидание завершения навигации |
Управление вкладками
Инструмент | Описание |
| Открытие новой вкладки |
| Список всех открытых вкладок |
| Переключение на другую вкладку |
| Закрытие вкладки |
Файловые операции
Инструмент | Описание |
| Загрузка файла в поле ввода файла |
Запуск с использованием различных способов передачи данных
Stdio (по умолчанию — для Claude Code/Desktop)
daytona-playwright-mcpHTTP-транспорт (для удаленных подключений)
daytona-playwright-mcp --transport http --host 0.0.0.0 --port 8765Затем подключитесь через: http://localhost:8765/mcp
SSE-транспорт (устаревший)
daytona-playwright-mcp --transport sse --host 0.0.0.0 --port 8765Переменные окружения
Переменная | Описание | По умолчанию |
| Ваш API-ключ Daytona (обязательно) | - |
| URL сервера API Daytona |
|
Разработка
Запуск из исходного кода
# 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Настройка MCP для разработки
При локальной разработке используйте эту конфигурацию 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"
}
}
}
}Запуск тестов
uv run pytestКак это работает
Когда вы вызываете
browser_start, сервер:Декларативно собирает минимальный образ «песочницы» Daytona (стек xfce + VNC для
computer_use, плюс patchright с каналом Chrome)Запускает
computer_use, чтобы рабочий стол «песочницы» транслировался на порту 6080 (возвращаемый URL «Live view»)Запускает Chrome через patchright в
DISPLAY=:0с CDP, привязанным к0.0.0.0:9222— TCP-прокси не требуется, так как патчи stealth для patchright применяются во время запускаПодключается к Chrome через подписанный WebSocket CDP по защищенному URL предварительного просмотра Daytona
Все команды браузера выполняются через асинхронный API Playwright, подключенный к удаленному браузеру
Скриншоты захватываются как PNG-изображения и возвращаются через тип контента изображения MCP
Когда вы вызываете
browser_stop, «песочница» удаляется и все ресурсы освобождаются
Авторы
Основано на паттерне Daytona browser-in-sandbox от synacktraa
Использует Patchright для подключения к Playwright CDP
Создано с помощью FastMCP для MCP-сервера
Работает на базе облачных «песочниц» Daytona
Available Tools
26 toolsbrowser_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_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_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
Scored across 26 tools
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.
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.
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.
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
Related MCP Connectors
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn 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.9911 npm3Apache 2.0
- AlicenseCqualityDmaintenanceAn MCP server that gives Claude Code real browser control for web automation, testing, and screenshots.32104 npm159MIT
- AlicenseNot gradedqualityDmaintenanceMCP 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
- AlicenseNot gradedqualityDmaintenanceLocal browser automation MCP server for Claude Code, enabling navigation, clicking, typing, and inspecting real web pages via Google Chrome.1MIT