Daytona Playwright MCP Server
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 full 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.
Features
Full Chromium Browser: Runs a real Chromium instance (not headless) in a virtual display
Cloud 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
# Using uv (recommended)
uv pip install git+https://github.com/YOUR_USERNAME/daytona-playwright-mcp.git
# Or with pip
pip install git+https://github.com/YOUR_USERNAME/daytona-playwright-mcp.git
# Or install from source
git clone https://github.com/YOUR_USERNAME/daytona-playwright-mcp.git
cd daytona-playwright-mcp
uv pip install -e .2. Get a Daytona API Key
Sign up at daytona.io
Go to your dashboard and generate an API key
Set it as an environment variable:
export DAYTONA_API_KEY="your-api-key-here"3. Configure Claude Code
Add to your Claude Code MCP settings (~/.claude/claude_desktop_config.json or via Claude Code settings):
{
"mcpServers": {
"daytona-playwright": {
"command": "daytona-playwright-mcp",
"env": {
"DAYTONA_API_KEY": "your-api-key-here"
}
}
}
}Or if running from source with uv:
{
"mcpServers": {
"daytona-playwright": {
"command": "uv",
"args": ["run", "--directory", "/path/to/daytona-playwright-mcp", "daytona-playwright-mcp"],
"env": {
"DAYTONA_API_KEY": "your-api-key-here"
}
}
}
}4. Configure Claude Desktop
For Claude Desktop, add to your configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"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 with ChromiumNavigate 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-mcp
# or
uv run 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/YOUR_USERNAME/daytona-playwright-mcp.git
cd daytona-playwright-mcp
# Install dependencies
uv sync
# Run the server
uv run daytona-playwright-mcpRun Tests
uv run pytestHow It Works
When you call
browser_start, the server:Creates a Daytona sandbox (default Python sandbox has Chromium + Xvfb pre-installed)
Launches Chromium with remote debugging enabled
Starts a TCP proxy to expose the CDP port externally
Connects to Chromium via CDP (Chrome DevTools Protocol) through Daytona's secure signed URLs
All browser commands are executed through the 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
Troubleshooting
"DAYTONA_API_KEY environment variable is not set"
Make sure your API key is configured in the MCP server settings, not just in your shell.
Browser fails to start
Check that your Daytona API key is valid
The browser image may take 1-2 minutes to provision on first use
Increase the
timeoutparameter if needed
Screenshots not appearing
Make sure you're using a recent version of Claude Code/Desktop that supports MCP images
The
browser_screenshottool returns an Image type that should render automatically
Connection timeouts
The default timeout is 60 seconds. For slower connections or first-time image builds, increase it:
"Start a browser with a 120 second timeout"License
MIT
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