SysBot
A production-ready system monitoring app built on MCP Server — real-time CPU, memory, disk, network, and service metrics with anomaly detection, RBAC, and a live Streamlit dashboard.
Overview
SysBot is a system monitoring application built on the MCP Server framework. It continuously polls CPU, memory, disk, network, and service metrics via psutil, persists history to SQLite, and exposes everything through three interfaces simultaneously: the MCP stdio protocol, a FastAPI REST API with 15+ endpoints, and a Streamlit live dashboard. An alerting engine evaluates configurable thresholds and detects anomalies using rolling standard deviation, with optional multi-host monitoring over SSH.
Key Features
- 8 auto-discovered MCP tools: cpu_monitor, memory_monitor, disk_monitor, network_monitor, service_monitor, system_summary, trend_analysis, alert_manager
- Statistical anomaly detection via rolling standard deviation with configurable multiplier
- FastAPI REST API with role-based access control (viewer / operator / admin) and per-client sliding-window rate limiting
SysBotDispatcherusing regex keyword routing so natural language queries like “What is the CPU usage?” resolve to the correct tool- Multi-host SSH metric collection via
paramikofor fleet-wide monitoring - 43 tests across three phases: monitors + alerting (15), disk/network/trends/poller (10), API/RBAC/rate limiting (18)
Technical Decisions
SysBot subclasses the MCP Dispatcher and overrides only _analyze_request() with regex routing, keeping the full tool-loading and protocol infrastructure intact without forking the core. The monitoring layer uses pure functions returning structured dicts, with a @cached decorator (TTL per metric type) to avoid redundant psutil calls during high-concurrency API requests. Alert history is stored via the cache-manager wheel rather than directly in SQLite, making the alerting engine testable without a database.