browser-tools-mcp
browser-tools-mcp copied to clipboard
fix: handle CLI metadata flags before discovery
Summary
- handle
--version/-vbefore creating the MCP server or probing the browser tools server - handle
--help/-hwith a short usage message before startup discovery - reuse a single
SERVER_VERSIONconstant for the MCP server metadata and CLI output
Verification
npm run buildnode dist/mcp-server.js --versionnode dist/mcp-server.js -vnode dist/mcp-server.js --helpnode 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.