Simon Knott
9066988098
chore: improve "ref not found" error message ( #561 )
...
Helps the model better understand the error cause.
2025-06-17 14:09:29 +02:00
Yury Semikhatsky
96e234012d
chore(extension): start relay before creating MCP server ( #548 )
...
* HTTPS server launched and the relay server is created before MCP
server. This way we can pass CDP endpoint to its constructor.
* MCP HTTP transport is added to precreated HTTP server.
* A bunch of renames to fix style issues.
2025-06-13 16:13:40 -07:00
Max Schmitt
6c3f3b6576
feat: add MCP Chrome extension ( #325 )
...
Instructions:
1. `git clone https://github.com/mxschmitt/playwright-mcp && git
checkout extension-drafft`
2. `npm ci && npm run build`
3. `chrome://extensions` in your normal Chrome, "load unpacked" and
select the extension folder.
4. `node cli.js --port=4242 --extension` - The URL it prints at the end
you can put into the extension popup.
5.
Put either this into Claude Desktop (it does not support SSE yet hence
wrapping it or just put the URL into Cursor/VSCode)
```json
{
"mcpServers": {
"playwright": {
"command": "bash",
"args": [
"-c",
"source $HOME/.nvm/nvm.sh && nvm use --silent 22 && npx supergateway --streamableHttp http://127.0.0.1:4242/mcp "
]
}
}
}
```
Things like `Take a snapshot of my browser.` should now work in your
Prompt Chat.
----
- SSE only for now, since we already have a http server with a port
there
- Upstream "page tests" can be executed over this CDP relay via
https://github.com/microsoft/playwright/pull/36286
- Limitations for now are everything what happens outside of the tab its
session is shared with -> `window.open` / `target=_blank`.
---------
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2025-06-13 13:15:17 -07:00
Dmitry Gozman
0df6d7a441
chore: roll playwright to Jun 10th, v1.53 ( #542 )
...
Co-authored-by: Simon Knott <simonknott@microsoft.com>
2025-06-11 15:53:14 +01:00
Simon Knott
767af21e02
chore: fix Connection type ( #517 )
...
The external `Connection` type regressed in
https://github.com/microsoft/playwright-mcp/pull/490/files#diff-a6be0583428e46844273df76939f02077073da3075716fc57d291a5f2463eaf5 ,
where the `connect()` function was removed but not from the types. I've
changed the code so we import from there, similar to how we do it for
`config.d.ts`, so this shouldn't happen again.
2025-06-05 08:47:04 +02:00
Pavel Feldman
27c498e0e7
chore: rename browser agent to server ( #521 )
2025-06-04 16:43:11 -07:00
Pavel Feldman
0fb9646c4d
chore: experimental agent mode ( #516 )
2025-06-04 09:14:50 -07:00
Simon Knott
9728527900
chore: typo ( #513 )
2025-06-03 11:10:47 -07:00
Pavel Feldman
0b74cdaaf8
chore: sort out signal handling ( #506 )
2025-06-01 14:11:42 -07:00
Pavel Feldman
656779531c
chore: respect server settings from config ( #502 )
2025-05-30 18:17:51 -07:00
Pavel Feldman
eec177d3ac
chore: reuse browser in server mode ( #495 )
2025-05-30 15:15:37 -07:00
Pavel Feldman
54ed7c3200
chore: refactor server, prepare for browser reuse ( #490 )
2025-05-28 16:55:47 -07:00
Pavel Feldman
9429463951
chore: roll Playwright to 5/27 ( #485 )
2025-05-27 16:47:22 -07:00
Pavel Feldman
9e5ffd2ccf
fix(cursor): allow enforcing images for cursor --image-responses=allow ( #478 )
...
Fixes https://github.com/microsoft/playwright-mcp/issues/449
2025-05-27 10:25:09 +02:00
Pavel Feldman
f20ae22ec6
chore: roll Playwright, remove localOutputDir ( #471 )
2025-05-24 11:44:57 -07:00
Simon Knott
13cd1b4bd9
fix: respect browserName in config ( #461 )
...
Resolves https://github.com/microsoft/playwright-mcp/issues/458
2025-05-23 15:13:34 -07:00
Pavel Feldman
1318e39fac
chore: fix operation over cdp ( #440 )
...
Ref https://github.com/microsoft/playwright-mcp/issues/439
2025-05-17 08:20:22 -07:00
Pavel Feldman
c2b7fb29de
chore: start trace server ( #427 )
2025-05-14 20:15:09 -07:00
Pavel Feldman
aa6ac51f92
feat(trace): allow saving trajectory as trace ( #426 )
2025-05-14 18:08:44 -07:00
Pavel Feldman
fea50e6840
chore: introduce resolved config ( #425 )
2025-05-14 16:01:08 -07:00
Pavel Feldman
ee33097abe
chore: normalize --no- options ( #413 )
2025-05-13 16:17:45 -07:00
Pavel Feldman
c506027aec
chore: run w/ sandbox by default ( #412 )
2025-05-13 15:30:02 -07:00
Pavel Feldman
7be0c8872e
feat(args): allow configuring proxy, UA, viewport, https errors ( #410 )
2025-05-13 14:40:03 -07:00
Pavel Feldman
ce72367208
feat(storage): allow passing storage state for isolated contexts ( #409 )
...
Fixes https://github.com/microsoft/playwright-mcp/issues/403
Ref https://github.com/microsoft/playwright-mcp/issues/367
2025-05-13 13:14:04 -07:00
Pavel Feldman
949f956378
feat(ephemeral): allow for non-persistent context operation ( #405 )
...
Ref: https://github.com/microsoft/playwright-mcp/issues/367
Ref: https://github.com/microsoft/playwright-mcp/issues/393
2025-05-12 18:18:53 -07:00
Pavel Feldman
a1eee8351e
chore: collapse readme ( #404 )
2025-05-12 16:42:47 -07:00
Pavel Feldman
dd5b41f1d8
chore: account for undefined arguments ( #400 )
2025-05-12 09:35:33 -07:00
Pavel Feldman
445170a76b
chore: roll playwright 5/9 ( #394 )
2025-05-09 18:01:17 -07:00
Pavel Feldman
c28b480b51
feat(wait): allow waiting for given text ( #390 )
...
Fixes https://github.com/microsoft/playwright-mcp/issues/389
2025-05-09 15:35:28 -07:00
Max Schmitt
65716b60dd
fix: createConnection() via public API ( #384 )
...
Fixes https://github.com/microsoft/playwright-mcp/issues/382
2025-05-09 21:50:38 +02:00
Max Schmitt
95ca08fdb7
fix: use of wrong launchOptions type in public API ( #385 )
2025-05-09 14:16:04 +02:00
Pavel Feldman
57b3c14276
chore: only reset network log upon explicit navigation ( #377 )
...
Fixes https://github.com/microsoft/playwright-mcp/issues/376
2025-05-08 17:02:09 -07:00
おがどら
85c85bd2fb
chore: support custom filename in screenshot function ( #349 )
2025-05-08 11:04:18 -07:00
Max Schmitt
a115c31953
chore: rename console to consoleMessages ( #372 )
...
Motivation: `console` is a global object in Node.js and having a method
like that confuses intellisense.
2025-05-07 16:40:08 +02:00
Simon Knott
c2255246a3
fix: don't error on navigating to a download link ( #328 )
2025-05-07 12:47:45 +02:00
Max Schmitt
91ae93c167
chore: change import assert to readFile ( #368 )
2025-05-07 11:30:01 +02:00
Pavel Feldman
e95b5b1dd6
chore: get rid of connection factory ( #362 )
...
Drive-by User-Agent sniffing and disabling of image type in Cursor.
2025-05-06 14:27:28 -07:00
Pavel Feldman
d01aa19ffa
chore: annotate tools ( #351 )
...
Fixes https://github.com/microsoft/playwright-mcp/issues/215
2025-05-05 17:38:22 -07:00
Ross Wollman
42faa3ccf8
feat: add --(allowed|blocked)-origins ( #319 )
...
Useful to limit the agent when using the playwright-mcp server with an
agent in auto-invocation mode.
Not intended to be a security feature.
2025-05-05 11:28:14 -07:00
Pavel Feldman
4694d60fc5
fix(config): allow specifying user data dir in config ( #342 )
...
Fixes https://github.com/microsoft/playwright-mcp/issues/340
2025-05-05 08:23:24 -07:00
Max Schmitt
7dc689eee7
fix: installation tool on Windows ( #345 )
2025-05-04 06:56:59 -07:00
おがどら
5df011ad4b
feat(cli): set outputDir
via cli options ( #338 )
2025-05-03 20:11:17 -07:00
Pavel Feldman
200cf737bb
chore: use import.meta.resolve to lookup Playwright ( #337 )
2025-05-03 14:38:58 -07:00
Ryosuke Iwanaga
49979641fa
fix: require is not defined ( #334 )
...
Since it's moved to ESM, `require` isn't defined.
This hotfix is just recreating `require` to workaround this issue.
2025-05-02 21:19:54 -07:00
Pavel Feldman
7e087af6a6
chore: slightly adjust gen test prompt ( #333 )
2025-05-02 18:38:06 -07:00
Pavel Feldman
927a1280f1
chore: allow generating tests for script ( #331 )
2025-05-02 17:41:58 -07:00
Pavel Feldman
292e75d464
chore: roll Playwright to remove empty generic nodes ( #330 )
2025-05-02 16:10:48 -07:00
Simon Knott
2c9376e50f
chore: don't sanitize file extension away ( #327 )
2025-05-02 10:58:48 -07:00
Max Schmitt
062cdd0704
fix: sticky launch errors ( #324 )
...
This fixes an issue that there were sticky launch errors. When the
[following code
path](a15f0f301b/src/context.ts (L307-L339)
)
was throwing, the Error was stored in the Promise and not cleared
afterwards, this meant:
- If a browser was not there and the user tried to install it via
`browser_install` it was never working since the error was sticky.
- If other errors like CDP is not available yet etc. error appear a
re-connect would not work - the MCP server would require a restart.
Test plan: Since we don't have any `browser_install` tests I added a CDP
test for now to cover this bug.
2025-05-02 15:32:37 +02:00
Simon Knott
a15f0f301b
chore: save downloads to outputDir ( #310 )
2025-05-02 10:57:31 +02:00