Setting Up a Playwright MCP Server with Chrome Extension Support
Published
by
SiteBay
Traducciones al EspañolEstamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
For a limited time:
Create a SiteBay account and WordPress Site
to try this guide for free.
to try this guide for free.
Setting Up a Playwright MCP Server with Chrome Extension Support
Prerequisites
- Node.js installed
- Playwright installed globally Microsoft Playwright
- Chrome extension you want to use
- Claude Desktop or Cline/Roo
Step 1: Launch Playwright Server with Chrome Extension
Create Configuration File (config.json)
|
|
Launch Command
|
|
Step 2: Getting the WebSocket Endpoint
When you run the launch command, Playwright will output a WebSocket (WS) endpoint. It will look similar to:
ws://localhost:34143/49963c6a33d3f1d477555b60d045008d
Step 3: Add to MCP Configuration
Update your MCP settings (typically in cline_mcp_settings.json
) with the following configuration:
|
|
Step 4: Downloading Chrome Extension
Method 1: From Chrome Web Store
- Open Chrome Web Store
- Find the desired extension
- Click “Details”
- Note the extension ID from the URL (e.g.,
hdokiejnpimakedhajhdlcegeplioahd
)
Method 2: Manually Extract from Chrome
- Open Chrome
- Go to
chrome://extensions/
- Enable “Developer mode”
- Click “Pack extension”
- Select the extension folder
- Chrome will generate
.crx
and.pem
files
Method 3: Download from GitHub/Source
- Find the extension’s source repository
- Clone or download the repository
- Use the extension folder directly
Path Configuration Tip
Replace ./path/to/extension
in the config.json
with the actual path to your extension folder.
Additional Notes
- Ensure the extension is compatible with the Chrome version used by Playwright
- Some extensions may require additional configuration
- Test the extension manually first to verify functionality
Troubleshooting
- Check WebSocket endpoint is correctly copied
- Verify extension path is correct
- Ensure Playwright and Chrome versions are compatible
This page was originally published on