SurriyaGokul/SysMCP
If you are the rightful owner of SysMCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
SysMCP is a Model Context Protocol (MCP) server designed to facilitate secure and efficient interaction between AI assistants and local system resources.
π§ SysMCP - AI-Powered System Dashboard
A FastMCP-based server that exposes local system telemetry and safe process management to AI assistants
Features β’ Installation β’ Usage β’ Tools β’ Safety
π Overview
SysMCP is a Model Context Protocol (MCP) server that bridges the gap between AI assistants and your local system. It allows AI models like Claude to safely monitor system resources, inspect running processes, and perform controlled process managementβall through a secure, rate-limited interface.
Why SysMCP?
- π Real-time System Monitoring: CPU, memory, disk, and network stats at your AI's fingertips
- π‘οΈ Security First: Built-in allowlists, rate limiting, and dry-run modes
- π€ AI-Native: Designed specifically for LLM integration via MCP protocol
- π Zero Configuration: Works out of the box with Claude Desktop, Cursor IDE, and custom clients
- π Process Intelligence: List, filter, and safely manage system processes
β¨ Features
π System Telemetry (Read-Only)
- CPU Monitoring: Overall and per-core utilization
- Memory Stats: Total, used, and percentage metrics
- Disk Usage: Per-partition storage information
- Network I/O: Bytes sent and received tracking
βοΈ Process Management (Controlled)
- Smart Process Listing: Filter by name, user, or sort by CPU/memory
- Safe Termination: Multi-layer safety checks before killing processes
- Dry-Run Mode: Preview actions without execution
- Rate Limiting: Prevents accidental mass terminations
π Safety Features
- β Process allowlist enforcement
- β Configurable rate limits (default: 2 kills/minute)
- β Explicit confirmation requirements
- β Dry-run preview mode
- β Graceful error handling
π Installation
Prerequisites
- Python 3.10+
- WSL/Linux/macOS (for system access)
- Claude Desktop or any MCP-compatible client
Quick Start
# Clone the repository
git clone https://github.com/yourusername/SysMCP.git
cd SysMCP/SysMCP
# Create virtual environment
python3 -m venv mcp_env
source mcp_env/bin/activate # On Windows: mcp_env\Scripts\activate
# Install dependencies
pip install fastmcp psutil
# Test the server
python -m server.main
π§ Configuration
Environment Variables
Create a .env
file or set these in your shell:
PROCESS_KILL_ALLOWLIST="python,node,chrome,code,bash"
PROCESS_KILL_RATE_LIMIT_PER_MIN=2
SUMMARY_TOP_N=3
Claude Desktop Integration
Add to your Claude Desktop config file:
Location:
- Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
Configuration:
{
"mcpServers": {
"sysdash": {
"command": "python",
"args": ["-m", "server.main"],
"cwd": "/path/to/SysMCP/SysMCP",
"env": {
"PROCESS_KILL_ALLOWLIST": "python,node,chrome,code",
"PROCESS_KILL_RATE_LIMIT_PER_MIN": "2",
"SUMMARY_TOP_N": "3"
}
}
}
}
For WSL Users:
{
"mcpServers": {
"sysdash": {
"command": "wsl",
"args": [
"bash",
"-c",
"cd /path/to/SysMCP/SysMCP && source mcp_env/bin/activate && python -m server.main"
],
"env": {
"PROCESS_KILL_ALLOWLIST": "python,node,chrome,code"
}
}
}
}
π οΈ Available Tools
1οΈβ£ system_get_cpu
Get current CPU usage statistics
Returns:
{
"overall": 23.5,
"per_core": [21.0, 26.0, 22.0, 25.0]
}
2οΈβ£ system_get_memory
Get memory usage information
Returns:
{
"total": 17179869184,
"used": 8589934592,
"percent": 50.0
}
3οΈβ£ system_get_disk
Get disk usage per partition
Returns:
[
{
"mount": "/",
"total": 500107862016,
"used": 250053931008,
"percent": 50.0
}
]
4οΈβ£ system_get_network
Get network I/O statistics
Returns:
{
"bytes_sent": 1073741824,
"bytes_recv": 2147483648
}
5οΈβ£ list_processes
List running processes with filtering
Parameters:
sort_by
:"cpu"
|"memory"
|"pid"
|"name"
(default:"cpu"
)limit
: Max number of results (default:10
)name_contains
: Filter by process name (optional)user
: Filter by username (optional)
Example:
{
"sort_by": "cpu",
"limit": 5,
"name_contains": "python"
}
Returns:
[
{
"pid": 1234,
"name": "python3",
"username": "user",
"cpu_percent": 25.5,
"memory_percent": 2.1,
"memory_mb": 512.5,
"cmdline": "python3 script.py"
}
]
6οΈβ£ kill_process
Safely terminate a process
Parameters:
pid
: Process ID to terminate (required)confirm
: Must betrue
to proceed (default:false
)unsafe
: Allow non-allowlisted processes (default:false
)dry_run
: Preview without killing (default:false
)
Safety Rules:
- β οΈ Requires
confirm=true
for all kills - β οΈ Non-allowlisted processes need
confirm=true
ANDunsafe=true
- β οΈ Rate limited to 2 kills per minute
Example:
{
"pid": 1234,
"confirm": true,
"dry_run": true
}
Returns:
{
"success": true,
"message": "[DRY RUN] Would kill process 1234 (python3)"
}
7οΈβ£ get_summary
Get aggregated system statistics over time
Parameters:
window_s
: Sampling window in seconds (default:5
, range: 1-60)top_n
: Number of top processes (default:3
, range: 1-10)
Returns:
{
"avg_cpu_percent": 24.3,
"mem_percent": 51.2,
"top_processes": [
{
"pid": 1234,
"name": "chrome",
"cpu_percent": 45.2
}
],
"high_usage_disks": []
}
π¬ Usage Examples
Once configured with Claude Desktop, you can ask:
π€ "What's my current CPU usage?"
π€ Uses system_get_cpu to show real-time stats
π€ "Show me the top 5 processes by memory"
π€ Uses list_processes with sort_by="memory", limit=5
π€ "Give me a 10-second system summary"
π€ Uses get_summary with window_s=10
π€ "Kill process 1234 in dry-run mode"
π€ Uses kill_process with dry_run=true to preview
π€ "List all Python processes"
π€ Uses list_processes with name_contains="python"
ποΈ Project Structure
SysMCP/
βββ server/
β βββ main.py # FastMCP entry point & tool registration
β βββ system_tools.py # System telemetry functions
β βββ process_tools.py # Process management functions
β βββ security.py # Rate limiter & safety checks
β βββ config.py # Configuration management
β βββ schema.py # Pydantic data models
βββ tests/
β βββ test_system_tools.py
β βββ test_process_tools.py
βββ mcp_env/ # Virtual environment
βββ pyproject.toml # Project metadata
βββ README.md
π§ͺ Testing
# Run tests
pytest tests/
# Test individual tool
python -m server.main
# In another terminal:
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | python -m server.main
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
π License
This project is licensed under the MIT License - see the file for details.
π Acknowledgments
- Built with FastMCP by Marvin
- Uses psutil for system monitoring
- Inspired by the Model Context Protocol
π§ Contact
Your Name - @yourtwitter - your.email@example.com
Project Link: https://github.com/yourusername/SysMCP
β Star this repo if you find it useful!
Made with β€οΈ for the MCP community