# MCP Server Startup Script with Port Cleanup
Write-Host "============================================" -ForegroundColor Cyan
Write-Host "MCP SERVER STARTUP" -ForegroundColor Yellow
Write-Host "============================================" -ForegroundColor Cyan
Write-Host "`nStep 1: Checking for existing processes on port 8000..." -ForegroundColor Green
# Get processes using port 8000
$processes = Get-NetTCPConnection -LocalPort 8000 -ErrorAction SilentlyContinue
if ($processes) {
Write-Host "Found processes using port 8000. Cleaning up..." -ForegroundColor Yellow
foreach ($proc in $processes) {
$pid = $proc.OwningProcess
Write-Host "Killing process $pid" -ForegroundColor Red
try {
Stop-Process -Id $pid -Force -ErrorAction SilentlyContinue
}
catch {
Write-Host "Could not kill process $pid" -ForegroundColor Red
}
}
Write-Host "Waiting for port to be released..." -ForegroundColor Yellow
Start-Sleep -Seconds 2
} else {
Write-Host "Port 8000 is free!" -ForegroundColor Green
}
Write-Host "`nStep 2: Starting MCP server on port 8000..." -ForegroundColor Green
Set-Location -Path $PSScriptRoot
# Start the server
python mcp_server_hybrid.py --http 8000
Write-Host "`nServer stopped." -ForegroundColor Yellow
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MelaLitho/MCPServer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server