local-vitals-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@local-vitals-mcp My dev server is stuck on port 3000, free it and restart"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
local-vitals-mcp
Hardware and environment guardrail MCP server for AI coding agents (Cursor, Claude Code, Cline) to prevent runaway local resource exhaustion, locked ports, and zombie background processes.
β‘ Why local-vitals-mcp?
When AI coding agents execute builds, spin up background headless browsers, run large test suites, or spawn local LLM workers, they often run into local host bottlenecks:
Port Collisions (
EADDRINUSE): A previous server didn't shut down, causing dev server commands to fail in endless loops.Zombie Background Processes: Stale headless Playwright/Puppeteer browsers and dangling test workers eat gigabytes of RAM.
Hardware Exhaustion: Spawning heavy tasks when RAM > 85% or CPU > 90% locks the user's host machine.
VRAM OOM Errors: Loading local embeddings or vision models without checking available GPU VRAM causes hard CUDA crashes.
local-vitals-mcp gives the agent autonomous awareness of host hardware constraints and the tools to safely resolve them.
Related MCP server: open-monitor
π Quick Setup
1. Cursor IDE (.cursor/mcp.json)
Add the following block to your project's .cursor/mcp.json or global Cursor settings:
{
"mcpServers": {
"local-vitals": {
"command": "npx",
"args": ["-y", "local-vitals-mcp"]
}
}
}2. Claude Desktop (claude_desktop_config.json)
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"local-vitals": {
"command": "npx",
"args": ["-y", "local-vitals-mcp"]
}
}
}3. Cline (VS Code Extension)
In Cline Settings > MCP Servers, add:
Server Name:
local-vitalsCommand:
npxArgs:
["-y", "local-vitals-mcp"]
π οΈ Implemented MCP Tools
Tool | Parameters | Description |
| None | Returns real-time RAM usage, CPU load percentage, thermals, and guardrail warnings (>85% RAM, >90% CPU). |
| None | Queries GPU health, VRAM allocation (total/used/free), and utilization via |
|
| Identifies which PID, process name, and command line is binding a specific port across Windows, macOS, and Linux. |
|
| Terminates the process and its full process tree occupying that port to instantly fix |
|
| Detects and cleans orphaned background processes (e.g. stale headless Playwright/Chrome browsers, zombie test workers, dead parent Node daemons). |
π¬ Natural Prompt Triggers for Agents
Here are examples of how your AI coding agent uses these tools automatically:
"My dev server failed with
Error: listen EADDRINUSE: address already in use :::3000. Please free the port and restart."
π Agent callskill_port_process(3000)and re-runsnpm run dev."Before we start running this test suite, check if the machine has enough free memory and CPU headroom."
π Agent callsget_system_vitalsto verify threshold parameters."Do I have enough free VRAM to run a local 7B quantization model?"
π Agent callsget_gpu_vramand inspectsfreeVramMB."My computer feels slow after running multiple test runs. Clean up any leftover browser sessions."
π Agent callsclean_orphan_processes(dryRun: false).
π‘οΈ Built-in Safety Guardrails
Stdio Protocol Isolation: All debug and informational logs are strictly routed to
stderr.stdoutis exclusively reserved for JSON-RPC messages to guarantee zero transport corruption.Protected System PIDs: Refuses to kill system kernel processes (
PID <= 4, Windows System/Idle, Unix init/launchd).Self-Preservation: Prevents suicide termination if the target PID is the MCP server process itself or its parent runner.
Graceful Fallbacks: If
nvidia-smior sensors are unavailable, tools return structured diagnostic JSON without crashing the server.
π» Development & Local Testing
# Clone repository
git clone https://github.com/Optimus-Prime-Blip/local-vitals-mcp.git
cd local-vitals-mcp
# Install dependencies
npm install
# Compile TypeScript
npm run build
# Run MCP server locally over stdio
npm startπ License
MIT Β© Arnav Yadav
Available Tools
5 toolsclean_orphan_processesB
Scans and cleans orphaned/zombie background processes commonly abandoned by AI agents (e.g. headless Playwright/Chrome instances, zombie test workers, orphaned Vite/Node daemons).
Inputs: dryRun.
get_gpu_vramA
Checks GPU health, total/used/free VRAM allocation, and utilization. Parses nvidia-smi with graceful fallback for Apple Silicon / integrated display controllers. Use before starting local LLM/CUDA workloads.
Inputs: no named parameters.
get_system_vitalsA
Returns available system RAM, CPU load percentage, thermals (if accessible), and threshold guardrails (>85% RAM, >90% CPU warnings). Use before launching heavy compilation or container builds.
Inputs: no named parameters.
inspect_portA
Finds which process PID, process name, and command line is binding a specified TCP port across Windows, macOS, and Linux. Essential for diagnosing EADDRINUSE conflicts.
Inputs: port (required).
kill_port_processA
Terminates the process currently occupying a specific TCP port to resolve EADDRINUSE errors without manual hunting. Terminate whole process tree on Windows/Linux.
Inputs: port (required), force.
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: inspecting a port, killing a port's owner, sweeping orphaned processes, reading system vitals, and reading GPU/VRAM stats. The only potential overlap is between kill_port_process and clean_orphan_processes, but one is port-targeted and the other is orphan-scan-based, and the descriptions make that boundary explicit.
All five names are snake_case with a leading verb (kill_, clean_, get_, get_, inspect_) and a clear object. The pattern is predictable and readable throughout, with no mixed conventions.
Five tools is a tight, well-scoped surface for a local dev-ops diagnostics server; every tool maps to a real workflow (diagnose conflict, resolve conflict, clean up, pre-flight resource check). Nothing feels redundant or missing at the count level.
The core lifecycle for port conflicts and resource pre-flight checks is fully covered, including cleanup and GPU/CPU/RAM visibility. Minor gaps remain, such as disk space or a general process-list/inspect-by-name operation, which would round out the 'vitals' promise but are workable around.
Related MCP Connectors
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Hosted MCP with 91 agent tools: X, domains, SEO, Maps, Trends, Search, YouTube, TikTok, and more.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA real-time system diagnostics MCP server that gives AI agents live access to CPU, RAM, disk, network, processes, and hardware health metrics, with zero cloud dependency.7Apache 2.0
- AlicenseNot gradedqualityFmaintenanceMulti-machine system monitor with a built-in MCP server that enables AI agents to query health metrics, manage processes, schedule cron jobs, and run diagnostics across local and remote machines.133 npmApache 2.0
- FlicenseNot gradedqualityDmaintenanceMonitors host CPU/RAM, local ports, and Docker containers, streaming live telemetry to a React dashboard over SSE. Exposes MCP tools to query system status, read environment logs, and execute remediation fixes via a local LLM agent.-
- AlicenseAqualityDmaintenanceProvides read-only access to host system metrics (CPU, memory, disk), Docker container health/logs, and sandboxed log file analysis via MCP tools, enabling AI agents to monitor enterprise infrastructure safely.3MIT