Files
mcp-proc/scripts/setup.sh
2025-10-11 03:22:03 +02:00

47 líneas
1.0 KiB
Bash
Archivo Ejecutable

#!/bin/bash
set -e
echo "🚀 Setting up MCP ProcFS Server..."
# Check Node.js version
NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
if [ "$NODE_VERSION" -lt 18 ]; then
echo "❌ Node.js 18 or higher is required"
exit 1
fi
echo "✓ Node.js version check passed"
# Install dependencies
echo "📦 Installing dependencies..."
npm install
# Build the project
echo "🔨 Building TypeScript..."
npm run build
# Check if running on Linux
if [ "$(uname)" != "Linux" ]; then
echo "⚠️ Warning: This server is designed for Linux systems"
echo " Some features may not work on $(uname)"
fi
# Check permissions
if [ ! -r /proc/cpuinfo ]; then
echo "❌ Cannot read /proc filesystem"
exit 1
fi
echo "✓ /proc filesystem accessible"
echo ""
echo "✅ Setup complete!"
echo ""
echo "To start the server:"
echo " npm start # JSON-RPC server (stdio)"
echo " npm run start:sse # HTTP server with SSE"
echo ""
echo "For development:"
echo " npm run dev # Watch mode"
echo ""