- 拓展/: MCP配置向导、PowerShell工具、mcp-auto-loader 纳入版本管理 - guide.html: badges 从模糊 "90+" 改为精确 "92 Skills | 18 Agents | 34 Hooks"
61 lines
2.1 KiB
Bash
61 lines
2.1 KiB
Bash
#!/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..."
|