
Localhost Mcp
@HasanJahidul
About Localhost Mcp
MCP server: inspect, manage, kill local dev servers. Stop guessing what's on :3000.
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"localhost": {
"command": "npx",
"args": [
"-y",
"localhost-mcp"
]
}
}
}Tools
5All listening dev servers w/ port, pid, framework, project, uptime, mem, cpu
Inspect single port — who holds it
Kill by pid or port. Dry-run by default; pass `confirm=true` to execute
Detect long-running, idle, memory-heavy dev servers
Why is port X busy + 5 free alternatives nearby
Overview
What is Localhost Mcp?
Localhost Mcp is an MCP server that inspects, manages, and kills local development servers. It resolves port conflicts, finds zombie processes, and provides detailed information about running dev servers, making it a companion for any AI agent that manages a local development environment.
How to use Localhost Mcp?
Install globally with npm install -g localhost-mcp, then wire into Claude Code with claude mcp add --scope user localhost -- localhost-mcp or any MCP-compatible client. The server operates as a stdio MCP server. CLI usage includes localhost-mcp list (list dev servers), localhost-mcp zombies (find zombie candidates), and plain localhost-mcp to start the stdio server.
Key features of Localhost Mcp
- Lists all listening dev servers with port, PID, framework, project, uptime, memory, CPU
- Inspects a single port to identify the holding process
- Kills servers by PID or port, with dry‑run mode by default
- Detects zombie dev servers (long‑running, idle, memory‑heavy)
- Identifies port conflicts and suggests five free nearby ports
- Refuses to kill system processes (PIDs < 1000) and non‑whitelisted executables
Use cases of Localhost Mcp
- Quickly identify what is holding a port (e.g.,
EADDRINUSEon:3000) - Clean up forgotten
node/vite/nextprocesses consuming RAM between projects - Programmatically free a port for a new dev server via AI agent
- Monitor dev server health across projects during long development sessions
FAQ from Localhost Mcp
What platforms does Localhost Mcp support?
macOS and Linux have full support (using lsof and /proc). Windows support is basic (port scan only via netstat; cwd and framework detection are limited).
Is it safe to kill servers with Localhost Mcp?
Yes. The kill_server tool defaults to dry‑run; you must pass confirm=true to execute. It refuses to kill PIDs < 1000 (system processes) and only targets whitelisted executables (node, python, ruby, go, deno, bun, etc.). It sends SIGTERM first and escalates to SIGKILL after a 5‑second timeout.
How do I install and configure Localhost Mcp?
Install globally via npm: npm install -g localhost-mcp. Then add it to your MCP client (e.g., for Claude Code: claude mcp add --scope user localhost -- localhost-mcp). The server runs as a stdio MCP process.
Which frameworks does Localhost Mcp detect?
It detects next.js, vite, nuxt, remix, astro, webpack-dev-server, esbuild, create-react-app, express, fastify, koa, hono, rails, django, flask, fastapi, uvicorn, gunicorn, deno, bun, php-builtin, jekyll, and hugo. It falls back to package.json sniffing when the command line is generic (e.g., node server.js).
More Other MCP servers
Servers
modelcontextprotocolModel Context Protocol Servers
Inbox Zero AI
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
Awesome-MCP-ZH
yzflyMCP 资源精选, MCP指南,Claude MCP,MCP Servers, MCP Clients
Reactive Resume
amruthpillaiA one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
Comments