Daytona Playwright MCP Server
The Daytona Playwright MCP Server lets you control a stealth Chrome browser running in a secure Daytona cloud sandbox, enabling full web automation and interaction through an MCP-compatible client.
Browser Lifecycle
Start, stop, and check the status of a browser session in a cloud sandbox.
Navigation
Navigate to URLs, go back/forward in history, and refresh pages.
Page Interaction
Click elements using CSS, XPath, or text selectors
Type text, press keyboard keys (e.g., Enter, Tab, Ctrl+C), hover, select dropdown options, and scroll pages or specific elements.
Content Extraction
Take full-page or element-specific screenshots
Extract visible text, inner/outer HTML, element attributes, and execute arbitrary JavaScript.
Waiting
Wait for elements to appear/disappear/become visible or for navigation to complete.
Tab Management
Open new tabs, list all open tabs (with URLs and titles), switch between them by index, and close tabs.
File Operations
Upload local files to file input elements and wait for/capture file downloads.
Additionally, a live VNC view of the sandbox desktop is available to observe browser actions, with all browsing running in a secure, isolated cloud environment.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Daytona Playwright MCP Servergo to github.com and take a screenshot of the trending repositories"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Daytona Playwright MCP Server
An MCP (Model Context Protocol) server that lets you control a stealth patchright+Chrome browser running inside a Daytona cloud sandbox. Use it with Claude Code, Claude Desktop, or any MCP-compatible client to browse the web, take screenshots, fill forms, and more.
https://github.com/user-attachments/assets/23b13e1f-4ed3-4204-ad0d-b2fdb1f77d0d
Features
Stealth Chrome: Real Chrome (not headless, via patchright's stealth patches) rendered into a virtual display
Live VNC view: The signed preview URL returned by
browser_startstreams the sandbox desktop, so you can watch what Claude is doingCloud Sandbox: Browser runs securely in a Daytona sandbox, isolated from your local machine
Rich Tool Set: Navigate, click, type, scroll, take screenshots, extract content, manage tabs
Screenshot Support: Returns screenshots as images that Claude can see and analyze
Multiple Transports: Works with stdio (default), SSE, or HTTP
Quick Start
1. Install the Package
pipx install git+https://github.com/jamesmurdza/playwright-daytona-mcp-server.git2. Get a Daytona API Key
Sign up at daytona.io
Go to your dashboard and generate an API key
3. Configure Claude Code / Claude Desktop
Add to your MCP settings:
{
"mcpServers": {
"daytona-playwright": {
"command": "daytona-playwright-mcp",
"env": {
"DAYTONA_API_KEY": "your-api-key-here"
}
}
}
}Usage
Once configured, you can ask Claude to browse the 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"Workflow
Start the browser: Claude will call
browser_startto create a Daytona sandbox and launch ChromeNavigate and interact: Use navigation, clicking, typing, and other tools
Take screenshots: See what's on the page with
browser_screenshotClean up: Call
browser_stopwhen done to delete the sandbox
Available Tools
Browser Lifecycle
Tool | Description |
| Start a new browser session in a Daytona sandbox |
| Stop the browser and clean up the sandbox |
| Check if the browser is running |
Navigation
Tool | Description |
| Navigate to a URL |
| Go back in history |
| Go forward in history |
| Refresh the current page |
Interaction
Tool | Description |
| Click on an element (CSS, XPath, or text selector) |
| Type text into an input field |
| Press keyboard keys (Enter, Tab, etc.) |
| Hover over an element |
| Select from a dropdown |
| Scroll the page or an element |
Content Extraction
Tool | Description |
| Take a screenshot (full page or element) |
| Get text content from the page |
| Get HTML content |
| Get an element's attribute |
| Run JavaScript and get results |
Waiting
Tool | Description |
| Wait for an element to appear/disappear |
| Wait for navigation to complete |
Tab Management
Tool | Description |
| Open a new tab |
| List all open tabs |
| Switch to a different tab |
| Close a tab |
File Operations
Tool | Description |
| Upload a file to a file input |
Running with Different Transports
Stdio (Default - for Claude Code/Desktop)
daytona-playwright-mcpHTTP Transport (for remote connections)
daytona-playwright-mcp --transport http --host 0.0.0.0 --port 8765Then connect via: http://localhost:8765/mcp
SSE Transport (legacy)
daytona-playwright-mcp --transport sse --host 0.0.0.0 --port 8765Environment Variables
Variable | Description | Default |
| Your Daytona API key (required) | - |
| Daytona API server URL |
|
Development
Run from Source
# 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-mcpConfigure MCP for Development
When developing locally, use this MCP configuration:
{
"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"
}
}
}
}Run Tests
uv run pytestHow It Works
When you call
browser_start, the server:Builds a minimal Daytona sandbox image declaratively (xfce + VNC stack for
computer_use, plus patchright with the Chrome channel)Starts
computer_useso the sandbox desktop is streamed on port 6080 (the returned "Live view" URL)Launches Chrome via patchright into
DISPLAY=:0with CDP bound on0.0.0.0:9222— no TCP proxy needed, since patchright's stealth patches are applied at launch timeConnects to Chrome over a signed CDP WebSocket through Daytona's secure preview URL
All browser commands are executed through the async Playwright API connected to the remote browser
Screenshots are captured as PNG images and returned via MCP's image content type
When you call
browser_stop, the sandbox is deleted and all resources are freed
Credits
Based on the Daytona browser-in-sandbox pattern by synacktraa
Uses Patchright for Playwright CDP connectivity
Built with FastMCP for the MCP server
Powered by Daytona cloud sandboxes
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jamesmurdza/playwright-daytona-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server