localhost-mcp
Detects and provides information about Astro dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about Bun dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about Deno dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about Django dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about esbuild dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about Express dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about FastAPI dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about Fastify dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about Flask dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about Gunicorn dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about Hono dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about Hugo dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about Jekyll dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about Koa dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about Next.js dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about Nuxt dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about PHP dev servers (e.g., php-builtin), including port, PID, memory usage, and allows killing them.
Detects and provides information about Python dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about React dev servers (e.g., create-react-app), including port, PID, memory usage, and allows killing them.
Detects and provides information about Remix dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about Ruby dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about Vite dev servers, including port, PID, memory usage, and allows killing them.
Detects and provides information about webpack-dev-server instances, including port, PID, memory usage, and allows killing them.
localhost-mcp
MCP server that inspects, manages, and kills local dev servers. Stop guessing what's on :3000.

Pairs with terminal-history-mcp — together they give your AI agent full memory of your dev environment: what you ran, what's running.
Why
Every dev hits these daily:
Error: listen EADDRINUSE :::3000— what's holding the port?5 forgotten
node/vite/nextPIDs from last week eating RAMSwitching projects → no idea which dev servers still running
lsof -i :3000,kill -9 <pid>, repeat
localhost-mcp makes it one tool call.
Related MCP server: Git Insight MCP
Install
npm install -g localhost-mcpWire into Claude Code:
claude mcp add --scope user localhost -- localhost-mcpOr any MCP-compatible client. The command runs as a stdio MCP server.
Tools
Tool | Purpose |
| All 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 |
| Detect long-running, idle, memory-heavy dev servers |
| Why is port X busy + 5 free alternatives nearby |
Sample output
{
"port": 3000,
"pid": 48211,
"process": "node",
"cmdline": "next dev",
"cwd": "/Users/me/code/myapp",
"project_name": "myapp",
"framework": "next.js",
"uptime_seconds": 14523,
"memory_mb": 412,
"cpu_pct": 0.3,
"user": "me"
}Safety
kill_serverdefaults to dry-run. Must passconfirm=true.Refuses to kill PIDs < 1000 (system processes).
Refuses processes outside the dev whitelist (node, python, ruby, go, deno, bun, php, java, rails, vite, next, etc).
SIGTERM first, escalates to SIGKILL after 5s timeout.
Frameworks detected
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, hugo.
Falls back to package.json sniffing when the cmdline is generic (node server.js).
Platform support
macOS — full support (uses
lsof)Linux — full support (uses
lsof+/proc)Windows — basic port scan only (uses
netstat); cwd / framework detection limited
CLI usage
localhost-mcp list # JSON list of all dev servers
localhost-mcp zombies # JSON list of zombie candidates
localhost-mcp # Start MCP stdio serverBuild from source
git clone https://github.com/hasanjahidul/localhost-mcp.git
cd localhost-mcp
npm install
npm run build
node dist/cli.js listLicense
MIT
Available Tools
5 toolsfind_zombiesARead-onlyIdempotent
Read-only. Flags dev servers that look abandoned — all three of: uptime > 6h AND CPU < 1% AND memory > 100MB. By default it excludes known always-on noise (VS Code server, language servers, other MCP servers, postgres/redis, sidekiq, etc.); set include_excluded: true to also list those. Each candidate comes with the reasons it matched. This tool never kills anything — pass results to kill_server. Returns { count, candidates[] }.
Inputs: include_excluded. Returns: count, candidates
kill_serverADestructive
Terminates a local dev server by pid or port. DESTRUCTIVE. Safe by default: with no confirm, this is a DRY RUN — it reports what it would kill and changes nothing. Pass confirm: true to actually terminate: sends SIGTERM, waits up to 5s, then escalates to SIGKILL (or SIGKILL immediately if force: true). Refuses PIDs below 1000 and processes that don't look like dev servers. Provide exactly one of pid or port. Returns what was (or would be) killed and the signal used.
Inputs: pid, port, force, confirm. Returns: pid, port, killed, signal, +3 more
list_dev_serversARead-onlyIdempotent
Read-only. Lists every local development server (next, vite, nuxt, remix, astro, rails, django, flask, express, deno, bun, etc.) currently LISTENING on a TCP port. For each: port, pid, process name, command line, working directory, project name, detected framework, uptime, memory (MB), CPU %, and owning user. Uses lsof on macOS/Linux and netstat on Windows; on Windows the cwd/framework fields are limited. Takes no arguments. Returns { count, servers[] }.
Inputs: no named parameters. Returns: count, servers
port_conflictARead-onlyIdempotent
Read-only. Diagnoses an EADDRINUSE situation: given a port, returns the dev server currently blocking it plus 5 free alternative ports nearby. Use it when a listen EADDRINUSE error fires and you want both the culprit and a port to switch to.
Inputs: port (required). Returns: port, blocked_by, alternatives
port_infoARead-onlyIdempotent
Read-only. Inspects a single TCP port and reports the dev server holding it (same fields as list_dev_servers). If nothing is listening, or the listener is not a recognised dev process, returns { port, status: "free" }. Useful for answering "what's on :3000?" before starting or killing something.
Inputs: port (required). Returns: Either a dev-server record (see list_dev_servers) or `{ port, status: "free" }`.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: listing servers, inspecting a single port, finding zombies, killing servers, and diagnosing port conflicts. There is no functional overlap.
Tool names use snake_case, and most follow a verb_noun pattern (find_zombies, kill_server, list_dev_servers). However, port_conflict and port_info are noun-first, which is a minor inconsistency.
With 5 tools, the set is well-scoped for managing local dev servers: query, inspect, cleanup, and conflict resolution. No tool feels superfluous or missing.
The tools cover listing, inspecting, zombie identification, killing, and conflict diagnosis. There is a minor gap in that bulk operations (e.g., kill all zombies) are not directly supported, but the intended workflow is clear.
Maintenance
Related MCP Connectors
2,000+ MCP servers read at source level. Know what one does before you connect. Free, no key.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Scan any MCP server for tool-poisoning, security, auth & license. Trust score before install.
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
Related MCP Servers
- AlicenseAqualityCmaintenanceDevelopers: Search your zsh, bash, or fish shell history from Claude Code, Cline, Cursor, Zed, or any MCP client using tools like search_history (full-text with timestamp/CWD/exit code), recent_in_dir, failed_commands, and command_chains for multi-step sequences. Reindex after new activity. Local-only SQLite FTS5 with secrets redacted before storage.7149 npm5MIT
- AlicenseAqualityDmaintenanceSemantic git queries via MCP. Beyond git log — answer who/what/why about any line, file, or branch with blame, co-change, PR linkage.613 npm2MIT
- AlicenseNot gradedqualityDmaintenanceSee and control the local dev servers your coding agents leave running. Lists listeners with provenance — which agent, terminal and git worktree started each — kills strays, and allocates collision-free ports so parallel agents stop fighting over :3000.MIT
- AlicenseNot gradedqualityCmaintenanceMCP 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.8 npm1MIT