mcp-server icon indicating copy to clipboard operation
mcp-server copied to clipboard

Handle BrowserStack MCP metadata flags

Open wowsofine opened this issue 5 months ago • 0 comments

Summary

  • handle --version/-v and --help/-h before credential validation
  • keep metadata flags usable without BROWSERSTACK_USERNAME or BROWSERSTACK_ACCESS_KEY
  • add a Vitest coverage path for the no-credential metadata flags

Reproduction

npm exec --yes --package=@browserstack/[email protected] -- browserstack-mcp-server --version currently prints a BROWSERSTACK_USERNAME environment variable error instead of version metadata. The same credential check also blocks --help.

Validation

  • Red test first: new metadata tests failed because stdout was empty and credential validation ran first
  • npx vitest run tests/cli-metadata.test.ts
  • npm test (22 files, 184 tests)
  • npm run lint
  • npx tsc --noEmit
  • npm run build
  • local npm pack + npm exec --package=<tarball> -- browserstack-mcp-server --version prints 1.2.21
  • local npm pack + npm exec --package=<tarball> -- browserstack-mcp-server --help
  • git diff --check

wowsofine avatar Jun 08 '26 05:06 wowsofine