#!/bin/bash
# Chrome DevTools MCP wrapper script
# Ensures correct Node.js version is used

# Load nvm if available
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

# Use Node.js 20.19.0 (or default)
nvm use default 2>/dev/null || nvm use 20.19.0 2>/dev/null || true

# Run chrome-devtools-mcp
exec node "/Users/wwzh/Library/pnpm/global/5/.pnpm/chrome-devtools-mcp@0.10.2/node_modules/chrome-devtools-mcp/build/src/index.js" "$@"

