wharfy
MCP server for managing local dev ports on macOS. It enables AI agents to inspect listening ports, identify owning processes and parent chains, kill processes safely, wait for ports, and report LAN exposure.
README
wharfy
See who is listening on your dev ports — and which app or AI agent started them — then kill them safely. CLI + MCP server. macOS.
$ wharfy list
PORT PID USER PROCESS ← PARENTS
3000 51530 egebilge node ← claude ← zsh ← Terminal
3001 51612 egebilge node ← cursor ← launchd
5432 1201 egebilge docker: papyro-app-db-1
The parent chain answers the question other port killers can't: who opened
this? A port started by Claude Code shows claude in the chain; one started
by Cursor shows cursor.
Install
npm install -g wharfy
CLI
wharfy list # human-readable table
wharfy list --json # machine-readable
wharfy kill 3000 # SIGTERM, then SIGKILL after 2s if it won't die
wharfy kill --all-dev # clear every dev port at once
wharfy kill 3000 --tree # stop the whole npm-run-dev tree, not just the leaf
wharfy wait 3000 # block until the port answers (CI, scripts)
kill exits 1 when nothing listens on the port.
MCP server (for AI agents)
Claude Code:
claude mcp add wharfy -- npx -y wharfy mcp
Cursor — .cursor/mcp.json:
{
"mcpServers": {
"wharfy": { "command": "npx", "args": ["-y", "wharfy", "mcp"] }
}
}
Tools:
list_ports— listening TCP ports with owning process, user, parent chain, project name (read-only)check_port— who owns one portkill_process— stop whatever listens on a port;treeandforceoptions (destructive, annotated as such — your client will confirm)wait_for_port— block until a server answerssuggest_free_port— next free port from a preferred oneexposure_report— which servers are bound to 0.0.0.0 and reachable from your LAN
Menu bar app
A native macOS menu bar companion — port list with real app icons, live CPU/RAM, LAN-exposure warnings, safe tree-kill, Docker awareness: wharfy.dev
Why not kill-port?
kill-port sends kill -9 immediately through a shell pipeline and hasn't
been updated since 2022. wharfy parses lsof -F machine output in-process,
terminates gracefully (SIGTERM → 2s → SIGKILL), validates input, and tells
you who owned the port.
macOS only. MIT.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.