@playwright/mcp 0.0.40-alpha-2025-09-25 → 0.0.40-alpha-2025-09-27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ First, install the Playwright MCP server with your client.
|
|
|
36
36
|
}
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
[<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%
|
|
39
|
+
[<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%7B%22name%22%3A%22playwright%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22%40playwright%2Fmcp%40latest%22%5D%2C%22cwd%22%3A%22%24%7BworkspaceFolder%7D%22%7D) [<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%7B%22name%22%3A%22playwright%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22%40playwright%2Fmcp%40latest%22%5D%2C%22cwd%22%3A%22%24%7BworkspaceFolder%7D%22%7D)
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
<details>
|
|
@@ -151,15 +151,31 @@ Click <code>Save</code>.
|
|
|
151
151
|
|
|
152
152
|
#### Click the button to install:
|
|
153
153
|
|
|
154
|
-
[<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%
|
|
154
|
+
[<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%7B%22name%22%3A%22playwright%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22%40playwright%2Fmcp%40latest%22%5D%2C%22cwd%22%3A%22%24%7BworkspaceFolder%7D%22%7D) [<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%7B%22name%22%3A%22playwright%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22%40playwright%2Fmcp%40latest%22%5D%2C%22cwd%22%3A%22%24%7BworkspaceFolder%7D%22%7D)
|
|
155
155
|
|
|
156
156
|
#### Or install manually:
|
|
157
157
|
|
|
158
|
-
Follow the MCP install [guide](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server), use the
|
|
158
|
+
Follow the MCP install [guide](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server), use the config with `cwd` set to your workspace:
|
|
159
|
+
|
|
160
|
+
```js
|
|
161
|
+
{
|
|
162
|
+
"mcpServers": {
|
|
163
|
+
"playwright": {
|
|
164
|
+
"command": "npx",
|
|
165
|
+
"args": [
|
|
166
|
+
"@playwright/mcp@latest"
|
|
167
|
+
],
|
|
168
|
+
"cwd": "${workspaceFolder}"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
You can also install the Playwright MCP server using the VS Code CLI:
|
|
159
175
|
|
|
160
176
|
```bash
|
|
161
177
|
# For VS Code
|
|
162
|
-
code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@latest"]}'
|
|
178
|
+
code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@latest"],"cwd":"${workspaceFolder}"}'
|
|
163
179
|
```
|
|
164
180
|
|
|
165
181
|
After installation, the Playwright MCP server will be available for use with your GitHub Copilot agent in VS Code.
|
|
@@ -434,6 +450,19 @@ And then in MCP client config, set the `url` to the HTTP endpoint:
|
|
|
434
450
|
}
|
|
435
451
|
```
|
|
436
452
|
|
|
453
|
+
Or If you prefer to run the container as a long-lived service instead of letting the MCP client spawn it, use:
|
|
454
|
+
|
|
455
|
+
```
|
|
456
|
+
docker run -d -i --rm --init --pull=always \
|
|
457
|
+
--entrypoint node \
|
|
458
|
+
--name playwright \
|
|
459
|
+
-p 8931:8931 \
|
|
460
|
+
mcr.microsoft.com/playwright/mcp \
|
|
461
|
+
cli.js --headless --browser chromium --no-sandbox --port 8931
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
The server will listen on host port **8931** and can be reached by any MCP client.
|
|
465
|
+
|
|
437
466
|
You can build the Docker image yourself.
|
|
438
467
|
|
|
439
468
|
```
|