Skip to content

Commit 3f7e2d1

Browse files
authored
docs: add authentication token instructions to extension README (#1207)
1 parent e0cb424 commit 3f7e2d1

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

extension/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,33 @@ Configure Playwright MCP server to connect to the browser using the extension by
4545

4646
When the LLM interacts with the browser for the first time, it will load a page where you can select which browser tab the LLM will connect to. This allows you to control which specific page the AI assistant will interact with during the session.
4747

48+
### Bypassing the Connection Approval Dialog
49+
50+
By default, you'll need to approve each connection when the MCP server tries to connect to your browser. To bypass this approval dialog and allow automatic connections, you can use an authentication token.
51+
52+
#### Using Your Unique Authentication Token
53+
54+
1. After installing the extension, click on the extension icon or navigate to the extension's status page
55+
2. Copy the `PLAYWRIGHT_MCP_EXTENSION_TOKEN` value displayed in the extension UI
56+
3. Add it to your MCP server configuration:
57+
58+
```json
59+
{
60+
"mcpServers": {
61+
"playwright-extension": {
62+
"command": "npx",
63+
"args": [
64+
"@playwright/mcp@latest",
65+
"--extension"
66+
],
67+
"env": {
68+
"PLAYWRIGHT_MCP_EXTENSION_TOKEN": "your-token-here"
69+
}
70+
}
71+
}
72+
}
73+
```
74+
75+
This token is unique to your browser profile and provides secure authentication between the MCP server and the extension. Once configured, you won't need to manually approve connections each time.
76+
4877

0 commit comments

Comments
 (0)