Initial commit: process cleaning MCP server with 6 tools

This commit is contained in:
Tony
2026-05-09 14:04:21 +08:00
commit a9fd8d738d
5 changed files with 1066 additions and 0 deletions

44
README.md Normal file
View File

@@ -0,0 +1,44 @@
# 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 |