You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-1Lines changed: 57 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,11 @@ A lightweight MCP (Model Context Protocol) server that exposes Linux system metr
4
4
5
5
## Features
6
6
7
-
-**12 MCP Tools**: System info, CPU, memory, disk, disk I/O, network, network connections, processes, thermal, Docker, system health, and service status
7
+
-**19 MCP Tools**: System info, CPU, memory, disk, disk I/O, network, network connections, processes, thermal, Docker, system health, service status, plus monitoring and alerting tools
8
+
-**MCP Resources**: Subscribable `sys://metrics/*` resources for proactive state reads
9
+
-**MCP Prompts**: `analyze_system_health` and `diagnose_performance_issue` prompt templates
10
+
-**Streaming Metrics**: Delta-based throughput sampling (network bytes/s, disk IOPS/bytes/s) and history
11
+
-**Threshold Alerting**: Background monitoring that generates warning/critical alerts on resource saturation
8
12
-**Configurable**: CLI arguments for temperature units, process limits, mount points, and interfaces
9
13
-**Cross-Platform**: Works on any Linux system (enhanced metrics for Raspberry Pi)
10
14
-**AI-Ready**: Designed for integration with Claude Desktop, Cursor, or any MCP client
@@ -74,6 +78,7 @@ Add to your agent's configuration file:
74
78
|`--mount-points`|`""`| Comma-separated mount points (empty = all) |
75
79
|`--interfaces`|`""`| Comma-separated interfaces (empty = all, excludes `lo`) |
76
80
|`--enable-gpu`|`true`| Attempt to read GPU metrics (Raspberry Pi only) |
81
+
|`--monitor-interval`|`5`| Default sampling interval in seconds for monitoring (1-60) |
77
82
78
83
## MCP Tools
79
84
@@ -143,6 +148,54 @@ Returns systemd service health information via `systemctl show`.
143
148
**Required Arguments:**
144
149
-`services`: Comma-separated list of service names to check
145
150
151
+
### `start_monitoring`
152
+
Starts background sampling of system metrics. Once running, the server retains a history buffer and evaluates resource thresholds to generate alerts.
153
+
154
+
**Optional Arguments:**
155
+
-`interval`: Sampling interval in seconds (defaults to `--monitor-interval`)
156
+
157
+
### `stop_monitoring`
158
+
Stops background sampling.
159
+
160
+
### `get_monitoring_status`
161
+
Returns whether monitoring is running, the aggregate health status, and the latest snapshot.
162
+
163
+
### `get_metrics_history`
164
+
Returns recent metric snapshots captured by the monitor.
165
+
166
+
**Optional Arguments:**
167
+
-`seconds`: Only return snapshots captured within the last N seconds
168
+
169
+
### `get_alerts`
170
+
Returns threshold alerts generated since the last read (read-then-drain).
171
+
172
+
**Optional Arguments:**
173
+
-`severity`: Filter by `warning` or `critical`
174
+
175
+
### `get_network_throughput`
176
+
Returns per-interface network throughput rates (bytes/sec) since the last sample.
177
+
178
+
### `get_disk_throughput`
179
+
Returns per-device disk I/O throughput rates (bytes/sec and IOPS) since the last sample.
180
+
181
+
## MCP Resources
182
+
183
+
The server exposes subscribable resources under the `sys://metrics/*` namespace so clients can read current state without issuing a tool call:
184
+
185
+
| URI | Description |
186
+
|-----|-------------|
187
+
|`sys://metrics/overview`| Aggregated health dashboard |
188
+
|`sys://metrics/cpu`| CPU model, cores, temperature |
189
+
|`sys://metrics/memory`| RAM usage |
190
+
|`sys://metrics/disk`| Disk usage across mount points |
0 commit comments