See what's on your ports, the processes behind them, and diagnose conflicts and leaks.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
One-click editor setup isnโt available for this listing yet โ we donโt have a confirmed install command, and weโd rather show nothing than point your editor at the wrong package or host. Follow the projectโs own setup instructions, linked above.
portview lists ports and the processes using them on Linux, macOS, and Windows. It shows process names, commands, memory usage, and uptime. You can inspect a port, stop its process, or monitor changes in an interactive terminal UI.
It also supports Docker, remote hosts over SSH, and an MCP server for coding agents.
Homebrew:
Linux / macOS:
Windows (PowerShell):
Or use cargo install portview, or download a binary from
Releases.
--all includes non-listening connections, with one row per connection.
--wide shows full commands. --json produces JSON output for scripts.
Ports whose owner can't be resolved are still listed, with - in the columns that can't be filled. That happens for another user's process without sudo, and for sockets like TIME_WAIT that outlive the process that opened them.
The scan, doctor, and MCP examples below are real output, captured by
demo/record.shinside an isolated namespace โ which is why the user isrootand the paths are/opt/app. The Docker example is illustrative, since it needs a running daemon.
portview mcp provides port queries, diagnostics, and process termination over
the Model Context Protocol using stdio.
To register it with Claude Code:
Or configure it manually:
| Tool | What it does |
|---|---|
list_ports | List listening ports with available process details |
inspect_port | Inspect a port, including process working directories and descendants |
find_process | Find ports by process name or command substring |
doctor | Check for conflicts, wildcard exposure, connection buildup, and high memory usage |
diff_ports | Report ports that opened, closed, or changed owner since a baseline |
kill_port | Terminate processes using a port; dry_run previews the targets. Marked destructive to the client |
The MCP server is included in the portview binary. Pass --read-only to disable
the kill_port tool:
Listed in the MCP Registry as
mcp-name: io.github.Mapika/portview.
| Key | Action |
|---|---|
j/k, โ/โ | Navigate rows |
Enter | Inspect port (full command, cwd, children, connections) |
d/D | Kill process or manage Docker container |
/ | Filter across all columns |
โ/โ, r | Cycle sort column, reverse direction |
t | Toggle process tree view |
a | Toggle all/listening-only |
q | Quit |
Tree view (t): Groups child processes under their parents.
Detail view (Enter): Shows the full unwrapped command, working directory, child process list with ports, and open connections (in --all mode).
portview doctor checks for port conflicts, wildcard bindings, connection
buildup, and high memory usage:
| Check | Flags |
|---|---|
| Port conflicts | Multiple PIDs bound to the same port |
| Wildcard exposure | Databases (postgres, redis, mysql, mongod, โฆ) listening on 0.0.0.0 |
| Docker-host conflicts | A container publishing a port the host already uses |
| Connection buildup | High counts of TIME_WAIT or CLOSE_WAIT connections on one port; these do not by themselves establish a leak |
| High memory usage | Listening processes using more than 1 GB of resident memory |
Docker is auto-detected. portview doctor --json for scripting (exit code 1 on errors).
The GitHub Action runs doctor and can fail a workflow on errors or warnings:
It annotates each finding inline on the run, writes a summary table, and exposes
findings (JSON), count, errors, and warnings as step outputs:
Set install: false if portview is already on PATH. Linux and macOS runners.
Inspect ports on a remote host over SSH:
Kill actions in the remote TUI are forwarded over SSH.
If portview is not installed on the remote host, SSH mode collects data using
ss and ps, or lsof and ps where ss is unavailable. This requires a
POSIX shell and the collection tools on the remote host.
Use --agentless to collect data this way even when portview is installed on
the remote host. It supports scans, port inspection, process search,
diagnostics, and watch mode.
Run diagnostics on the collected data:
This uses the same diagnostic checks as local mode. The Docker check is skipped because agentless mode does not query remote containers.
Watch remote ports, with process termination available in the TUI:
Watch mode collects updates through a single persistent SSH connection.
Use --docker to include ports published by Docker containers:
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/portview)<a href="https://allmcps.com/mcp/portview"><img src="https://allmcps.com/api/badge/portview?style=directory" alt="Portview on AllMCPs" /></a>