Skip to main content
Glama
SocketUtils.kt284 B
package maestro.cli.util import java.net.ServerSocket fun getFreePort(): Int { (9999..11000).forEach { port -> try { ServerSocket(port).use { return it.localPort } } catch (ignore: Exception) {} } ServerSocket(0).use { return it.localPort } }

Latest Blog Posts

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/mobile-dev-inc/Maestro'

If you have feedback or need assistance with the MCP directory API, please join our Discord server