MCP Playwright CDP
The MCP Playwright CDP server enables browser automation and HTTP API testing with Playwright and Chrome DevTools Protocol (CDP) support.
Capabilities include:
Navigate to URLs: Configure viewport size, timeout, and navigation conditions
Capture Screenshots: Take screenshots of pages or specific elements
Interact with Elements: Click, hover, fill forms, and select options using CSS selectors
Execute JavaScript: Run code in browser context
Perform HTTP Requests: Execute GET, POST, PUT, PATCH, and DELETE operations
Connect via CDP: Integrate with existing Chrome instances
Monitor Console Logs: Track browser console output
Click on "Deploy 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., "@MCP Playwright CDP take a screenshot of the current page"
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.
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.
Maintenance status
This project is in maintenance mode. Focused fixes for security, compatibility, and documentation are welcome. It is not currently published to the npm registry. The latest source release is the v0.2.10 Git tag from February 2025.
This is a fork of executeautomation/mcp-playwright v0.2.7, enhanced with CDP support for connecting to running Chrome instances.
Related MCP server: Browser Manager MCP Server
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 claudeManual Installation
Clone the repository, then build it with Node.js 20 or 22:
npm ci
npm run buildUse npm install only when updating dependencies.
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=9222The server will automatically attempt to connect to the running Chrome instance first, before launching a new browser.
Security
The playwright_evaluate tool intentionally executes JavaScript in the current browser page. It is not a sandbox. Use this server only with trusted MCP clients and pages. See SECURITY.md for vulnerability reporting.
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.
Available Tools
12 toolsplaywright_clickC
Click an element on the page
Inputs: selector (required).
playwright_deleteC
Perform an HTTP DELETE request
Inputs: url (required).
playwright_evaluateC
Execute JavaScript in the browser console
Inputs: script (required).
playwright_fillC
fill out an input field
Inputs: selector (required), value (required).
playwright_getC
Perform an HTTP GET request
Inputs: url (required).
playwright_hoverC
Hover an element on the page
Inputs: selector (required).
playwright_patchC
Perform an HTTP PATCH request
Inputs: url (required), value (required).
playwright_postC
Perform an HTTP POST request
Inputs: url (required), value (required).
playwright_putC
Perform an HTTP PUT request
Inputs: url (required), value (required).
playwright_screenshotC
Take a screenshot of the current page or a specific element
Inputs: name (required), selector, width, height, +3 more.
playwright_selectC
Select an element on the page with Select tag
Inputs: selector (required), value (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 12 tools
Most tools have distinct purposes, but there is some overlap between playwright_click and playwright_select as both interact with page elements, which could cause minor confusion. The HTTP methods (GET, POST, PUT, PATCH, DELETE) are clearly differentiated, and other tools like playwright_navigate, playwright_screenshot, and playwright_evaluate have unique functions.
All tool names follow a consistent 'playwright_' prefix with a verb or action (e.g., click, get, navigate), using snake_case uniformly. This predictable pattern makes it easy for agents to understand and navigate the tool set without naming conflicts or style variations.
With 12 tools, the count is well-scoped for a Playwright CDP server, covering essential web automation tasks like navigation, interaction, HTTP requests, and debugging. Each tool serves a specific purpose, avoiding bloat while providing comprehensive functionality for the domain.
The tool set covers key areas: navigation, element interaction, HTTP methods, and debugging (screenshot, evaluate). Minor gaps exist, such as missing tools for handling cookies, waiting for elements, or managing browser contexts, but core workflows are well-supported, allowing agents to perform most common automation tasks.
Maintenance
Related MCP Connectors
Playwright browser automation β navigate, click, fill forms, extract, screenshot β 17 agent tools.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to iβ¦
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceEnables comprehensive browser automation and web interaction through Playwright with 50+ specialized functions for navigation, form filling, data extraction, and Chrome DevTools Protocol support. Designed specifically for AI agents to perform complex web workflows including scraping, testing, and automated browsing tasks.14 npm1Apache 2.0- AlicenseNot gradedqualityDmaintenanceEnables comprehensive browser automation and control through Playwright, including launching browsers, managing tabs, web navigation, element interaction, and screenshot capture. Supports detecting and controlling external browsers with remote debugging capabilities.ISC
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to perform browser automation tasks including web scraping, taking screenshots, and executing JavaScript using Playwright. It facilitates real-time interaction with web pages and the generation of automated test code.27 npmMIT
- -licenseNot gradedqualityNot gradedmaintenanceEnables AI coding assistants to control and inspect a live Chrome browser for automated debugging, performance analysis, and web interaction. It leverages Puppeteer and Chrome DevTools to provide capabilities like network monitoring, console logging, and automated browser actions.-