MCP Playwright CDP
Enables LLMs to perform browser automation through the Playwright framework with Chrome DevTools Protocol support, connecting to existing Chrome instances for advanced web interactions and JavaScript execution.
lars-hagen
Tools
playwright_navigate
Navigate to a URL
playwright_screenshot
Take a screenshot of the current page or a specific element
playwright_click
Click an element on the page
playwright_fill
fill out an input field
playwright_select
Select an element on the page with Select tag
playwright_hover
Hover an element on the page
playwright_evaluate
Execute JavaScript in the browser console
playwright_get
Perform an HTTP GET request
playwright_post
Perform an HTTP POST request
playwright_put
Perform an HTTP PUT request
playwright_patch
Perform an HTTP PATCH request
playwright_delete
Perform an HTTP DELETE request
README
MCP Playwright CDP
A Model Context Protocol server that provides browser automation capabilities using Playwright with Chrome DevTools Protocol (CDP) support. This server enables LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment, with the ability to connect to existing Chrome instances via CDP.
This is a fork of executeautomation/mcp-playwright v0.2.7, enhanced with CDP support for connecting to running Chrome instances.
<a href="https://glama.ai/mcp/servers/fdvu5n58kv"><img width="380" height="200" src="https://glama.ai/mcp/servers/fdvu5n58kv/badge" alt="Playwright CDP MCP server" /></a>
Key Features
- 🔗 Connect to existing Chrome instances via CDP
- 🌐 Full browser automation capabilities
- 📸 Screenshot capture of entire pages or specific elements
- 🖱️ Comprehensive web interactions (navigation, clicking, form filling)
- 📊 Console log monitoring
- 🔧 JavaScript execution in browser context
- 🌍 HTTP API testing support
Installation
You can install the package using either npm or Smithery:
Installing via Smithery
To install MCP Playwright CDP for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @lars-hagen/mcp-playwright-cdp --client claude
Manual Installation
Using npm:
npm install
Configuration
Add this to your Claude Desktop configuration file:
{
"mcpServers": {
"playwright": {
"command": "node",
"args": ["/path/to/mcp-playwright/dist/index.js"]
}
}
}
Replace /path/to/mcp-playwright
with your actual path to the repository.
CDP Connection
This fork adds the ability to connect to an existing Chrome instance via CDP. To use this feature:
- Launch Chrome with remote debugging enabled:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
- The server will automatically attempt to connect to the running Chrome instance first, before launching a new browser.
Credits
This project is a fork of executeautomation/mcp-playwright, enhanced with CDP support for connecting to running Chrome instances.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Excel MCP Server
A Model Context Protocol server that enables AI assistants to read from and write to Microsoft Excel files, supporting formats like xlsx, xlsm, xltx, and xltm.
Playwright MCP Server
Provides a server utilizing Model Context Protocol to enable human-like browser automation with Playwright, allowing control over browser actions such as navigation, element interaction, and scrolling.
@kazuph/mcp-fetch
Model Context Protocol server for fetching web content and processing images. This allows Claude Desktop (or any MCP client) to fetch web content and handle images appropriately.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
Apple MCP Server
Enables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.
DuckDuckGo MCP Server
A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.
contentful-mcp
Update, create, delete content, content-models and assets in your Contentful Space