portcheck
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
portcheck shows which local process holds a TCP/UDP port and frees it safely. When a dev server, database or test fails with "address already in use" / EADDRINUSE, call check_port with that port to see what holds it (name, PID, who started it), then stop_process if the user wants it stopped, or find_free_port to use another port. wait_for_port waits until a service accepts connections (or a port is free). stop_process never stops system processes or the assistant itself, and can't stop other users' processes without privileges; containers get a stop command instead.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| check_portA | Check whether ports are free. For each port in use, says which process holds it: name, PID, user, command line, who started it, and the container if Docker or Podman publishes it. Use it first when a server fails with "address already in use" or EADDRINUSE. |
| find_free_portA | Find ports that are free right now, verified by binding them, optionally within a range (e.g. 3000-3999). Use it to start a server on another port instead of stopping what holds one. |
| list_portsA | List the ports listening on this machine, with the process, PID, user and who started it (e.g. npm ← zsh), and the container for ports published by Docker or Podman. Use it to see what's running, or to find a dev server by name (name="node*") or port range. |
| stop_processA | Stop the process listening on a port, or a process by PID: asks it to exit, then kills it after 5 s. Refuses system processes and the assistant itself. Ports published by Docker, Podman or WSL report the command to run instead. Use dry_run to see what would be stopped, and check_port first to tell the user what it is. |
| wait_for_portA | Wait until a port accepts connections, e.g. until a server or database has finished starting, or with free=true until a port is free again. Returns as soon as it's ready, or fails after timeout_seconds. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 5 tools
Each tool has a distinct role: check_port checks specific ports and explains holders, list_ports enumerates listening ports, find_free_port locates available ports, stop_process terminates a holder, and wait_for_port blocks until readiness. check_port and list_ports overlap in reporting process details, but their usage guidance (specific ports vs. inventory/search) keeps them separable.
All names are snake_case with a leading action verb: check_port, find_free_port, list_ports, stop_process, wait_for_port. Minor variation in verb phrasing (find_free_port, wait_for_port) is natural and consistent, not mixed conventions.
Five tools is well-scoped for a port diagnostics utility, with each covering a distinct phase: check, discover, inventory, stop, and wait. There are no redundant or filler tools.
The set covers the core lifecycle for port troubleshooting: detect conflicts, identify holders, find free alternatives, stop processes safely, and wait for readiness. No obvious operational gap remains for the stated purpose.