@playwright/mcp 0.0.70 → 0.0.71-alpha-2026-04-28

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 CHANGED
@@ -18,7 +18,7 @@ This package provides MCP interface into Playwright. If you are using a **coding
18
18
 
19
19
  ### Requirements
20
20
  - Node.js 18 or newer
21
- - VS Code, Cursor, Windsurf, Claude Desktop, Goose or any other MCP client
21
+ - VS Code, Cursor, Windsurf, Claude Desktop, Goose, Junie or any other MCP client
22
22
 
23
23
  <!--
24
24
  // Generate using:
@@ -237,6 +237,35 @@ Follow the MCP install [guide](https://github.com/google-gemini/gemini-cli/blob/
237
237
  Go to `Advanced settings` -> `Extensions` -> `Add custom extension`. Name to your liking, use type `STDIO`, and set the `command` to `npx @playwright/mcp`. Click "Add Extension".
238
238
  </details>
239
239
 
240
+ <details>
241
+ <summary>Junie</summary>
242
+
243
+ To add the Playwright MCP server in Junie CLI:
244
+
245
+ 1. Type `/mcp`
246
+ 2. Press `Ctrl+A` to add a new MCP server
247
+ 3. Select **Playwright** from the list
248
+
249
+ Alternatively, add to `.junie/mcp/mcp.json`:
250
+
251
+ ```json
252
+ {
253
+ "mcpServers": {
254
+ "Playwright": {
255
+ "command": "npx",
256
+ "args": [
257
+ "-y",
258
+ "@playwright/mcp@latest"
259
+ ]
260
+ }
261
+ }
262
+ }
263
+ ```
264
+
265
+ For more information, see the [Junie MCP configuration documentation](https://junie.jetbrains.com/docs/junie-cli-mcp-configuration.html).
266
+
267
+ </details>
268
+
240
269
  <details>
241
270
  <summary>Kiro</summary>
242
271
 
@@ -371,7 +400,7 @@ Playwright MCP server supports following arguments. They can be provided in the
371
400
  | --console-level <level> | level of console messages to return: "error", "warning", "info", "debug". Each level includes the messages of more severe levels.<br>*env* `PLAYWRIGHT_MCP_CONSOLE_LEVEL` |
372
401
  | --device <device> | device to emulate, for example: "iPhone 15"<br>*env* `PLAYWRIGHT_MCP_DEVICE` |
373
402
  | --executable-path <path> | path to the browser executable.<br>*env* `PLAYWRIGHT_MCP_EXECUTABLE_PATH` |
374
- | --extension | Connect to a running browser instance (Edge/Chrome only). Requires the "Playwright MCP Bridge" browser extension to be installed.<br>*env* `PLAYWRIGHT_MCP_EXTENSION` |
403
+ | --extension | Connect to a running browser instance (Edge/Chrome only). Requires the "Playwright Extension" to be installed.<br>*env* `PLAYWRIGHT_MCP_EXTENSION` |
375
404
  | --endpoint <endpoint> | Bound browser endpoint to connect to.<br>*env* `PLAYWRIGHT_MCP_ENDPOINT` |
376
405
  | --grant-permissions <permissions...> | List of permissions to grant to the browser context, for example "geolocation", "clipboard-read", "clipboard-write".<br>*env* `PLAYWRIGHT_MCP_GRANT_PERMISSIONS` |
377
406
  | --headless | run browser in headless mode, headed by default<br>*env* `PLAYWRIGHT_MCP_HEADLESS` |
@@ -413,15 +442,17 @@ Persistent profile is located at the following locations and you can override it
413
442
 
414
443
  ```bash
415
444
  # Windows
416
- %USERPROFILE%\AppData\Local\ms-playwright\mcp-{channel}-profile
445
+ %USERPROFILE%\AppData\Local\ms-playwright\mcp-{channel}-{workspace-hash}
417
446
 
418
447
  # macOS
419
- - ~/Library/Caches/ms-playwright/mcp-{channel}-profile
448
+ - ~/Library/Caches/ms-playwright/mcp-{channel}-{workspace-hash}
420
449
 
421
450
  # Linux
422
- - ~/.cache/ms-playwright/mcp-{channel}-profile
451
+ - ~/.cache/ms-playwright/mcp-{channel}-{workspace-hash}
423
452
  ```
424
453
 
454
+ `{workspace-hash}` is derived from the MCP client's workspace root, so different projects get separate profiles automatically.
455
+
425
456
  **Isolated**
426
457
 
427
458
  In the isolated mode, each session is started in the isolated profile. Every time you ask MCP to close the browser,
@@ -446,7 +477,7 @@ state [here](https://playwright.dev/docs/auth).
446
477
 
447
478
  **Browser Extension**
448
479
 
449
- The Playwright MCP Chrome Extension allows you to connect to existing browser tabs and leverage your logged-in sessions and browser state. See [packages/extension/README.md](packages/extension/README.md) for installation and setup instructions.
480
+ The Playwright MCP Chrome Extension allows you to connect to existing browser tabs and leverage your logged-in sessions and browser state. See [microsoft/playwright › packages/extension](https://github.com/microsoft/playwright/tree/main/packages/extension#readme) for installation and setup instructions.
450
481
 
451
482
  ### Initial state
452
483
 
@@ -563,7 +594,7 @@ npx @playwright/mcp@latest --config path/to/config.json
563
594
  /**
564
595
  * Connect to a running browser instance (Edge/Chrome only). If specified, `browser`
565
596
  * config is ignored.
566
- * Requires the "Playwright MCP Bridge" browser extension to be installed.
597
+ * Requires the "Playwright Extension" to be installed.
567
598
  */
568
599
  extension?: boolean;
569
600
 
@@ -793,8 +824,7 @@ http.createServer(async (req, res) => {
793
824
  - Description: Perform click on a web page
794
825
  - Parameters:
795
826
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
796
- - `ref` (string): Exact target element reference from the page snapshot
797
- - `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available
827
+ - `target` (string): Exact target element reference from the page snapshot, or a unique element selector
798
828
  - `doubleClick` (boolean, optional): Whether to perform a double click instead of a single click
799
829
  - `button` (string, optional): Button to click, defaults to left
800
830
  - `modifiers` (array, optional): Modifier keys to press
@@ -825,12 +855,22 @@ http.createServer(async (req, res) => {
825
855
  - Title: Drag mouse
826
856
  - Description: Perform drag and drop between two elements
827
857
  - Parameters:
828
- - `startElement` (string): Human-readable source element description used to obtain the permission to interact with the element
829
- - `startRef` (string): Exact source element reference from the page snapshot
830
- - `startSelector` (string, optional): CSS or role selector for the source element, when ref is not available
831
- - `endElement` (string): Human-readable target element description used to obtain the permission to interact with the element
832
- - `endRef` (string): Exact target element reference from the page snapshot
833
- - `endSelector` (string, optional): CSS or role selector for the target element, when ref is not available
858
+ - `startElement` (string, optional): Human-readable source element description used to obtain the permission to interact with the element
859
+ - `startTarget` (string): Exact target element reference from the page snapshot, or a unique element selector
860
+ - `endElement` (string, optional): Human-readable target element description used to obtain the permission to interact with the element
861
+ - `endTarget` (string): Exact target element reference from the page snapshot, or a unique element selector
862
+ - Read-only: **false**
863
+
864
+ <!-- NOTE: This has been generated via update-readme.js -->
865
+
866
+ - **browser_drop**
867
+ - Title: Drop files or data onto an element
868
+ - Description: Drop files or MIME-typed data onto an element, as if dragged from outside the page. At least one of "paths" or "data" must be provided.
869
+ - Parameters:
870
+ - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
871
+ - `target` (string): Exact target element reference from the page snapshot, or a unique element selector
872
+ - `paths` (array, optional): Absolute paths to files to drop onto the element.
873
+ - `data` (object, optional): Data to drop, as a map of MIME type to string value (e.g. {"text/plain": "hello", "text/uri-list": "https://example.com"}).
834
874
  - Read-only: **false**
835
875
 
836
876
  <!-- NOTE: This has been generated via update-readme.js -->
@@ -839,10 +879,9 @@ http.createServer(async (req, res) => {
839
879
  - Title: Evaluate JavaScript
840
880
  - Description: Evaluate JavaScript expression on page or element
841
881
  - Parameters:
842
- - `function` (string): () => { /* code */ } or (element) => { /* code */ } when element is provided
843
882
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
844
- - `ref` (string, optional): Exact target element reference from the page snapshot
845
- - `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available.
883
+ - `target` (string, optional): Exact target element reference from the page snapshot, or a unique element selector
884
+ - `function` (string): () => { /* code */ } or (element) => { /* code */ } when element is provided
846
885
  - `filename` (string, optional): Filename to save the result to. If not provided, result is returned as text.
847
886
  - Read-only: **false**
848
887
 
@@ -881,8 +920,7 @@ http.createServer(async (req, res) => {
881
920
  - Description: Hover over element on page
882
921
  - Parameters:
883
922
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
884
- - `ref` (string): Exact target element reference from the page snapshot
885
- - `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available
923
+ - `target` (string): Exact target element reference from the page snapshot, or a unique element selector
886
924
  - Read-only: **false**
887
925
 
888
926
  <!-- NOTE: This has been generated via update-readme.js -->
@@ -951,8 +989,7 @@ http.createServer(async (req, res) => {
951
989
  - Description: Select an option in a dropdown
952
990
  - Parameters:
953
991
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
954
- - `ref` (string): Exact target element reference from the page snapshot
955
- - `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available
992
+ - `target` (string): Exact target element reference from the page snapshot, or a unique element selector
956
993
  - `values` (array): Array of values to select in the dropdown. This can be a single value or multiple values.
957
994
  - Read-only: **false**
958
995
 
@@ -962,9 +999,10 @@ http.createServer(async (req, res) => {
962
999
  - Title: Page snapshot
963
1000
  - Description: Capture accessibility snapshot of the current page, this is better than screenshot
964
1001
  - Parameters:
1002
+ - `target` (string, optional): Exact target element reference from the page snapshot, or a unique element selector
965
1003
  - `filename` (string, optional): Save snapshot to markdown file instead of returning it in the response.
966
- - `selector` (string, optional): Element selector of the root element to capture a partial snapshot instead of the whole page
967
1004
  - `depth` (number, optional): Limit the depth of the snapshot tree
1005
+ - `boxes` (boolean, optional): Include each element's bounding box as [box=x,y,width,height] in the snapshot
968
1006
  - Read-only: **true**
969
1007
 
970
1008
  <!-- NOTE: This has been generated via update-readme.js -->
@@ -973,11 +1011,10 @@ http.createServer(async (req, res) => {
973
1011
  - Title: Take a screenshot
974
1012
  - Description: Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.
975
1013
  - Parameters:
1014
+ - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
1015
+ - `target` (string, optional): Exact target element reference from the page snapshot, or a unique element selector
976
1016
  - `type` (string): Image format for the screenshot. Default is png.
977
1017
  - `filename` (string, optional): File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified. Prefer relative file names to stay within the output directory.
978
- - `element` (string, optional): Human-readable element description used to obtain permission to screenshot the element. If not provided, the screenshot will be taken of viewport. If element is provided, ref must be provided too.
979
- - `ref` (string, optional): Exact target element reference from the page snapshot. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too.
980
- - `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available.
981
1018
  - `fullPage` (boolean, optional): When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots.
982
1019
  - Read-only: **true**
983
1020
 
@@ -988,8 +1025,7 @@ http.createServer(async (req, res) => {
988
1025
  - Description: Type text into editable element
989
1026
  - Parameters:
990
1027
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
991
- - `ref` (string): Exact target element reference from the page snapshot
992
- - `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available
1028
+ - `target` (string): Exact target element reference from the page snapshot, or a unique element selector
993
1029
  - `text` (string): Text to type into the element
994
1030
  - `submit` (boolean, optional): Whether to submit entered text (press Enter after)
995
1031
  - `slowly` (boolean, optional): Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once.
@@ -1019,6 +1055,7 @@ http.createServer(async (req, res) => {
1019
1055
  - Parameters:
1020
1056
  - `action` (string): Operation to perform
1021
1057
  - `index` (number, optional): Tab index, used for close/select. If omitted for close, current tab is closed.
1058
+ - `url` (string, optional): URL to navigate to in the new tab, used for new.
1022
1059
  - Read-only: **false**
1023
1060
 
1024
1061
  </details>
@@ -1254,6 +1291,27 @@ http.createServer(async (req, res) => {
1254
1291
 
1255
1292
  <!-- NOTE: This has been generated via update-readme.js -->
1256
1293
 
1294
+ - **browser_hide_highlight**
1295
+ - Title: Hide element highlight
1296
+ - Description: Remove a highlight overlay previously added for the element.
1297
+ - Parameters:
1298
+ - `element` (string, optional): Human-readable element description used when adding the highlight; must match the value passed to browser_highlight.
1299
+ - `target` (string, optional): Exact target element reference from the page snapshot, or a unique element selector
1300
+ - Read-only: **true**
1301
+
1302
+ <!-- NOTE: This has been generated via update-readme.js -->
1303
+
1304
+ - **browser_highlight**
1305
+ - Title: Highlight element
1306
+ - Description: Show a persistent highlight overlay around the element on the page.
1307
+ - Parameters:
1308
+ - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
1309
+ - `target` (string): Exact target element reference from the page snapshot, or a unique element selector
1310
+ - `style` (string, optional): Additional inline CSS applied to the highlight overlay, e.g. "outline: 2px dashed red".
1311
+ - Read-only: **true**
1312
+
1313
+ <!-- NOTE: This has been generated via update-readme.js -->
1314
+
1257
1315
  - **browser_resume**
1258
1316
  - Title: Resume paused script execution
1259
1317
  - Description: Resume script execution after it was paused. When called with step set to true, execution will pause again before the next action.
@@ -1401,8 +1459,7 @@ http.createServer(async (req, res) => {
1401
1459
  - Description: Generate locator for the given element to use in tests
1402
1460
  - Parameters:
1403
1461
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
1404
- - `ref` (string): Exact target element reference from the page snapshot
1405
- - `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available
1462
+ - `target` (string): Exact target element reference from the page snapshot, or a unique element selector
1406
1463
  - Read-only: **true**
1407
1464
 
1408
1465
  <!-- NOTE: This has been generated via update-readme.js -->
@@ -1422,8 +1479,7 @@ http.createServer(async (req, res) => {
1422
1479
  - Description: Verify list is visible on the page
1423
1480
  - Parameters:
1424
1481
  - `element` (string): Human-readable list description
1425
- - `ref` (string): Exact target element reference that points to the list
1426
- - `selector` (string, optional): CSS or role selector for the target list, when "ref" is not available.
1482
+ - `target` (string): Exact target element reference that points to the list
1427
1483
  - `items` (array): Items to verify
1428
1484
  - Read-only: **false**
1429
1485
 
@@ -1444,8 +1500,7 @@ http.createServer(async (req, res) => {
1444
1500
  - Parameters:
1445
1501
  - `type` (string): Type of the element
1446
1502
  - `element` (string): Human-readable element description
1447
- - `ref` (string): Exact target element reference from the page snapshot
1448
- - `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available
1503
+ - `target` (string): Exact target element reference from the page snapshot
1449
1504
  - `value` (string): Value to verify. For checkbox, use "true" or "false".
1450
1505
  - Read-only: **false**
1451
1506
 
package/cli.js CHANGED
@@ -16,17 +16,17 @@
16
16
  */
17
17
 
18
18
  const { program } = require('playwright-core/lib/utilsBundle');
19
- const { decorateMCPCommand } = require('playwright-core/lib/tools/mcp/program');
19
+ const { tools, libCli } = require('playwright-core/lib/coreBundle');
20
20
 
21
21
  if (process.argv.includes('install-browser')) {
22
22
  const argv = process.argv.map(arg => arg === 'install-browser' ? 'install' : arg);
23
- const { program: mainProgram } = require('playwright-core/lib/cli/program');
24
- mainProgram.parse(argv);
23
+ libCli.decorateProgram(program);
24
+ void program.parseAsync(argv);
25
25
  return;
26
26
  }
27
27
 
28
28
  const packageJSON = require('./package.json');
29
29
  const p = program.version('Version ' + packageJSON.version).name('Playwright MCP');
30
- decorateMCPCommand(p, packageJSON.version)
30
+ tools.decorateMCPCommand(p, packageJSON.version);
31
31
 
32
32
  void program.parseAsync(process.argv);
package/config.d.ts CHANGED
@@ -101,7 +101,7 @@ export type Config = {
101
101
  /**
102
102
  * Connect to a running browser instance (Edge/Chrome only). If specified, `browser`
103
103
  * config is ignored.
104
- * Requires the "Playwright MCP Bridge" browser extension to be installed.
104
+ * Requires the "Playwright Extension" to be installed.
105
105
  */
106
106
  extension?: boolean;
107
107
 
package/index.js CHANGED
@@ -15,5 +15,5 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- const { createConnection } = require('playwright-core/lib/tools/exports');
19
- module.exports = { createConnection };
18
+ const { tools } = require('playwright-core/lib/coreBundle');
19
+ module.exports = { createConnection: tools.createConnection };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playwright/mcp",
3
- "version": "0.0.70",
3
+ "version": "0.0.71-alpha-2026-04-28",
4
4
  "description": "Playwright Tools for MCP",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,7 +23,11 @@
23
23
  "wtest": "playwright test --project=webkit",
24
24
  "dtest": "MCP_IN_DOCKER=1 playwright test --project=chromium-docker",
25
25
  "build": "echo OK",
26
- "npm-publish": "npm run lint && npm run test && npm publish"
26
+ "npm-publish": "npm run lint && npm run test && npm publish",
27
+ "docker-build": "docker build --no-cache -t playwright-mcp-dev:latest .",
28
+ "docker-rm": "docker rm playwright-mcp-dev",
29
+ "docker-run": "docker run -it -p 8080:8080 --name playwright-mcp-dev playwright-mcp-dev:latest",
30
+ "roll": "node roll.js"
27
31
  },
28
32
  "exports": {
29
33
  "./package.json": "./package.json",
@@ -33,8 +37,13 @@
33
37
  }
34
38
  },
35
39
  "dependencies": {
36
- "playwright": "1.60.0-alpha-1774999321000",
37
- "playwright-core": "1.60.0-alpha-1774999321000"
40
+ "playwright": "1.60.0-alpha-2026-04-27",
41
+ "playwright-core": "1.60.0-alpha-2026-04-27"
42
+ },
43
+ "devDependencies": {
44
+ "@modelcontextprotocol/sdk": "^1.25.2",
45
+ "@playwright/test": "1.60.0-alpha-2026-04-27",
46
+ "@types/node": "^24.3.0"
38
47
  },
39
48
  "bin": {
40
49
  "playwright-mcp": "cli.js"