Skip to content

Conversation

@aj47
Copy link
Contributor

@aj47 aj47 commented Nov 19, 2025

Add authentication token documentation to extension README

Summary

This PR adds documentation to the extension README explaining how users can use the PLAYWRIGHT_MCP_EXTENSION_TOKEN environment variable to bypass the connection approval dialog.

Motivation

Currently, users need to manually approve each connection when the MCP server tries to connect to the browser extension. While the authentication token feature already exists in the codebase, it's not documented in the extension README, making it difficult for users to discover this time-saving feature.

Changes

  • Documentation (extension/README.md): Added a new section "Bypassing the Connection Approval Dialog" that explains:
    • How to find the unique authentication token in the extension UI
    • How to configure the token in the MCP server configuration
    • The benefits of using the token (no manual approval needed for each session)

Usage

After this documentation is available, users can configure their MCP client like this:

{ "mcpServers": { "playwright-extension": { "command": "npx", "args": [ "@playwright/mcp@latest", "--extension" ], "env": { "PLAYWRIGHT_MCP_EXTENSION_TOKEN": "their-unique-token-here" } } } }

Benefits

  • Improves user experience by documenting an existing feature
  • Reduces friction for users who frequently restart their MCP sessions
  • Provides clear, copy-paste ready configuration examples
  • No code changes required - purely documentation

Testing

  • ✅ Documentation reviewed for accuracy
  • ✅ Configuration example matches existing implementation
  • ✅ Token mechanism already exists and is tested in the codebase

Related

This documents the existing authentication token feature that's implemented in:

  • extension/src/ui/authToken.tsx - Token generation and display
  • extension/src/ui/connect.tsx - Token validation logic
Add documentation explaining how to use the PLAYWRIGHT_MCP_EXTENSION_TOKEN environment variable to bypass the connection approval dialog. This helps users avoid manually approving each session by configuring their unique authentication token in the MCP server configuration.
@aj47
Copy link
Contributor Author

aj47 commented Nov 19, 2025

@microsoft-github-policy-service agree

@pavelfeldman pavelfeldman merged commit 3f7e2d1 into microsoft:main Nov 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants