#!/bin/bash
set -e
echo "🚀 Installing mcp-macos-utils..."
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed. Please install Node.js 20+ first."
exit 1
fi
# Check Node.js version
NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
if [ "$NODE_VERSION" -lt 20 ]; then
echo "❌ Node.js version 20+ is required. Current version: $(node -v)"
exit 1
fi
# Install dependencies
echo "📦 Installing dependencies..."
npm install
# Build the project
echo "🔨 Building project..."
npm run build
# Create example config
echo "📝 Creating example configuration..."
cat > example-mcp-config.json << 'EOF'
{
"mcpServers": {
"macos-utils": {
"command": "node",
"args": ["/path/to/mcp-macos-utils/dist/index.js"],
"env": {}
}
}
}
EOF
echo "✅ Installation complete!"
echo ""
echo "To use this MCP server:"
echo "1. Update the path in example-mcp-config.json to point to this directory"
echo "2. Add the configuration to your MCP client's config file"
echo "3. The server will be available with the 'notify' tool"
echo ""
echo "Example usage:"
echo " notify(title: 'Build Complete', message: 'Your project has been built successfully', type: 'success')"