Playwright MCP
OFFICIAL SERVERMicrosoft's Playwright server for driving Chrome, Firefox, WebKit or Edge from an MCP client
Run, debug and manage web and mobile tests on BrowserStack's real-device cloud from an assistant
Official · BrowserStack TypeScript Remote (hosted) · Streamable HTTPLocal · stdio TestingBrowser automation
73 popularity score ★ 154 ↓ 31k/wk
claude mcp add --scope user --transport http browserstack https://mcp.browserstack.com/mcphttps://mcp.browserstack.com/mcphttps://mcp.browserstack.com/mcpcodex mcp add browserstack --url https://mcp.browserstack.com/mcpcode --add-mcp '{"name":"browserstack","type":"http","url":"https://mcp.browserstack.com/mcp"}'"browserstack": { "url": "https://mcp.browserstack.com/mcp" }Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs BROWSERSTACK_USERNAME, BROWSERSTACK_ACCESS_KEY. Replace each <NAME> with your value.
claude mcp add browserstack -e BROWSERSTACK_USERNAME=<BROWSERSTACK_USERNAME> -e BROWSERSTACK_ACCESS_KEY=<BROWSERSTACK_ACCESS_KEY> -- npx -y @browserstack/mcp-server@latest{
"mcpServers": {
"browserstack": {
"command": "npx",
"args": [
"-y",
"@browserstack/mcp-server@latest"
],
"env": {
"BROWSERSTACK_USERNAME": "<BROWSERSTACK_USERNAME>",
"BROWSERSTACK_ACCESS_KEY": "<BROWSERSTACK_ACCESS_KEY>"
}
}
}
}{
"mcpServers": {
"browserstack": {
"command": "npx",
"args": [
"-y",
"@browserstack/mcp-server@latest"
],
"env": {
"BROWSERSTACK_USERNAME": "<BROWSERSTACK_USERNAME>",
"BROWSERSTACK_ACCESS_KEY": "<BROWSERSTACK_ACCESS_KEY>"
}
}
}
}{
"servers": {
"browserstack": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@browserstack/mcp-server@latest"
],
"env": {
"BROWSERSTACK_USERNAME": "<BROWSERSTACK_USERNAME>",
"BROWSERSTACK_ACCESS_KEY": "<BROWSERSTACK_ACCESS_KEY>"
}
}
}
}[mcp_servers.browserstack]
command = "npx"
args = ["-y", "@browserstack/mcp-server@latest"]
[mcp_servers.browserstack.env]
BROWSERSTACK_USERNAME = "<BROWSERSTACK_USERNAME>"
BROWSERSTACK_ACCESS_KEY = "<BROWSERSTACK_ACCESS_KEY>"gemini mcp add --scope user -e BROWSERSTACK_USERNAME=<BROWSERSTACK_USERNAME> -e BROWSERSTACK_ACCESS_KEY=<BROWSERSTACK_ACCESS_KEY> browserstack npx -- -y @browserstack/mcp-server@latest| Set together: credentials | |
|---|---|
BROWSERSTACK_USERNAME |
Required: BrowserStack username from Account Settings; the local server will not start without it. |
BROWSERSTACK_ACCESS_KEY secret |
Required: BrowserStack access key from Account Settings; the local server will not start without it. |
MCP_UPLOAD_BASE_DIR |
Optional: Folder that file and app uploads are restricted to; upload tools need it. |
USE_OWN_LOCAL_BINARY_PROCESS |
Optional: Set to true when you run the BrowserStack Local binary yourself; BROWSERSTACK_LOCAL_OPTION_* settings configure the tunnel otherwise. |
BrowserStack's MCP server connects an assistant to the BrowserStack testing cloud. Through it an assistant can open a website or a mobile app on a real cloud browser or device, add the BrowserStack SDK to a Selenium, Playwright or Appium suite and run it, read failure logs, screenshots and root-cause analysis for failed builds, run accessibility scans, manage Percy visual-test builds, and create and update test cases, runs and plans in Test Management.
It works in two layers. About fifty tools are registered directly by name (server-factory.ts). Five of them (listProducts, searchCapability, describeCapability, describeEntity, invokeCapability) search and call a catalog of several hundred further capabilities, including Load Testing and many Test Management and Test Reporting operations, which docs/TOOLS.md lists under their snake_case names. invokeCapability runs a write only once the user has granted it, and it refuses any capability the catalog marks destructive before the call is made (capability-registry/register.ts). If the catalog index is missing from the package or CAPABILITY_REGISTRY_DISABLED is set, those five tools are left out and the rest still load.
You can run it locally from npm with a username and access key, or use the hosted endpoint at mcp.browserstack.com, which signs in with OAuth. The README only walks through the hosted setup, yet the local server still stops at start when BROWSERSTACK_USERNAME or BROWSERSTACK_ACCESS_KEY is missing (index.ts). The local server also carries a submitFeedback tool that the README never mentions. It sends reports to BrowserStack. For testing localhost sites it reads BROWSERSTACK_LOCAL_OPTION_* settings (proxy, binary path and others) to set up the BrowserStack Local tunnel (config.ts).
| To run it yourself | Node.js 20.9+ |
|---|---|
| Runs on | macOS, Windows, Linux |
| BrowserStack | Paid planA plan covering the products you use; open-source projects can apply for a free plan |
For the local server, the username and access key from BrowserStack Account Settings. The README asks for Node.js 22 or later (22.15 recommended), while package.json accepts 20.9. In Codex, finish sign-in to the hosted endpoint with codex mcp login browserstack. In Claude Code, run /mcp and sign in. The Cursor marketplace plugin runs the local server, so export BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY before starting Cursor. Copilot users can add it from github.com/mcp. In Kiro, import the power from integrations/kiro-power in the repository through Powers → Add Custom Power. Upload tools need MCP_UPLOAD_BASE_DIR, and askBrowserStackAI needs the account enrolled in its alpha.
The hosted endpoint cannot do Local Testing, so it cannot reach localhost or sites behind a VPN or firewall, and it disables the tools that touch local files: uploadProductRequirementFile, createTestCasesFromFile, addPercySnapshotCommands, listTestFiles and runPercyScan. Uploads are refused outside MCP_UPLOAD_BASE_DIR. fetchRCA and prepareSelfHealingPlan only propose fixes; they do not edit code. The makers say it supports only part of the MCP spec and is under active development, and that results can vary because the client's model chooses the calls. askBrowserStackAI is alpha and returns an entitlement error on accounts not enrolled.
Teams already paying for BrowserStack who want to start live sessions, wire up SDK test runs, triage failed builds or keep Test Management up to date from an editor or chat. Pick the local npm server when you test localhost or internal sites, since only it can open the Local tunnel, or when you need the file-based tools; pick the hosted endpoint when installing Node or binaries is blocked and OAuth sign-in is preferred over storing an access key. It does nothing without a BrowserStack account, so it does not suit anyone wanting free local browser automation.
31 only read, 21 change things. A ? marks an optional parameter.
listProductsquery?: stringdescribeEntityentity: stringsearchCapabilityquery: stringproduct: stringentity?: stringrouting_token?: stringuser_words?: stringmode?: enumlimit?: numberoffset?: numberdescribeCapabilityname?: stringmethod?: stringpath?: stringproduct?: stringinclude_responses?: booleaninvokeCapability changesname?: stringmethod?: stringpath?: stringpath_params?: objectquery?: objectbody?: objectproduct?: stringuser_permission?: enumchange_summary?: stringaskBrowserStackAI changessubmitFeedback changesmessage: stringcategory: enumtoolName?: stringintent?: stringfetchSelfHealedSelectorsprepareSelfHealingPlancreateLCASteps changesuploadProductRequirementFile changescreateTestCasesFromFile changescreateProjectOrFolder changescreateTestCase changesupdateTestCase changeslistTestCaseslistFolderslistTestCaseTemplatescreateTestRun changeslistTestRunsupdateTestRun changesaddTestResult changeslistTestPlansgetTestPlanlistSubTestPlansgetSubTestPlanrunAppLiveSession changesrunBrowserLiveSession changestakeAppScreenshot changessetupBrowserStackAppAutomateTestsrunAppTestsOnBrowserStack changessetupBrowserStackAutomateTestslistSessionslistTestIdsfetchAutomationScreenshotsgetFailureLogsgetBuildIdlistBuildIdfetchBuildInsightsfetchRCAstartAccessibilityScan changesfetchAccessibilityIssuescreateAccessibilityAuthConfig changesgetAccessibilityAuthConfigaccessibilityExpertpercyVisualTestIntegrationAgentexpandPercyVisualTestingaddPercySnapshotCommands changeslistTestFilesrunPercyScan changesfetchPercyChangesmanagePercyBuildApproval changes