npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

localhost-mcp

v0.1.1

Published

Inspect, manage, and kill local dev servers via MCP. Stop guessing what's on :3000.

Readme

localhost-mcp

MCP server that inspects, manages, and kills local dev servers. Stop guessing what's on :3000.

demo

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 / next PIDs from last week eating RAM
  • Switching projects → no idea which dev servers still running
  • lsof -i :3000, kill -9 <pid>, repeat

localhost-mcp makes it one tool call.

Install

npm install -g localhost-mcp

Wire into Claude Code:

claude mcp add --scope user localhost -- localhost-mcp

Or any MCP-compatible client. The command runs as a stdio MCP server.

Tools

| Tool | Purpose | |------|---------| | list_dev_servers | All listening dev servers w/ port, pid, framework, project, uptime, mem, cpu | | port_info | Inspect single port — who holds it | | kill_server | Kill by pid or port. Dry-run by default; pass confirm=true to execute | | find_zombies | Detect long-running, idle, memory-heavy dev servers | | port_conflict | 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_server defaults to dry-run. Must pass confirm=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 server

Build from source

git clone https://github.com/hasanjahidul/localhost-mcp.git
cd localhost-mcp
npm install
npm run build
node dist/cli.js list

License

MIT