11 lines
427 B
PowerShell
11 lines
427 B
PowerShell
$connections = Get-NetTCPConnection -LocalPort 3100 -State Listen -ErrorAction SilentlyContinue
|
|
if (-not $connections) {
|
|
Write-Output "AI MCP service is not running."
|
|
exit 1
|
|
}
|
|
|
|
$connections | ForEach-Object {
|
|
$process = Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
|
|
Write-Output ("AI MCP service is running. PID={0}, Process={1}, URL=http://127.0.0.1:3100" -f $_.OwningProcess, $process.ProcessName)
|
|
}
|