MCP.so
登录

Localhost Mcp

@HasanJahidul

关于 Localhost Mcp

MCP server: inspect, manage, kill local dev servers. Stop guessing what's on :3000.

基本信息

分类

其他

许可证

MIT

运行时

node

传输方式

stdio

发布者

HasanJahidul

提交者

Jahidul Hasan

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "localhost": {
      "command": "npx",
      "args": [
        "-y",
        "localhost-mcp"
      ]
    }
  }
}

工具

5

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 `confirm=true` to execute

Detect long-running, idle, memory-heavy dev servers

Why is port X busy + 5 free alternatives nearby

概览

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., EADDRINUSE on :3000)
  • Clean up forgotten node/vite/next processes 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).

评论

其他 分类下的更多 MCP 服务器