PortReaper by Amit Gal

Free and open source macOS 12 or later · Apple Silicon and Intel

PortReaper: see what is on every port of your Mac, and free it in one keystroke

~/shop-api $ npm run dev

Error: listen EADDRINUSE: address already in use :::3000

You know the ritual: lsof, squint at a PID, kill -9 and hope. PortReaper shows the project and git branch behind every port on your Mac, finds the processes your AI agents left running, and stops them in one keystroke.

PortReaper's ⌘⇧K strip: type 3000, press Return, and the port is freed; npm run dev then starts on 3000.
EADDRINUSE, ⌘⇧K, type 3000, Enter. The dev server starts.

Why lsof is not enough once AI agents share your terminal

Several Claude Code sessions, often on different git worktrees of the same project, each start their own helpers: MCP servers, a Playwright browser, Vitest workers, esbuild, rust-analyzer, and the dev servers. Sessions get stuck, terminals get closed, and the helpers stay behind. macOS re-parents them to launchd (PID 1), and they just sit there.

Many of them hold no port: MCP servers talk over stdio, so lsof -i never shows them. And when there is a port, the PID tells you nothing. Three worktrees of the same app all run node, on 3000, 3001 and 5173. Which one is the stale one?

Every port on your Mac, with the project and branch behind it

PortReaper's window: listening ports grouped by project and git branch, each with its status, memory and a Kill button.
Ports grouped by project and branch. Zombies and protected processes are marked; the drawer shows the process tree.

How PortReaper compares to lsof, Activity Monitor, kill-port and LeftOpen

What you want to knowPortReaperlsof -i + killActivity Monitorkill-portLeftOpen
The project and git branch behind a portProject and branchNoNoNoProject, not the branch
Leftovers that hold no port (stdio MCP servers, headless Chrome, test workers)YesNoListed as processes, with no hintNoNo (TCP listeners only)
brew services and launchd jobs that come back after a killAsks first, offers the stop commandNoNoNoWarns, suggests brew services stop
One global shortcut to free the port in your way⌘⇧KNoNoNoNo
DockerNames the container and stops itNoNoNoLabels Docker's listeners
UDPYesYesn/aYesNo (TCP only)
A command-line toolNo (planned)YesNoYesYes (leftopen)
Price and licenseFree, MITBuilt inBuilt inFree, MIT (needs Node.js)Free, MIT

Compared on 17 November 2026 with LeftOpen v0.5.8, from its README and source. LeftOpen also does things PortReaper does not, such as fixed *.localhost URLs and starting a project that is not running. Corrections welcome: open an issue.

Questions about PortReaper

How do I see what’s using port 3000 on a Mac?

In the terminal, lsof -nP -iTCP:3000 -sTCP:LISTEN shows the PID listening on the port, and kill <pid> stops it. PortReaper shows the same thing with the project and git branch next to it, and frees the port with ⌘⇧K.

Why are node processes still running after I close Claude Code?

When the terminal or agent session that started a helper (an MCP server, a test runner, a dev server) goes away, macOS re-parents the helper to launchd, PID 1, and it keeps running. ps -axo pid,ppid,rss,command lists them with their parent PID; PortReaper flags the ones it recognizes as zombies and shows the RAM each one holds.

Is PortReaper free?

Yes. It’s open source under the MIT license, with no account and no analytics.

Download PortReaper for macOS

With Homebrew:

brew install --cask amitgal45/tap/portreaper

It opens the latest release: pick the .dmg file.

One universal app for Apple Silicon and Intel, macOS 12 or later, signed with a Developer ID and notarized by Apple. No account, no analytics and no sudo: the only network request is the update check, and updates are signed. Free, MIT licensed.