# An MCP server for your local dev servers Source: https://portlivo.com/features/mcp · Updated 2026-11-04 An agent that starts a dev server should be able to find it and stop it again, without guessing PIDs from lsof output. **In short:** Run `claude mcp add portlivo -- /usr/local/bin/portlivo mcp` once. The agent then gets three tools: **list_servers**, **stop_server** and **restart_server**. It sees each server’s port, project, branch and uptime, and servers whose folder is gone are marked as leftovers. ## Set it up 1. Install portlivo: in **Settings**, press **Copy Install Command** and paste it into Terminal. See [the CLI](https://portlivo.com/features/cli). 2. Add the server to your agent (below). 3. Ask the agent something like “which dev servers are running?” or “stop whatever is on 3000”. Claude Code: ``` claude mcp add portlivo -- /usr/local/bin/portlivo mcp ``` Cursor, in `~/.cursor/mcp.json`: ``` { "mcpServers": { "portlivo": { "command": "/usr/local/bin/portlivo", "args": ["mcp"] } } } ``` > Use the full path: agents often start with a shorter PATH than your shell. ## The tools | Tool | Does | | --- | --- | | `list_servers` | Each server’s port, PID, project, git branch, uptime, folder and command. Servers whose project folder is gone are marked as leftovers. `all: true` adds system processes | | `stop_server` | Stops what listens on a port, with SIGTERM | | `restart_server` | Stops a project’s server and starts it again with its exact command and environment. Its output then goes to a log file, and the reply says where | ## What it won’t do - Docker containers and Homebrew or launchd services aren’t stopped or restarted: killing their process would just bring them back. The reply gives the right command, such as `brew services stop redis`, so the agent can ask you. - It never force-kills, and it only reaches processes your user account owns. - Everything stays on your Mac: the server talks to the agent over stdin and stdout, with no network port of its own. ## Questions people ask **Does it need the Portlivo app running?** No. The agent starts `portlivo mcp` itself. It needs a license or an active trial, like the app. **Which agents does it work with?** Any that support MCP servers over stdio, including Claude Code, Cursor and Claude Desktop. **How is this different from the agent running lsof and kill?** It gets the project, branch and leftover status in one call instead of parsing `lsof`, and it can’t stop Docker or a Homebrew service by mistake. See also [AI agent servers](https://portlivo.com/features/ai-agents).