Monitor Remote Linux Server Health via SSH
MCP server for real-time CPU, memory, disk, network, and security monitoring on remote Linux servers over SSH.
1.0.0Add to Favorites
Why it matters
Gain real-time insights into the health and performance of your remote Linux servers. This asset collects comprehensive metrics including CPU, memory, disk, network, and security statistics, enabling proactive issue detection and system optimization.
Outcomes
What it gets done
Collect detailed CPU, memory, and disk usage metrics.
Monitor network interface statistics and security-related events.
Retrieve process lists and system alerts based on predefined thresholds.
Facilitate secure SSH connections for remote server monitoring.
Source
Get it from source
Spark does not host a copy of it.
Open sourceReports
Agent outcome reports
No reports yet
Capabilities
Tools your agent gets
General system health status information
Detailed CPU metrics
Memory and swap usage statistics
Disk usage for all or specific mount points
Network interface statistics
Security-related metrics
List of processes consuming the most CPU
Current alerts based on threshold violations
Comprehensive system health status summary
Overview
System Health MCP Server
System Health MCP Server connects to remote Linux servers over SSH and exposes real-time CPU, memory, disk, network, and security metrics as MCP tools. It includes built-in threshold-based alerts for resource and security conditions, plus SSH connection pooling for repeated checks across multiple servers. Use it when you manage remote Linux servers and want Claude to check resource usage or security alerts without a manual SSH session. It only supports Linux hosts, stores no historical metrics, and has no proactive notification system.
What it does
System Health MCP Server is an MCP server that gives Claude and other MCP-compatible AI assistants real-time health and performance monitoring for remote Linux servers over SSH. It connects to one or more servers and collects CPU, memory, disk, network, and security metrics, exposing them as MCP tools so an assistant can check status, spot bottlenecks, or review security-relevant activity conversationally instead of logging into each server by hand.
When to use - and when NOT to
Use it when you manage one or more remote Linux servers and want Claude to check CPU, memory, disk, or network load, list the top CPU-consuming processes, or flag threshold-based alerts such as a nearly full disk or failed login attempts, without opening a manual SSH session each time. It supports multiple servers from a single MCP instance and pools SSH connections for reuse across checks. It only supports Linux-based servers (no Windows), stores no historical metrics since everything is real-time only, so it cannot answer questions about what happened earlier, and it has no built-in notification or paging system - alerts surface only when a tool is called, never pushed proactively.
Capabilities
system_status,health_summary: overall system status and a comprehensive health summary.cpu_metrics,memory_metrics,disk_metrics,network_metrics: detailed CPU, memory/swap, disk (all mount points or a specific one), and network interface statistics.security_metrics: failed login attempts, suspicious processes, and pending security updates.process_list: the top CPU-consuming processes.system_alerts: current alerts against built-in thresholds - CPU (warning at 80%+ usage, critical at 90%+, plus load-average and I/O-wait checks), memory (warning at 85%+, critical at 95%+, plus swap and low-free-memory checks), disk (warning at 85%+, critical at 95%+, plus inode usage and disk I/O utilization), and security (more than 10 failed logins, more than 5 pending security updates flagged critical, a host unpatched for 30+ days, or suspicious processes detected).- SSH connection pooling, so repeated checks against the same server reuse an existing connection instead of reconnecting each time.
How to install
git clone https://github.com/yourusername/mcp-system-health.git
cd mcp-system-health
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Requires Python 3.10+, the MCP Python SDK, and SSH access to each target server. Each server is configured with a hostname, IP, SSH port, username, and either a password or an SSH key path - key-based authentication is the documented preference over passwords. Configuration can be written to a file per server or generated on the fly via the included CLI launcher's --username, --key-path/--password, --servers, and --log-level flags. Add the launcher command to Claude's MCP settings and restart the client to pick it up; the server can also be imported and started directly as a Python library.
It is released under the MIT license.
Who it's for
Sysadmins and DevOps engineers who want to ask Claude about the health, resource usage, or security posture of their remote Linux fleet and get an answer without opening a terminal, while keeping SSH credentials scoped to a dedicated, limited-permission monitoring account on a secure host.
Source README
MCP System Health Monitoring
A robust server monitoring system built on the Multi-Channel Protocol (MCP) framework, designed for seamless integration with Claude and other AI assistants.
Overview
MCP System Health Monitoring provides real-time health and performance metrics for remote Linux servers. It establishes SSH connections to collect system metrics including CPU usage, memory utilization, disk space, network statistics, security metrics, and more.
Features
- Comprehensive Metrics Collection: CPU, memory, disk, network, security metrics, and more
- Real-time Monitoring: Live system status checks and performance insights
- Multi-Server Support: Monitor multiple servers from a single MCP instance
- Threshold-based Alerts: Automatic detection of critical system conditions
- SSH Connection Management: Efficient connection pooling and reuse
- Security-focused: Monitor for failed login attempts, suspicious processes, and security updates
- MCP Integration: Ready for AI assistant interaction via the MCP protocol
Requirements
- Python 3.10+
- MCP Python SDK
- SSH access to target servers
Installation
Clone the repository:
git clone https://github.com/yourusername/mcp-system-health.git cd mcp-system-healthCreate a virtual environment:
python -m venv venvActivate the virtual environment
- On macOS/Linux:
source venv/bin/activate - On Windows:
venv\Scripts\activate
- On macOS/Linux:
Install dependencies:
pip install -r requirements.txt
Configuration
Create a configuration file for each server you want to monitor:
{
"hostname": "server1",
"ip": "192.168.1.100",
"ssh_port": 22,
"username": "admin",
"key_path": "~/.ssh/id_rsa"
}
Alternatively, you can use the command-line launcher to dynamically create configurations.
Usage
Using the Launcher
./mcp_launcher.py --username=admin --key-path=~/.ssh/id_rsa --servers=192.168.1.100,192.168.1.101
Command-line Options
--username: SSH username (required)--password: SSH password (either this or key-path required)--key-path: Path to SSH private key (either this or password required)--ssh-port: SSH port (default: 22)--servers: Comma-separated list of server IPs (required)--repository: Path to existing server repository--log-level: Logging level (debug, info, warning, error)
Integration with MCP Clients
To use the MCP System Health server with MCP clients like Claude, you'll need to add the server configuration to your client's MCP settings.
Claude Integration
Add this configuration to Claude's MCP settings and restart for changes to take effect:
You can use either password or key_path
{
"mcpServers": {
"system-health": {
"command": "/path/to/your/venv/bin/python3",
"args": [
"/path/to/your/system-health-mcp-server/src/mcp_launcher.py",
"--username=your_ssh_username",
"--password=your_ssh_password",
"--key-path=~/.ssh/id_rsa",
"--servers=server1.example.com,server2.example.com",
"--log-level=debug"
],
"description": "System Health MCP Server for monitoring remote servers"
}
}
}
#Using as a Library
#Configure your servers, you can use either password or key_path
from src.server import serve
server_configs = [
{
"hostname": "server1",
"ip": "192.168.1.100",
"ssh_port": 22,
"username": "admin",
"password": "password",
"key_path": "~/.ssh/id_rsa"
}
]
#Start the MCP server
await serve(server_configs)
Available Tools
The MCP server exposes the following tools:
- system_status: General system status information
- cpu_metrics: Detailed CPU metrics
- memory_metrics: Memory usage and swap statistics
- disk_metrics: Disk usage for all or specific mount points
- network_metrics: Network interface statistics
- security_metrics: Security-related metrics
- process_list: List of top CPU-consuming processes
- system_alerts: Current alerts based on threshold violations
- health_summary: Comprehensive health summary
Alert Thresholds
The system provides automatic alerts based on these default thresholds:
CPU:
- Critical: Usage ≥ 90%
- Warning: Usage ≥ 80%
- Warning: Load average > 1.5 × core count
- Warning: I/O wait > 20%
Memory:
- Critical: Usage ≥ 95%
- Warning: Usage ≥ 85%
- Warning: Swap usage ≥ 80%
- Warning: Free memory < 1GB (on systems with ≥ 2GB)
Disk:
- Critical: Usage ≥ 95%
- Warning: Usage ≥ 85%
- Warning: Free space < 1GB (on disks ≥ 10GB)
- Warning: Inode usage ≥ 90%
- Warning: Disk I/O utilization > 80%
Security:
- Warning: Failed logins > 10
- Critical: Security updates > 5
- Warning: Security updates ≥ 1
- Warning: System not updated for ≥ 30 days
- Critical: Suspicious processes detected
- Warning: Unusual ports open
Security Considerations
- Prefer key-based authentication over password authentication
- Use dedicated monitoring accounts with limited permissions
- Store SSH credentials securely
- Run the MCP server on a secure, trusted host
Limitations
- Currently only supports Linux-based servers
- No historical data storage (metrics are real-time only)
- No notification system for alerts (alerts are only available via tool calls)
- Limited customization of alert thresholds
Troubleshooting
- Ensure SSH credentials are correct
- Check that target servers allow SSH connections
- Verify that the user has sufficient permissions to execute system commands
- Enable debug logging for more detailed output
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.