@browserstack/mcp-server 1.2.27 → 1.2.29-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -292,7 +292,9 @@ Select the “Installed” tab. Click the “Configure MCP Servers” button at
292
292
 
293
293
  ### 💡 List of BrowserStack MCP Tools
294
294
 
295
- As of now we support 20 tools.
295
+ As of now we support 44 tools.
296
+
297
+ > **Remote MCP note:** Tools marked _(not available in Remote MCP)_ rely on local file/process state and are disabled in the multi-tenant [Remote MCP Server](#-remote-mcp-server). They are available in the local (npx) setup.
296
298
 
297
299
  ---
298
300
 
@@ -313,60 +315,109 @@ As of now we support 20 tools.
313
315
  Add a test case named 'Invalid Login Scenario' to the Login folder in the 'Shopping App' project with PR-53617, Folder ID: 117869
314
316
  ```
315
317
 
316
- 3. `listTestCases` — List test cases for a project (supports filters like priority, status, tags).
318
+ 3. `updateTestCase` — Update an existing test case. Any subset of fields may be changed (name, priority, status, steps, tags, etc.); only supplied fields are modified.
319
+ **Prompt example**
320
+
321
+ ```text
322
+ Update test case TC-482 in the 'Shopping App' project and set its priority to high
323
+ ```
324
+
325
+ 4. `listTestCases` — List test cases for a project, optionally scoped to a folder (supports filters like case_type, priority, and pagination).
317
326
  **Prompt example**
318
327
 
319
328
  ```text
320
329
  List all high-priority test cases in the 'Shopping App' project with project_identifier: PR-59457
321
330
  ```
322
331
 
323
- 4. `createTestRun` — Create a test run (suite) for selected test cases in a project.
332
+ 5. `listFolders` — List folders in a Test Management project (returns each folder's id, name, case counts, and sub-folder counts). Pass a parent_id to list sub-folders.
333
+ **Prompt example**
334
+
335
+ ```text
336
+ List all folders in the 'Shopping App' project with project_identifier: PR-59457
337
+ ```
338
+
339
+ 6. `listTestCaseTemplates` — List test-case templates with their numeric template_id, for use with `createTestCase` to apply a custom template.
340
+ **Prompt example**
341
+
342
+ ```text
343
+ List the available test case templates in the 'Shopping App' project
344
+ ```
345
+
346
+ 7. `createTestRun` — Create a test run (suite) for selected test cases in a project.
324
347
  **Prompt example**
325
348
 
326
349
  ```text
327
350
  Create a test run for the Login folder in the 'Shopping App' project and name it 'Release v1.0 Login Flow'
328
351
  ```
329
352
 
330
- 5. `listTestRuns` — List test runs for a project (filter by dates, assignee, state).
353
+ 8. `listTestRuns` — List test runs for a project (filter by dates, assignee, state).
331
354
  **Prompt example**
332
355
 
333
356
  ```text
334
357
  List all test runs from the 'Shopping App' project that were executed last week and are currently marked in-progress
335
358
  ```
336
359
 
337
- 6. `updateTestRun` — Update a test run's name/state and/or add test cases to it.
360
+ 9. `updateTestRun` — Update a test run's name/state and/or add test cases to it.
338
361
  **Prompt example**
339
362
 
340
363
  ```text
341
364
  Update test run ID 1043 in the 'Shopping App' project and mark it as complete with the note 'Regression cycle done'
342
365
  ```
343
366
 
344
- 7. `addTestResult` — Add a manual execution result (passed/failed/blocked/skipped) for a test case within a run.
367
+ 10. `addTestResult` — Add a manual execution result (passed/failed/blocked/skipped) for a test case within a run.
345
368
  **Prompt example**
346
369
 
347
370
  ```text
348
371
  Mark the test case 'Invalid Login Scenario' as passed in test run ID 1043 of the 'Shopping App' project
349
372
  ```
350
373
 
351
- 8. `createTestCasesFromFile` — Bulk-create test cases from an uploaded file (e.g., PDF).
374
+ 11. `createTestCasesFromFile` — Generate test cases in bulk from an uploaded file using the Test Case Generator AI Agent. _(not available in Remote MCP)_
352
375
  **Prompt example**
353
376
 
354
377
  ```text
355
378
  Upload test cases from '/Users/xyz/testcases.pdf' to the 'Shopping App' project in Test Management
356
379
  ```
357
380
 
381
+ 12. `listTestPlans` — List test plans (TP-*) in a project, with name, status, dates, and active/closed run counts. Supports pagination.
382
+ **Prompt example**
383
+
384
+ ```text
385
+ List all test plans in the 'Shopping App' project with project_identifier: PR-59457
386
+ ```
387
+
388
+ 13. `getTestPlan` — Fetch a test plan by identifier (TP-*) with its metadata, linked test runs, total test-case count, and status summary.
389
+ **Prompt example**
390
+
391
+ ```text
392
+ Get the details of test plan TP-120 in the 'Shopping App' project
393
+ ```
394
+
395
+ 14. `listSubTestPlans` — List sub-test-plans (STP-*) under a parent test plan (TP-*). Supports pagination.
396
+ **Prompt example**
397
+
398
+ ```text
399
+ List sub-test-plans under test plan TP-120 in the 'Shopping App' project
400
+ ```
401
+
402
+ 15. `getSubTestPlan` — Fetch a sub-test-plan (STP-*) under a parent plan, with its metadata and linked test runs.
403
+ **Prompt example**
404
+
405
+ ```text
406
+ Get sub-test-plan STP-45 under test plan TP-120 in the 'Shopping App' project
407
+ ```
408
+
358
409
  ---
359
410
 
360
411
  ## ⚙️ BrowserStack SDK Setup / Automate Test
361
412
 
362
- 9. `setupBrowserStackAutomateTests` — Integrate BrowserStack SDK and run web tests on BrowserStack (optionally enable Percy).
413
+ 16. `setupBrowserStackAutomateTests` — Integrate BrowserStack SDK and run web tests on BrowserStack. For visual testing/Percy, use the dedicated Percy tools.
363
414
  **Prompt example**
364
415
 
365
416
  ```text
366
- Run my Selenium-JUnit5 tests written in Java on Chrome and Firefox. Enable Percy for visual testing.
417
+ Run my Selenium-JUnit5 tests written in Java on Chrome and Firefox.
367
418
  ```
368
419
 
369
- 10. `fetchAutomationScreenshots` — Fetch screenshots captured during a given Automate/App Automate session.
420
+ 17. `fetchAutomationScreenshots` — Fetch screenshots captured during a given Automate/App Automate session.
370
421
  **Prompt example**
371
422
 
372
423
  ```text
@@ -377,18 +428,25 @@ As of now we support 20 tools.
377
428
 
378
429
  ## 🔍 Observability
379
430
 
380
- 11. `getFailureLogs` — Retrieve error logs for Automate/App Automate sessions (optionally by Build ID for App Automate).
431
+ 18. `getFailureLogs` — Retrieve error logs for Automate/App Automate sessions (optionally by Build ID for App Automate).
381
432
  **Prompt example**
382
433
 
383
434
  ```text
384
435
  Get the error logs from the session ID: 21a864032a7459f1e7634222249b316759d6827f, Build ID: dt7ung4wmjittzff8kksrjadjax9gzvbscoyf9qn of App Automate test session
385
436
  ```
386
437
 
438
+ 19. `fetchBuildInsights` — Fetch insights about a BrowserStack build by combining build details and quality-gate results.
439
+ **Prompt example**
440
+
441
+ ```text
442
+ Get the build insights for build UUID <your-build-uuid> on BrowserStack
443
+ ```
444
+
387
445
  ---
388
446
 
389
447
  ## 📱 App Live
390
448
 
391
- 12. `runAppLiveSession` — Start a manual app testing session on a real device in the cloud.
449
+ 20. `runAppLiveSession` — Start a manual app testing session on a real device in the cloud.
392
450
  **Prompt example**
393
451
 
394
452
  ```text
@@ -399,7 +457,7 @@ As of now we support 20 tools.
399
457
 
400
458
  ## 💻 Live
401
459
 
402
- 13. `runBrowserLiveSession` — Start a Live session for website testing on desktop or mobile browsers.
460
+ 21. `runBrowserLiveSession` — Start a Live session for website testing on desktop or mobile browsers.
403
461
  **Prompt example**
404
462
 
405
463
  ```text
@@ -410,62 +468,179 @@ As of now we support 20 tools.
410
468
 
411
469
  ## 📲 App Automate
412
470
 
413
- 14. `takeAppScreenshot` — Launch the app on a specified device and captures a quick verification screenshot. This tool is just to verify whether your app has been launched.
471
+ 22. `takeAppScreenshot` — Launch the app on a specified device and capture a quick verification screenshot to confirm your app has launched.
414
472
  **Prompt example**
415
473
 
416
474
  ```text
417
475
  Take a screenshot of my app on Google Pixel 6 with Android 12 while testing on App Automate. App file path: /Users/xyz/app-debug.apk
418
476
  ```
419
477
 
420
- 15. `runAppTestsOnBrowserStack` — Run automated mobile tests (Espresso/XCUITest, etc.) on real devices.
478
+ 23. `runAppTestsOnBrowserStack` — Run pre-built native mobile test suites (Espresso/XCUITest) by direct upload of compiled .apk/.ipa test files.
421
479
  **Prompt example**
422
480
 
423
481
  ```text
424
482
  Run Espresso tests from /tests/checkout.zip on Galaxy S21 and Pixel 6 with Android 12. App path is /apps/beta-release.apk under project 'Checkout Flow'
425
483
  ```
426
484
 
485
+ 24. `setupBrowserStackAppAutomateTests` — Set up BrowserStack App Automate SDK integration for Appium-based mobile app testing.
486
+ **Prompt example**
487
+
488
+ ```text
489
+ Set up my Appium test suite to run on BrowserStack App Automate
490
+ ```
491
+
427
492
  ---
428
493
 
429
494
  ## ♿ Accessibility
430
495
 
431
- 16. `accessibilityExpert` — Ask A11y Expert (WCAG 2.0/2.1/2.2, mobile/web usability, best practices).
496
+ 25. `accessibilityExpert` — Ask the A11y Expert (WCAG 2.0/2.1/2.2, mobile/web usability, best practices).
432
497
  **Prompt example**
433
498
 
434
499
  ```text
435
500
  What WCAG guidelines apply to form field error messages on mobile web?
436
501
  ```
437
502
 
438
- 17. `startAccessibilityScan` — Start a web accessibility scan and return the result link.
503
+ 26. `startAccessibilityScan` — Start a web accessibility scan and retrieve a local CSV report path.
439
504
  **Prompt example**
440
505
 
441
506
  ```text
442
507
  Run accessibility scan for "www.example.com"
443
508
  ```
444
509
 
510
+ 27. `createAccessibilityAuthConfig` — Create an authentication configuration (form-based or basic) for accessibility scans behind a login.
511
+ **Prompt example**
512
+
513
+ ```text
514
+ Create a basic-auth accessibility config named 'site-login' for https://www.example.com with username testuser and password <password>
515
+ ```
516
+
517
+ 28. `getAccessibilityAuthConfig` — Retrieve an existing accessibility authentication configuration by ID.
518
+ **Prompt example**
519
+
520
+ ```text
521
+ Get accessibility auth config with ID <config-id>
522
+ ```
523
+
524
+ 29. `fetchAccessibilityIssues` — Fetch accessibility issues from a completed scan, with pagination support.
525
+ **Prompt example**
526
+
527
+ ```text
528
+ Fetch the accessibility issues for scan ID <scan-id> and scan run ID <scan-run-id>
529
+ ```
530
+
531
+ ---
532
+
533
+ ## 🎨 Percy Visual Testing
534
+
535
+ 30. `percyVisualTestIntegrationAgent` — Integrate Percy visual testing into a new project and demonstrate visual change detection with a step-by-step simulation.
536
+ **Prompt example**
537
+
538
+ ```text
539
+ Integrate Percy for this project
540
+ ```
541
+
542
+ 31. `expandPercyVisualTesting` — Set up or expand Percy visual testing coverage for existing projects (Percy Web Standalone and Percy Automate).
543
+ **Prompt example**
544
+
545
+ ```text
546
+ Expand Percy coverage for this project
547
+ ```
548
+
549
+ 32. `addPercySnapshotCommands` — Add Percy snapshot commands to the specified test files. _(not available in Remote MCP)_
550
+ **Prompt example**
551
+
552
+ ```text
553
+ Add Percy snapshot commands to my Cypress test files
554
+ ```
555
+
556
+ 33. `listTestFiles` — List all test files for a given set of directories. _(not available in Remote MCP)_
557
+ **Prompt example**
558
+
559
+ ```text
560
+ List the test files under my ./tests directory
561
+ ```
562
+
563
+ 34. `runPercyScan` — Run a Percy visual test scan. _(not available in Remote MCP)_
564
+ **Prompt example**
565
+
566
+ ```text
567
+ Run this Percy build
568
+ ```
569
+
570
+ 35. `fetchPercyChanges` — Retrieve and summarize visual changes detected by Percy AI between the latest and previous builds.
571
+ **Prompt example**
572
+
573
+ ```text
574
+ Summarize the visual changes Percy detected in my latest build
575
+ ```
576
+
577
+ 36. `managePercyBuildApproval` — Approve or reject a Percy build.
578
+ **Prompt example**
579
+
580
+ ```text
581
+ Approve the latest Percy build
582
+ ```
583
+
445
584
  ---
446
585
 
447
586
  ## 🤖 BrowserStack AI Agents
448
587
 
449
- 18. `fetchSelfHealedSelectors` — Retrieve AI self-healed selectors to fix flaky tests due to DOM changes.
588
+ 37. `uploadProductRequirementFile` — Upload a PRD/screenshot/PDF and get a file mapping ID (used with `createTestCasesFromFile`). _(not available in Remote MCP)_
450
589
  **Prompt example**
451
590
 
452
591
  ```text
453
- Fetch and fix flaky test selectors in Automate session ID session_9482 using MCP
592
+ Upload PRD from /Users/xyz/Desktop/login-flow.pdf and use BrowserStack AI to generate test cases
454
593
  ```
455
594
 
456
- 19. `createLCASteps` — Generate Low Code Automation steps from a manual test case in Test Management.
595
+ 38. `createLCASteps` — Generate Low Code Automation (LCA) steps from a manual test case in Test Management.
457
596
  **Prompt example**
458
597
 
459
598
  ```text
460
599
  Convert the manual test case 'Add to Cart' in the 'Shopping App' project into LCA steps
461
600
  ```
462
601
 
463
- 20. `uploadProductRequirementFile` — Upload a PRD/screenshot/PDF and get a file mapping ID (used with `createTestCasesFromFile`).
602
+ 39. `fetchSelfHealedSelectors` — Retrieve AI self-healed selectors (plus test source) to fix flaky tests caused by DOM changes.
464
603
  **Prompt example**
465
604
 
466
605
  ```text
467
- Upload PRD from /Users/xyz/Desktop/login-flow.pdf and use BrowserStack AI to generate test cases
606
+ Fetch and fix flaky test selectors in Automate session ID session_9482 using MCP
607
+ ```
608
+
609
+ 40. `prepareSelfHealingPlan` — Build a self-healing edit plan that bundles locator pairs with test source for your LLM to apply. Does NOT modify files itself.
610
+ **Prompt example**
611
+
612
+ ```text
613
+ Prepare a self-healing plan from the self-healed selectors for my build
614
+ ```
615
+
616
+ 41. `fetchRCA` — Fetch AI Root Cause Analysis for your failed Automate/App-Automate tests (by numeric test ID). Suggests fixes only; never auto-applies.
617
+ **Prompt example**
618
+
619
+ ```text
620
+ Fetch the root cause analysis for failed test IDs 101 and 102 on BrowserStack
468
621
  ```
622
+
623
+ 42. `getBuildId` — Get the BrowserStack build ID for a given project and build name, scoped to your builds.
624
+ **Prompt example**
625
+
626
+ ```text
627
+ Get the build ID for build 'nightly-regression' in project 'Checkout Flow'
628
+ ```
629
+
630
+ 43. `listBuildId` — Get the latest build ID for a project and build name, across all users (no user filter).
631
+ **Prompt example**
632
+
633
+ ```text
634
+ Get the latest build ID for build 'nightly-regression' in project 'Checkout Flow'
635
+ ```
636
+
637
+ 44. `listTestIds` — List test IDs from a BrowserStack Automate build, filtered by status (passed/failed/pending/skipped).
638
+ **Prompt example**
639
+
640
+ ```text
641
+ List the failed test IDs from build UUID <your-build-uuid> on BrowserStack
642
+ ```
643
+
469
644
  ## 🚀 Remote MCP Server
470
645
 
471
646
  Remote MCP comes with all the functionalities of an MCP server without the hassles of complex setup or local installation.
@@ -1,15 +1,25 @@
1
1
  import { apiClient } from "../../lib/apiClient.js";
2
2
  import { parse } from "csv-parse/sync";
3
+ import logger from "../../logger.js";
3
4
  export async function parseAccessibilityReportFromCSV(reportLink, { maxCharacterLength = 5000, nextPage = 0 } = {}) {
4
5
  // 1) Download & parse
5
6
  const res = await apiClient.get({ url: reportLink });
6
7
  if (!res.ok)
7
8
  throw new Error(`Failed to download report: ${res.statusText}`);
8
9
  const text = typeof res.data === "string" ? res.data : JSON.stringify(res.data);
9
- const all = parse(text, {
10
- columns: true,
11
- skip_empty_lines: true,
12
- }).map((row) => ({
10
+ let parsed;
11
+ try {
12
+ parsed = parse(text, {
13
+ columns: true,
14
+ skip_empty_lines: true,
15
+ relax_column_count_less: true,
16
+ });
17
+ }
18
+ catch (err) {
19
+ logger.error(`[AccessibilityReport] CSV parse failed (${text.length} chars): ${err instanceof Error ? err.message : String(err)}`);
20
+ throw err;
21
+ }
22
+ const all = parsed.map((row) => ({
13
23
  issue_type: row["Issue type"],
14
24
  component: row["Component"],
15
25
  issue_description: row["Issue description"],
@@ -30,11 +30,11 @@ export function getNodejsAppInstructions(testingFramework) {
30
30
  npx nightwatch <path to tests> --env browserstack.ios
31
31
  \`\`\``);
32
32
  case AppSDKSupportedTestingFrameworkEnum.jest:
33
- return createStep("Run your Jest test suite with BrowserStack SDK:", `Use the npm script defined in your package.json. For example:\n\n\`\`\`bash\nnpx run browserstack-node-sdk jest specs/single_test.js\n\`\`\``);
33
+ return createStep("Run your Jest test suite with BrowserStack SDK:", `Use the npm script defined in your package.json. For example:\n\n\`\`\`bash\nnpx browserstack-node-sdk jest specs/single_test.js\n\`\`\``);
34
34
  case AppSDKSupportedTestingFrameworkEnum.mocha:
35
- return createStep("Run your Mocha test suite with BrowserStack SDK:", `Use the npm script defined in your package.json. For example:\n\n\`\`\`bash\nnpx run browserstack-node-sdk mocha specs/single_test.js\n\`\`\``);
35
+ return createStep("Run your Mocha test suite with BrowserStack SDK:", `Use the npm script defined in your package.json. For example:\n\n\`\`\`bash\nnpx browserstack-node-sdk mocha specs/single_test.js\n\`\`\``);
36
36
  case AppSDKSupportedTestingFrameworkEnum.cucumberJs:
37
- return createStep("Run your Cucumber JS test suite with BrowserStack SDK:", `Use the npm script defined in your package.json. For example:\n\n\`\`\`bash\nnpx run browserstack-node-sdk cucumber-js specs/single_test.js\n\`\`\``);
37
+ return createStep("Run your Cucumber JS test suite with BrowserStack SDK:", `Use the npm script defined in your package.json. For example:\n\n\`\`\`bash\nnpx browserstack-node-sdk cucumber-js specs/single_test.js\n\`\`\``);
38
38
  default:
39
39
  return "";
40
40
  }
@@ -18,7 +18,7 @@ npm i -D browserstack-node-sdk@latest
18
18
  ---STEP---
19
19
  Run the following command to setup browserstack sdk:
20
20
  \`\`\`bash
21
- npx setup --username ${username} --key ${accessKey}
21
+ npx browserstack-node-sdk setup --username ${username} --key ${accessKey}
22
22
  \`\`\``;
23
23
  // Template for Gradle setup instructions (platform-independent)
24
24
  const GRADLE_SETUP_INSTRUCTIONS = `
@@ -4,7 +4,7 @@ export declare const pythonPytestPlaywrightInstructions = "\nInstall Percy Autom
4
4
  export declare const jsCypressPercyAutomateInstructions = "\nInstall Percy Automate dependencies\n - Install Percy CLI:\n npm install --save-dev @percy/cli\n - Install Percy Cypress SDK:\n npm install --save-dev @percy/cypress\n\n---STEP---\nUpdate your Cypress test script\n\nInvoke listTestFiles() with the provided directories from user to gather all test files in memory ---STEP---\nProcess files in STRICT sequential order using tool addPercySnapshotCommands() with below instructions:\n- Start with index 0\n- Then index 1 \n- Then index 2\n- Continue sequentially until the last index\n- DO NOT skip any index numbers\n- DO NOT jump to random indices like 10, 20, 30\n- DO NOT worry about time consuming and any constraints.\n- DO NOT STOP until you add commands in all the files or you reach end of the files.\n\n - Import and initialize Percy in your cypress/support/index.js:\n import '@percy/cypress';\n - In your test, take snapshots at key points:\n cy.percySnapshot('Your snapshot name');\n\nExample:\n```javascript\ndescribe('Percy Automate Cypress Example', () => {\n it('should take Percy snapshots', () => {\n cy.visit('http://localhost:8000');\n cy.percySnapshot('Home page');\n // ... more test steps ...\n cy.percySnapshot('After login');\n });\n});\n``` \n\n---STEP---\nTo run the Percy build, call the tool runPercyScan with the appropriate test command (e.g., 'npx percy exec -- cypress run').\n\n---STEP---\nReview the snapshots\n - Go to your Percy project on https://percy.io to review snapshots and approve/reject any visual changes.\n\n";
5
5
  export declare const mochaPercyAutomateInstructions = "\nInstall Percy Automate dependencies\n - Install Percy CLI:\n npm install --save @percy/cli\n - Install Percy Selenium SDK:\n npm install @percy/selenium-webdriver@2.0.1\n\n---STEP---\nUpdate your Mocha Automate test script\n - Import the Percy screenshot helper:\n const { percyScreenshot } = require('@percy/selenium-webdriver');\n - Use the Percy screenshot command to take required screenshots in your Automate session:\n await percyScreenshot(driver, 'Screenshot 1');\n options = { percyCSS: 'h1{color:red;}' };\n await percyScreenshot(driver, 'Screenshot 2', options);\n\n---STEP---\nTo run the Percy build, call the tool runPercyScan with the appropriate test command (e.g., 'npx percy exec -- mocha').\n\n---STEP---\nReview the snapshots\n - Go to your Percy project on https://percy.io to review snapshots and approve/reject any visual changes.\n\n";
6
6
  export declare const mochaPercyPlaywrightInstructions = "\nInstall Percy Automate dependencies\n - Install the latest Percy CLI:\n npm install --save @percy/cli\n - Install the Percy Playwright SDK:\n npm install @percy/playwright\n\n---STEP---\nUpdate your Mocha Playwright test script\n - Import the Percy screenshot helper:\n const { percyScreenshot } = require(\"@percy/playwright\");\n - Use the Percy screenshot command to take required screenshots in your Automate session.\n\nExample:\n```javascript\nconst { percyScreenshot } = require(\"@percy/playwright\");\nawait percyScreenshot(page, \"Screenshot 1\");\n// With options\nawait percyScreenshot(page, \"Screenshot 2\", { percyCSS: \"h1{color:green;}\" });\n```\n\n---STEP---\nTo run the Percy build, call the tool runPercyScan with the appropriate test command (e.g., 'npx percy exec -- <command to run the tests>').\n\n---STEP---\nReview the snapshots\n - Go to your Percy project on https://percy.io to review snapshots and approve/reject any visual changes.\n\n";
7
- export declare const jestPercyAutomateInstructions = "\nInstall or upgrade the BrowserStack SDK:\n - Install the SDK:\n npm i -D browserstack-node-sdk@latest\n - Run the setup:\n npx setup --username \"YOUR_USERNAME\" --key \"YOUR_ACCESS_KEY\"\n\n---STEP---\nManually capture screenshots:\n 1. Import the BrowserStack Percy SDK in your test script:\n const { percy } = require('browserstack-node-sdk');\n 2. Use `percy.screenshot(driver, name)` at desired points in your test.\n\nExample:\n```javascript\nconst { percy } = require('browserstack-node-sdk');\ndescribe(\"JestJS test\", () => {\n let driver;\n const caps = require(\"../\" + conf_file).capabilities;\n\n beforeAll(() => {\n driver = new Builder()\n .usingServer(\"http://example-servername/hub\")\n .withCapabilities(caps)\n .build();\n });\n\n test(\"my test\", async () => {\n // ...\n await percy.screenshot(driver, \"My Screenshot\");\n // ...\n });\n});\n```\n\n---STEP---\nTo run the Percy build, call the tool runPercyScan with the appropriate test command (e.g., 'npm run [your-test-script-name]-browserstack').\n\n---STEP---\nReview the snapshots\n - Go to your Percy project on https://percy.io to review snapshots and approve/reject any visual changes.\n\n";
7
+ export declare const jestPercyAutomateInstructions = "\nInstall or upgrade the BrowserStack SDK:\n - Install the SDK:\n npm i -D browserstack-node-sdk@latest\n - Run the setup:\n npx browserstack-node-sdk setup --username \"YOUR_USERNAME\" --key \"YOUR_ACCESS_KEY\"\n\n---STEP---\nManually capture screenshots:\n 1. Import the BrowserStack Percy SDK in your test script:\n const { percy } = require('browserstack-node-sdk');\n 2. Use `percy.screenshot(driver, name)` at desired points in your test.\n\nExample:\n```javascript\nconst { percy } = require('browserstack-node-sdk');\ndescribe(\"JestJS test\", () => {\n let driver;\n const caps = require(\"../\" + conf_file).capabilities;\n\n beforeAll(() => {\n driver = new Builder()\n .usingServer(\"http://example-servername/hub\")\n .withCapabilities(caps)\n .build();\n });\n\n test(\"my test\", async () => {\n // ...\n await percy.screenshot(driver, \"My Screenshot\");\n // ...\n });\n});\n```\n\n---STEP---\nTo run the Percy build, call the tool runPercyScan with the appropriate test command (e.g., 'npm run [your-test-script-name]-browserstack').\n\n---STEP---\nReview the snapshots\n - Go to your Percy project on https://percy.io to review snapshots and approve/reject any visual changes.\n\n";
8
8
  export declare const webdriverioPercyAutomateInstructions = "\nInstall or upgrade BrowserStack SDK\n - Install the BrowserStack SDK:\n npm i -D @wdio/browserstack-service\n\n---STEP---\nUpdate your WebdriverIO config file\n 1. Set `percy: true`\n 2. Set a `projectName`\n 3. Set `percyCaptureMode: auto` (or another mode as needed)\n\nExample WebdriverIO config:\n```js\nexports.config = {\n user: process.env.BROWSERSTACK_USERNAME || 'YOUR_USERNAME',\n key: process.env.BROWSERSTACK_ACCESS_KEY || 'YOUR_ACCESS_KEY',\n hostname: 'hub.browserstack.com',\n services: [\n [\n 'browserstack',\n { browserstackLocal: true, opts: { forcelocal: false }, percy: true, percyCaptureMode: 'auto' }\n ],\n ],\n // add path to the test file\n}\n```\n\n---STEP---\n(Optional) Manually capture screenshots\n 1. Import the BrowserStack Percy SDK in your test script:\n const { percy } = require('browserstack-node-sdk');\n 2. Add the `await percy.screenshot(driver, name)` method at required points in your test script.\n\nExample:\n```javascript\n const { percy } = require('browserstack-node-sdk');\n 2. Add the `await percy.screenshot(driver, name)` method at required points in your test script.\n\nExample:\n```javascript\nconst { percy } = require('browserstack-node-sdk');\ndescribe(\"WebdriverIO Test\", () => {\n it(\"my test\", async () => {\n // ....\n await percy.screenshot(driver, \"My Screenshot\")\n // ....\n });\n});\n```\n\n---STEP---\nTo run the Percy build, call the tool runPercyScan with the appropriate test command as defined in your package.json file.\n\n---STEP---\nReview the snapshots\n - Go to your Percy project on https://percy.io to review snapshots and approve/reject any visual changes.\n\n";
9
9
  export declare const testcafePercyAutomateInstructions = "\nInstall Percy dependencies\n - Install the required dependencies:\n npm install --save-dev @percy/cli @percy/testcafe\n\n---STEP---\nUpdate your test script\n\nInvoke listTestFiles() with the provided directories from user to gather all test files in memory ---STEP---\nProcess files in STRICT sequential order using tool addPercySnapshotCommands() with below instructions:\n- Start with index 0\n- Then index 1 \n- Then index 2\n- Continue sequentially until the last index\n- DO NOT skip any index numbers\n- DO NOT jump to random indices like 10, 20, 30\n- DO NOT worry about time consuming and any constraints.\n- DO NOT STOP until you add commands in all the files or you reach end of the files.\n\n - Import the Percy library and use the percySnapshot function to take screenshots.\n\nExample:\n```javascript\nimport percySnapshot from '@percy/testcafe';\nfixture('MyFixture')\n .page('https://devexpress.github.io/testcafe/example/');\ntest('Test1', async t => {\n await t.typeText('#developer-name', 'John Doe');\n await percySnapshot(t, 'TestCafe Example');\n});\n```\n\n---STEP---\nTo run the Percy build, call the tool runPercyScan with the appropriate test command (e.g., 'npx percy exec -- testcafe chrome:headless tests').\n\n---STEP---\nReview the snapshots\n - Go to your Percy project on https://percy.io to review snapshots and approve/reject any visual changes.\n\n";
10
10
  export declare const javaPlaywrightJunitInstructions = "\nInstall Percy Automate dependencies\n - Install the latest Percy CLI:\n npm install --save @percy/cli\n - Add the Percy Playwright Java SDK to your pom.xml:\n```xml\n<dependency>\n <groupId>io.percy</groupId>\n <artifactId>percy-playwright-java</artifactId>\n <version>1.0.0</version>\n</dependency>\n```\n\n---STEP---\nUpdate your Automate test script\n - Import the Percy library:\n import io.percy.playwright.Percy;\n - Use the Percy screenshot command to take required screenshots in your Automate session.\n\nExample:\n```java\nPercy percy = new Percy(page);\npercy.screenshot(\"screenshot_1\");\n// With options\npercy.screenshot(\"screenshot_2\", options);\n```\n\n---STEP---\nTo run the Percy build, call the tool runPercyScan with the appropriate test command (e.g., 'npx percy exec -- <command to run the automate script file>').\n\n\n---STEP---\nReview the snapshots\n - Go to your Percy project on https://percy.io to review snapshots and approve/reject any visual changes.\n\n";
@@ -161,7 +161,7 @@ Install or upgrade the BrowserStack SDK:
161
161
  - Install the SDK:
162
162
  npm i -D browserstack-node-sdk@latest
163
163
  - Run the setup:
164
- npx setup --username "YOUR_USERNAME" --key "YOUR_ACCESS_KEY"
164
+ npx browserstack-node-sdk setup --username "YOUR_USERNAME" --key "YOUR_ACCESS_KEY"
165
165
 
166
166
  ---STEP---
167
167
  Manually capture screenshots:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browserstack/mcp-server",
3
- "version": "1.2.27",
3
+ "version": "1.2.29-beta.1",
4
4
  "description": "BrowserStack's Official MCP Server",
5
5
  "mcpName": "io.github.browserstack/mcp-server",
6
6
  "main": "dist/index.js",