45 lines
1.2 KiB
Markdown
45 lines
1.2 KiB
Markdown
# procleaning-mcp
|
|
|
|
Python MCP Server for process monitoring and cleaning.
|
|
|
|
## Features
|
|
|
|
- **List Processes** - Query running processes with flexible filtering
|
|
- **Kill Process** - Terminate processes by PID with SIGTERM or SIGKILL
|
|
- **Kill by Name** - Batch kill processes matching a name pattern
|
|
- **System Resource Usage** - Get CPU, memory, disk, and load average overview
|
|
- **Find Zombies** - Detect zombie processes
|
|
- **Restart Service** - Restart systemd services
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
uv sync
|
|
```
|
|
|
|
## Usage (as MCP Server)
|
|
|
|
```bash
|
|
uv run procleaning-mcp
|
|
```
|
|
|
|
Or use with Hermes Agent by adding to `~/.hermes/config.yaml`:
|
|
|
|
```yaml
|
|
mcp_servers:
|
|
procleaning:
|
|
command: "uv"
|
|
args: ["run", "--directory", "/home/tony/procleaning-mcp", "procleaning-mcp"]
|
|
```
|
|
|
|
## Tools
|
|
|
|
| Tool | Description |
|
|
|------|-------------|
|
|
| `list_processes` | List processes with filters (name, user, CPU%, MEM%, RSS) |
|
|
| `kill_process` | Kill a specific process by PID |
|
|
| `kill_by_name` | Kill all processes matching a name pattern |
|
|
| `system_resource_usage` | System-wide resource usage overview |
|
|
| `find_zombies` | Find zombie processes |
|
|
| `restart_service` | Restart a systemd service |
|