Playwright
Microsoft hosts the Playwright Workspaces remote MCP server at https://{region}.mcp.playwright.microsoft.com/playwrightworkspaces/{workspaceId}/mcp over streamable HTTP. Two Official cards are named Playwright. Use the card that asks for a workspace region and a workspace ID. Willow fills the URL from those values. The other card runs Microsoft's Playwright MCP on each person's computer.
An agent drives a managed cloud browser in that one workspace. People sign in with a work or school account, and each call runs as that account. The account needs Azure RBAC access to the workspace so it can create and use browser sessions.
Entra's organizations authorization server has no dynamic client registration. Register an app in Microsoft Entra ID and paste its client ID and secret.
Before you start
- An Azure subscription.
- Permission to create a Playwright workspace in that subscription.
- An account that can register an application in the workspace's Microsoft Entra tenant. See Register an application.
- Permission to assign roles on the workspace: User Access Administrator, Owner, or a classic administrator role.
Create a Playwright workspace
- In the Azure portal, select Create a resource, search for Playwright Workspaces, and select Create.
- Choose the subscription and resource group. Enter a name of 3 to 64 letters or numbers.
- Set Location to a region the remote server supports: Australia East, East Asia, East US, Japan East, Switzerland North, West Europe, or West US 3.
- Select Review + Create, then Create. When deployment finishes, select Go to resource.
On the workspace Overview page, copy the workspace ID (a GUID) and the region. The region in Willow is the workspace's Azure region. See Manage workspaces.
Grant access to the workspace
- Open the workspace. On Access control (IAM), select Add → Add role assignment.
- Search for Playwright. Select Playwright Workspace Contributor or Playwright Workspace Owner, then Next.
- Select the users or groups who will sign in from Willow, then Review + assign.
Contributor and Owner can run Playwright tests on the service. Playwright Workspace Reader can view the workspace and its test results. A new role assignment can take up to an hour to take effect. The role on a new workspace is the role inherited from the subscription: a subscription Contributor is a Contributor on the workspace. See Manage workspace access.
Copy Willow's callback
- In Willow, go to MCP Servers → + Add MCP server, open the Playwright card that asks for a workspace region and a workspace ID, and click + Use.
- On the Setup tab, select Client ID & secret and copy the Redirect URL:
- SaaS:
https://{org}.withwillow.ai/{org}/api/auth/callback - On-prem:
{CONNECT_URL}/{org}/api/auth/callback
- SaaS:
Register an Entra app
- In the Microsoft Entra admin center, go to App registrations → New registration.
- Enter a name, such as
Willow Playwright. Under Supported account types, select Accounts in this organizational directory only. Register the app in the tenant that owns the workspace. - Select Register. Copy the Application (client) ID.
- Go to Authentication → Add Redirect URI → Web, and paste the callback URL from Willow. See Add a redirect URI.
- Go to Certificates & secrets → Client secrets → New client secret. Copy the secret Value. Entra shows it only once. See Add a client secret.
Microsoft's setup article uses the delegated scope https://mcp.playwright.microsoft.com/Playwright.Mcp.Tools. When Entra asks during sign-in, approve Playwright.Mcp.Tools.
Finish setup in Willow
-
Set Workspace region to the workspace's Azure region.
-
Set Playwright workspace ID to the GUID from the workspace Overview page. Replace
YOUR_WORKSPACE_ID. -
Keep OAuth sign-in. Select Client ID & secret. Paste the Client ID and Client Secret.
-
Open Advanced settings and set:
- Authorization Endpoint:
https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize - Token Endpoint:
https://login.microsoftonline.com/organizations/oauth2/v2.0/token - Scopes:
https://mcp.playwright.microsoft.com/Playwright.Mcp.Tools
With a client you entered yourself, Willow sends only the scopes listed here. See Configure Proxy OAuth.
- Authorization Endpoint:
-
Save, click Check connection, and sign in with an account that has access to the workspace.
-
Assign groups and click Publish.
Sign-in for this card is Microsoft Entra ID. Microsoft also documents a workspace access token, sent in the x-api-key header, for clients that use that method. Access tokens stay disabled until you enable them on the workspace.
Browser sessions use workspace capacity and can incur charges.
Troubleshooting
Entra reports a redirect URI mismatch (AADSTS50011)
Cause: The Web redirect on the app differs from the URL Willow sent.
Solution: Copy the Redirect URL from the Setup tab again and add that value under Web.
Entra returns invalid_scope
Cause: Entra rejected the scope Willow sent.
Solution: Set Scopes to https://mcp.playwright.microsoft.com/Playwright.Mcp.Tools, the delegated scope in Microsoft's article. The workspace endpoint's protected-resource metadata lists https://mcp.playwright.microsoft.com/.default. That scope is the set of permissions already granted on the app. Use .default when that grant is already on the app registration.
Sign-in succeeds and calls return Forbidden
Cause: The signed-in account lacks permission to create browser sessions in this workspace, or a new role assignment is still propagating.
Solution: Assign Playwright Workspace Contributor or Playwright Workspace Owner on that workspace. Wait up to an hour, then sign in again.
Tools are not discovered
Cause: The region or workspace ID on the card differs from the workspace.
Solution: On the workspace Overview page, copy the region and workspace ID again. The URL uses the region where the workspace is deployed: https://<region>.mcp.playwright.microsoft.com/playwrightworkspaces/<workspace-id>/mcp.
Client registration fails
Cause: The organizations authorization server has no registration endpoint.
Solution: Select Client ID & secret, paste the app's client ID and secret, and set the endpoints and scope above.