Skip to content

mcp

portcheck mcp

Serve portcheck to AI assistants (Model Context Protocol)

Synopsis

Run portcheck as an MCP server on stdin/stdout, so AI coding assistants (Claude Code, Cursor, VS Code Copilot, Windsurf, ...) can check which process holds a port, find a free port, wait for a server, and stop a process when a dev server fails with "address already in use".

Tools: list_ports, check_port, find_free_port, wait_for_port, stop_process. stop_process has the same safety guards as 'portcheck kill': it never stops system processes or the assistant itself, and assistants ask before using it.

Add it to your assistant (see the MCP guide for others): claude mcp add portcheck -- portcheck mcp

portcheck mcp [flags]

Examples

  claude mcp add portcheck -- portcheck mcp
  code --add-mcp '{"name":"portcheck","command":"portcheck","args":["mcp"]}'

Options

  -h, --help   help for mcp

Options inherited from parent commands

      --json                shorthand for --output json
      --log-format string   log format: text or json (default "text")
      --no-color            disable colors (also honors NO_COLOR)
  -o, --output string       output format: table, plain, csv, json (default: table on a terminal, plain otherwise)
  -v, --verbose             log diagnostic details to stderr

SEE ALSO

  • portcheck - See what's using your ports, find free ones, and free them up