Skip to main content
Glama
johannschiffer

SysFlow MCP

README.md
# SysFlow MCP (Lite Edition)

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Python 3.10+](https://img.shields.io/badge/Python-3.10+-brightgreen.svg)](https://python.org)
[![MCP Compliant](https://img.shields.io/badge/MCP-2024--11--05-purple.svg)](https://modelcontextprotocol.io)

**SysFlow MCP** is a lightweight, zero-overhead Model Context Protocol server that gives AI agents in **Claude Desktop**, **Cursor**, **Windsurf**, and **Antigravity** safe, structured access to Linux sysadmin inspection, log tailing, and service health without granting unrestricted root shells or risking interactive terminal freezes.

---

## šŸ–„ļø Why SysFlow MCP?

Giving an AI assistant raw terminal execution often ends in frustration:
1. **Interactive Terminal Freezes:** Commands like `journalctl`, `systemctl status`, or `git log` default to interactive pagers (`less`), leaving the AI agent permanently hung waiting for user input.
2. **Context Window Flooding:** Tailing an unconstrained `/var/log/nginx/access.log` dumps thousands of lines into the LLM prompt, wasting tokens and causing memory errors.
3. **Destructive Shell Commands:** Without sandboxing, a hallucinated command can kill critical background daemons or delete workspace assets.

**SysFlow** exposes safe, bounded, non-blocking tools specifically tailored for autonomous developer agents.

---

## ⚔ Features (Lite Edition)

- šŸ“Š **Resource Healthcheck**: Reports CPU core load averages (1m, 5m, 15m), RAM availability (MB and percentage), and disk partition metrics.
- šŸ“œ **Safe Log Tailer**: Reads the last N lines (bounded and memory-safe) with optional regex filtering; automatically rejects binary files.
- āš™ļø **Systemd User Service Inspector**: Lists user-level services and timers (`systemctl --user`), highlighting failed units without requiring `sudo`.
- 🪶 **Zero External Dependencies**: Operates strictly on Python standard library and Linux `/proc` filesystem.

---

## šŸš€ Quick Setup in 2 Minutes

### 1. Installation

```bash
git clone https://github.com/johannschiffer/sysflow-mcp.git
cd sysflow-mcp
pip install .
```

### 2. Configure Claude Desktop (`claude_desktop_config.json`)

On Linux: `~/.config/Claude/claude_desktop_config.json`  
On macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`  
On Windows: `%APPDATA%\Claude\claude_desktop_config.json`

```json
{
  "mcpServers": {
    "sysflow": {
      "command": "python",
      "args": ["-m", "sysflow.server"],
      "cwd": "/path/to/sysflow-mcp"
    }
  }
}
```

### 3. Verify via CLI

```bash
python -m sysflow.cli resources
```

---

## šŸ› ļø MCP Tools Exposed to AI Agents

| Tool | Parameters | Description |
|---|---|---|
| `check_system_resources` | *(none)* | Returns CPU load, memory usage, and partition disk metrics |
| `tail_logs` | `filepath`, `lines`, `pattern` | Safely tails recent log lines with optional regex filter |
| `inspect_systemd_services` | `failed_only` | Lists user-level services, states, and detects failed daemons |
| `inspect_systemd_timers` | *(none)* | Lists scheduled systemd user timers |

---

## šŸ’Ž Need Enterprise Build Sandboxing? Upgrade to SysFlow Pro

Looking to automate shell task execution, manage Docker containers, or generate verified systemd units?

| Feature | Lite (Open Source) | Pro ($14.99 USD) |
|---|:---:|:---:|
| **CPU, RAM & Disk Monitoring** | āœ… | āœ… |
| **Safe Bounded Log Tailer** | āœ… | āœ… |
| **Systemd User Service Auditing** | āœ… | āœ… |
| **Sandboxed Task Runner with Timeouts** *(Anti-freeze)* | āŒ | āœ… |
| **Docker Container Health & Log Inspector** | āŒ | āœ… |
| **Verified Systemd Unit File Generator** | āŒ | āœ… |
| **Listening Socket & Port Conflict Auditor** | āŒ | āœ… |
| **Production Docker Container** | āŒ | āœ… |
| **Full Pytest Suite & Sysadmin Automation Guide** | āŒ | āœ… |

šŸ‘‰ **[Get SysFlow Pro on Gumroad ($14.99)](https://johanld.gumroad.com/l/sysflow-mcp-pro)**

---

## šŸ“„ License

MIT License. See [LICENSE](LICENSE) for details.

TDQS

A3.8/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a clearly distinct area: system resources, log tailing, systemd services, and systemd timers. The service and timer tools are related but their descriptions make the boundary explicit.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern: check_system_resources, tail_logs, inspect_systemd_services, inspect_systemd_timers. There are no mixed conventions or vague standalone verbs.

Tool Count4/5

Four tools are focused and each has a clear purpose, but the set is somewhat thin for a general system diagnostics server. Additional common operations could reasonably be expected.

Completeness4/5

Core diagnostic areas are covered: resources, logs, services, and timers. Minor gaps exist around process listing, network status, or journal-specific queries, but agents can work around them with the provided tools.

Maintenance

ActivityMaintained
ResponsivenessNo issues