#!/bin/bash # MCP Configuration Wizard - Launcher for Unix/Mac echo "" echo "╔════════════════════════════════════════════════════════╗" echo "║ MCP Configuration Wizard - First Time Setup ║" echo "╚════════════════════════════════════════════════════════╝" echo "" # 检查 Node.js if ! command -v node &> /dev/null; then echo "[ERROR] Node.js is not installed!" echo "" echo "Please install Node.js from: https://nodejs.org/" echo "" read -p "Press Enter to exit..." exit 1 fi echo "[OK] Node.js found: $(node --version)" echo "" # 检查依赖 if [ -d "node_modules" ]; then echo "[OK] Dependencies already installed" echo "" else echo "[INFO] Installing dependencies..." echo "This may take a minute..." echo "" npm install if [ $? -ne 0 ]; then echo "" echo "[ERROR] Failed to install dependencies" echo "" read -p "Press Enter to exit..." exit 1 fi echo "" echo "[OK] Dependencies installed successfully" echo "" fi # 运行向导 echo "════════════════════════════════════════════════════════" echo "Starting Configuration Wizard..." echo "════════════════════════════════════════════════════════" echo "" node wizard.js echo "" echo "════════════════════════════════════════════════════════" echo "Wizard completed" echo "════════════════════════════════════════════════════════" echo "" read -p "Press Enter to exit..."