MseeP.ai Security Assessment A Model Context Protocol server that provides browser automation capabilities using Playwright. This server enables LLMs to interact with web pages, take screenshots, generate test code, web scrapes the page and execute JavaScript in a real browser environment. Test your web applications on real device profiles with a simple command: Natural Language Support for AI Ass
Add this skill
npx mdskills install executeautomation/mcp-playwrightComprehensive browser automation MCP server with 143 device profiles, multiple transport modes, and extensive documentation.
1<div align="center" markdown="1">2 <table>3 <tr>4 <td align="center" valign="middle">5 <a href="https://mseep.ai/app/executeautomation-mcp-playwright">6 <img src="https://mseep.net/pr/executeautomation-mcp-playwright-badge.png" alt="MseeP.ai Security Assessment Badge" height="80"/>7 </a>8 </td>9 </tr>10 <tr>11 <td align="center"><sub>MseeP.ai Security Assessment</sub></td>12 </tr>13 </table>14</div>15<hr>1617# Playwright MCP Server ๐ญ1819[](https://archestra.ai/mcp-catalog/executeautomation__mcp-playwright)20[](https://smithery.ai/server/@executeautomation/playwright-mcp-server)2122A Model Context Protocol server that provides browser automation capabilities using Playwright. This server enables LLMs to interact with web pages, take screenshots, generate test code, web scrapes the page and execute JavaScript in a real browser environment.2324<a href="https://glama.ai/mcp/servers/yh4lgtwgbe"><img width="380" height="200" src="https://glama.ai/mcp/servers/yh4lgtwgbe/badge" alt="mcp-playwright MCP server" /></a>2526## โจ What's New in v1.0.102728### ๐ฏ Device Emulation with 143 Real Device Presets!2930Test your web applications on **real device profiles** with a simple command:3132```javascript33// Test on iPhone 13 with automatic user-agent, touch support, and device pixel ratio34await playwright_resize({ device: "iPhone 13" });3536// Switch to iPad with landscape orientation37await playwright_resize({ device: "iPad Pro 11", orientation: "landscape" });3839// Test desktop view40await playwright_resize({ device: "Desktop Chrome" });41```4243**Natural Language Support for AI Assistants:**44- "Test on iPhone 13"45- "Switch to iPad view"46- "Rotate to landscape"4748**Supports 143 devices:** iPhone, iPad, Pixel, Galaxy, and Desktop browsers with proper emulation of viewport, user-agent, touch events, and device pixel ratios.4950๐ [View Device Quick Reference](https://executeautomation.github.io/mcp-playwright/docs/playwright-web/Device-Quick-Reference) | [Prompt Guide](https://executeautomation.github.io/mcp-playwright/docs/playwright-web/Resize-Prompts-Guide)5152## Screenshot535455## [Documentation](https://executeautomation.github.io/mcp-playwright/) | [API reference](https://executeautomation.github.io/mcp-playwright/docs/playwright-web/Supported-Tools)5657## Installation5859You can install the package using either npm, mcp-get, or Smithery:6061Using npm:62```bash63npm install -g @executeautomation/playwright-mcp-server64```6566Using mcp-get:67```bash68npx @michaellatman/mcp-get@latest install @executeautomation/playwright-mcp-server69```70Using Smithery7172To install Playwright MCP for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@executeautomation/playwright-mcp-server):7374```bash75npx @smithery/cli install @executeautomation/playwright-mcp-server --client claude76```7778Using Claude Code:79```bash80claude mcp add --transport stdio playwright npx @executeautomation/playwright-mcp-server81```828384#### Installation in VS Code8586Install the Playwright MCP server in VS Code using one of these buttons:8788<!--89// Generate using?:90const config = JSON.stringify({ name: 'playwright', command: 'npx', args: ["-y", "@executeautomation/playwright-mcp-server"] });91const urlForWebsites = `vscode:mcp/install?${encodeURIComponent(config)}`;92// Github markdown does not allow linking to `vscode:` directly, so you can use our redirect:93const urlForGithub = `https://insiders.vscode.dev/redirect?url=${encodeURIComponent(urlForWebsites)}`;94-->9596[<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522playwright%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522%2540executeautomation%252Fplaywright-mcp-server%2522%255D%257D)97[<img alt="Install in VS Code Insiders" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522playwright%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522%2540executeautomation%252Fplaywright-mcp-server%2522%255D%257D)9899Alternatively, you can install the Playwright MCP server using the VS Code CLI:100101```bash102# For VS Code103code --add-mcp '{"name":"playwright","command":"npx","args":["@executeautomation/playwright-mcp-server"]}'104```105106```bash107# For VS Code Insiders108code-insiders --add-mcp '{"name":"playwright","command":"npx","args":["@executeautomation/playwright-mcp-server"]}'109```110111After installation, the ExecuteAutomation Playwright MCP server will be available for use with your GitHub Copilot agent in VS Code.112113## Browser Installation114115### Automatic Installation (Recommended)116117The Playwright MCP Server **automatically installs browser binaries** when you first use it. When the server detects that a browser is missing, it will:1181191. Automatically download and install the required browser (Chromium, Firefox, or WebKit)1202. Display installation progress in the console1213. Retry your request once installation completes122123**No manual setup required!** Just start using the server, and it handles browser installation for you.124125### Manual Installation (Optional)126127If you prefer to install browsers manually or encounter any issues with automatic installation:128129```bash130# Install all browsers131npx playwright install132133# Or install specific browsers134npx playwright install chromium135npx playwright install firefox136npx playwright install webkit137```138139### Browser Storage Location140141Browsers are installed to:142- **Windows:** `%USERPROFILE%\AppData\Local\ms-playwright`143- **macOS:** `~/Library/Caches/ms-playwright`144- **Linux:** `~/.cache/ms-playwright`145146## Configuration to use Playwright Server147148### Standard Mode (stdio)149150This is the **recommended mode for Claude Desktop**.151152```json153{154 "mcpServers": {155 "playwright": {156 "command": "npx",157 "args": ["-y", "@executeautomation/playwright-mcp-server"]158 }159 }160}161```162163**Note:** In stdio mode, logging is automatically directed to files only (not console) to maintain clean JSON-RPC communication. Logs are written to `~/playwright-mcp-server.log`.164165### HTTP Mode (Standalone Server)166167When running headed browser on systems without display or from worker processes of IDEs, you can run the MCP server as a standalone HTTP server:168169> **Note for Claude Desktop Users:** Claude Desktop currently requires stdio mode (command/args configuration). HTTP mode is recommended for VS Code, custom clients, and remote deployments. See [CLAUDE_DESKTOP_CONFIG.md](CLAUDE_DESKTOP_CONFIG.md) for details.170171#### Starting the HTTP Server172173```bash174# Using npx175npx @executeautomation/playwright-mcp-server --port 8931176177# Or after global installation178playwright-mcp-server --port 8931179```180181The server will start and display available endpoints:182183```184==============================================185Playwright MCP Server (HTTP Mode)186==============================================187Port: 8931188189ENDPOINTS:190- SSE Stream: GET http://localhost:8931/sse191- Messages: POST http://localhost:8931/messages?sessionId=<id>192- MCP (unified): GET http://localhost:8931/mcp193- MCP (unified): POST http://localhost:8931/mcp?sessionId=<id>194- Health Check: GET http://localhost:8931/health195==============================================196```197198#### Client Configuration for HTTP Mode199200> **โ ๏ธ CRITICAL:** The `"type": "http"` field is **REQUIRED** for HTTP/SSE transport!201202**For VS Code GitHub Copilot:**203```json204{205 "github.copilot.chat.mcp.servers": {206 "playwright": {207 "url": "http://localhost:8931/mcp",208 "type": "http"209 }210 }211}212```213214**For Custom MCP Clients:**215```json216{217 "mcpServers": {218 "playwright": {219 "url": "http://localhost:8931/mcp",220 "type": "http"221 }222 }223}224```225226**Important:** Without `"type": "http"`, the connection will fail.227228**For Claude Desktop:** Use stdio mode instead (see Standard Mode above)229230#### Use Cases for HTTP Mode231232- Running headed browsers on systems without display (e.g., remote servers)233- Integrating with VS Code GitHub Copilot234- Running the server as a background service235- Accessing the server from multiple clients236- Debugging with the `/health` endpoint237- Custom MCP client integrations238239**Monitoring:** The server includes a monitoring system that starts on a dynamically allocated port (avoiding conflicts). Check the console output for the actual port.240241**Note:** For Claude Desktop, continue using stdio mode (Standard Mode above) for now.242243## Troubleshooting244245### "No transport found for sessionId" Error246247**Symptom:** 400 error with message "Bad Request: No transport found for sessionId"248249**Solution:**2501. **Check configuration includes `"type": "http"`**251 ```json252 {253 "url": "http://localhost:8931/mcp",254 "type": "http" // โ This is REQUIRED!255 }256 ```2572582. **Verify server logs show connection:**259 ```bash260 # Should see these in order:261 # 1. "Incoming request" - GET /mcp262 # 2. "Transport registered" - with sessionId263 # 3. "POST message received" - with same sessionId264 ```2652663. **Restart both server and client**267268### Connection Issues269270- **Server not starting:** Check if port 8931 is available271- **External access blocked:** This is by design (security). Server binds to localhost only272- **For remote access:** Use SSH tunneling:273 ```bash274 ssh -L 8931:localhost:8931 user@remote-server275 ```276277## Testing278279This project uses Jest for testing. The tests are located in the `src/__tests__` directory.280281### Running Tests282283You can run the tests using one of the following commands:284285```bash286# Run tests using the custom script (with coverage)287node run-tests.cjs288289# Run tests using npm scripts290npm test # Run tests without coverage291npm run test:coverage # Run tests with coverage292npm run test:custom # Run tests with custom script (same as node run-tests.cjs)293```294295The test coverage report will be generated in the `coverage` directory.296297### Running evals298299The evals package loads an mcp client that then runs the index.ts file, so there is no need to rebuild between tests. You can load environment variables by prefixing the npx command. Full documentation can be found [here](https://www.mcpevals.io/docs).300301```bash302OPENAI_API_KEY=your-key npx mcp-eval src/evals/evals.ts src/tools/codegen/index.ts303```304305## Contributing306307When adding new tools, please be mindful of the tool name length. Some clients, like Cursor, have a 60-character limit for the combined server and tool name (`server_name:tool_name`).308309Our server name is `playwright-mcp`. Please ensure your tool names are short enough to not exceed this limit.310311## Star History312313[](https://star-history.com/#executeautomation/mcp-playwright&Date)314
Full transparency โ inspect the skill content before installing.