browser-tools-mcp icon indicating copy to clipboard operation
browser-tools-mcp copied to clipboard

fix: handle CLI metadata flags before discovery

Open xianzuyang9-blip opened this issue 5 months ago • 0 comments

Summary

  • handle --version/-v before creating the MCP server or probing the browser tools server
  • handle --help/-h with a short usage message before startup discovery
  • reuse a single SERVER_VERSION constant for the MCP server metadata and CLI output

Verification

  • npm run build
  • node dist/mcp-server.js --version
  • node dist/mcp-server.js -v
  • node dist/mcp-server.js --help
  • node dist/mcp-server.js -h

Before this change, metadata commands still ran the server discovery loop and printed connection probes/errors when no browser tools server was running.

xianzuyang9-blip avatar Jun 08 '26 20:06 xianzuyang9-blip