port-sentry
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@port-sentryfind me 3 free ports between 3000 and 4000"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
port-sentry
An MCP server that gives AI coding agents superpowers over network ports — find free ports, identify port hogs, and kill zombie processes without ever leaving the chat.
🎯 Why?
AI coding agents constantly try to start dev servers on ports that are already in use, leading to cascading failures and wasted tokens. While tools like lsof and netstat exist for humans, there is no MCP server that gives agents structured, actionable port intelligence — forcing them to parse raw shell output or guess random port numbers.
Target audience: Developers using AI coding agents (Claude Code, Cursor, Codex, Copilot) who frequently run dev servers, databases, and microservices locally and are tired of 'port already in use' errors derailing their agent workflows.
Related MCP server: local-agent-context
✨ Features
✨ List all ports currently in use with owning process name, PID, and command line
✨ Find the next N available ports within a specified range
✨ Check if a specific port is available or occupied
✨ Kill the process occupying a specific port (with safety confirmations)
✨ Wait/poll for a port to become free with configurable timeout
🚀 Quick Start
# Install
pip install port-sentry
# Run
port-sentry --help📦 Installation
From Source
git clone https://github.com/YOUR_USERNAME/port-sentry.git
cd port-sentry# Create virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest -v🎬 Demo
The GIF above was recorded using Charm VHS:
vhs < demo.tape📖 Usage
# Show help
port-sentry --help
# Common usage examples
port-sentry --example🏗️ Architecture
graph LR
A[Input] --> B[Core Engine]
B --> C[Output]
B --> D[Plugins]
D --> E[Extensions]🤝 Contributing
Contributions are welcome! Please:
Fork the repo
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
📄 License
MIT © 2026 — See LICENSE for details.
If this project helped you, please ⭐ star it!
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Official MCP server for Agentwork — delegate tasks to AI agents with human-in-the-loop
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseAqualityAmaintenanceLocal-first MCP server that gives any AI coding agent per-project memory, workflow intelligence, and always-on, lossless token & context optimization.37184MIT
- AlicenseNot gradedqualityDmaintenanceA local MCP server that gives AI coding agents persistent memory and context across sessions.13MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that gives your AI assistant full awareness of your local dev environment — running processes, Docker containers, git state, open ports, log files, and more.01MIT
- AlicenseNot gradedqualityCmaintenanceA free, open-source MCP server that gives AI agents real filesystem, terminal, git, and process control over your machine for inspection, diagnosis, and repair.MIT