# Run Web UI Server for Graphiti MCP
Write-Host "========================================" -ForegroundColor Cyan
Write-Host "Graphiti MCP - Web UI Server" -ForegroundColor Cyan
Write-Host "========================================" -ForegroundColor Cyan
Write-Host ""
# Check if .env file exists
if (-not (Test-Path ".env")) {
Write-Host "Error: .env file not found!" -ForegroundColor Red
Write-Host "Please create a .env file with your configuration." -ForegroundColor Yellow
Write-Host "See env.example for reference." -ForegroundColor Yellow
exit 1
}
# Try port 8081 first, fallback to 8082 if needed
$port = 8081
if ($args.Count -gt 0) {
$port = [int]$args[0]
}
Write-Host "Starting Web UI Server on http://localhost:$port" -ForegroundColor Green
Write-Host "Open your browser and navigate to: http://localhost:$port" -ForegroundColor Green
Write-Host ""
Write-Host "Press Ctrl+C to stop the server" -ForegroundColor Yellow
Write-Host ""
# Run the web UI server
python web_ui_server.py $port