internetkid2001/totalcontrol
If you are the rightful owner of totalcontrol 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.
The System Control & Automation MCP Server is a comprehensive tool designed to provide AI agents with advanced system control capabilities across multiple operating systems.
System Control & Automation MCP Server
A comprehensive Model Context Protocol (MCP) server that provides AI agents with powerful system control capabilities including keyboard automation, window management, screen capture, system monitoring, and universal application launching for Linux, macOS, and Windows.
๐ Features
โจ๏ธ Keyboard Control
- Type text with configurable speed and intervals
- Press individual keys (Enter, Tab, Escape, etc.)
- Execute keyboard shortcuts (Ctrl+C, Cmd+V, Alt+Tab)
- Hold and release keys for complex key combinations
๐ฅ๏ธ Window Management
- List all open windows with details
- Focus/activate windows by title
- Move windows to specific screen coordinates
- Resize windows to exact dimensions
- Minimize/maximize/restore window states
- Cross-platform window control (Linux, macOS, Windows)
๐ธ Screen Capture
- Take full screen screenshots
- Capture specific regions of the screen
- Save screenshots to files with custom names
- Return screenshots as base64 for processing
- Image recognition capabilities
๐ System Monitoring
- CPU usage statistics (overall and per-core)
- Memory usage information (RAM and swap)
- Disk space details
- Running processes sorted by CPU/memory usage
- Network statistics (bytes sent/received, packets, errors)
- Complete system information (OS, hardware, uptime)
๐ Universal Application Launcher โญ NEW!
- Launch ANY installed application on your system
- Smart application discovery across multiple package managers
- Support for Flatpak, Snap, desktop files, and PATH executables
- List all available applications with filtering by type
- Intelligent launch methods with automatic fallback
- Security safeguards against dangerous commands
๐ง File & URL Operations
- Open files with default applications
- Open URLs in default browser
- Execute safe shell commands with security restrictions
๐ก๏ธ Security Features
- Dangerous command blocking - Prevents system-damaging operations
- Timeout protection - All operations have reasonable timeouts
- Error handling - Graceful failures with helpful error messages
- PyAutoGUI failsafe - Built-in safety mechanisms
๐ฆ Installation
Prerequisites
- Python 3.8 or higher
- pip package manager
- Claude Desktop or other MCP-compatible client
System Dependencies
Linux (Ubuntu/Debian):
sudo apt install python3-tk scrot wmctrl xdotool
Linux (Fedora):
sudo dnf install python3-tkinter scrot wmctrl xdotool
macOS:
- Grant accessibility permissions to your terminal
- No additional packages needed
Windows:
- No additional packages needed
Quick Setup
-
Clone or download this repository
-
Set up the virtual environment:
cd totalcontrol python3 -m venv system_control_env source system_control_env/bin/activate # Linux/macOS # or system_control_env\Scripts\activate # Windows
-
Install Python dependencies:
pip install --upgrade pip pip install mcp pyautogui pygetwindow psutil pillow # Linux additional dependencies pip install python-xlib ewmh # macOS additional dependencies pip install pyobjc-framework-Quartz pyobjc-framework-AppKit # Windows additional dependencies pip install pywin32
-
Test the server:
python test_server.py
๐ง Configuration
Claude Desktop Integration
Add this configuration to your Claude Desktop config file:
Linux: ~/.config/claude/claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"system-control": {
"command": "/path/to/totalcontrol/system_control_env/bin/python",
"args": ["/path/to/totalcontrol/system_control_mcp.py"],
"env": {
"DISPLAY": ":0"
}
}
}
}
๐ฎ Usage Examples
Application Launching
"Launch Firefox"
"Open Steam"
"Launch RPCS3"
"Open Visual Studio Code"
"Launch any application name"
Application Discovery
"List all applications"
"Show me Flatpak applications"
"List desktop applications"
"What applications can I launch?"
Screen Capture
"Take a screenshot"
"Save a screenshot as desktop.png"
"Capture the screen"
System Monitoring
"What's my CPU usage?"
"Show me system information"
"List running processes"
"What's my memory usage?"
Keyboard Automation
"Type 'Hello World'"
"Press Enter 3 times"
"Execute Ctrl+C"
"Hold Shift and press the right arrow"
Window Management
"List all open windows"
"Focus the Firefox window"
"Minimize all windows"
"Resize the terminal to 800x600"
๐ง Available Tools
Tool | Description |
---|---|
type_text | Type text with configurable speed |
press_key | Press specific keys multiple times |
keyboard_shortcut | Execute keyboard shortcuts |
list_windows | List all open windows |
take_screenshot | Take screenshots (full or region) |
save_screenshot | Save screenshots to files |
system_info | Get comprehensive system information |
cpu_usage | Get CPU usage statistics |
memory_usage | Get memory usage information |
list_processes | List running processes |
network_stats | Get network statistics |
launch_application | Launch any installed application โญ |
list_applications | List all available applications โญ |
run_command | Execute safe shell commands |
open_file | Open files with default applications |
open_url | Open URLs in default browser |
๐งช Testing
# Test server functionality
python test_server.py
# Test individual tools
python test_tools.py
# Test server startup
python system_control_mcp.py
๐ Application Discovery
The server automatically discovers applications from:
- ๐ฆ Flatpak applications - All installed Flatpak apps
- ๐ฑ Snap packages - All installed Snap applications
- ๐ฅ๏ธ Desktop files - Applications with .desktop entries
- โก PATH executables - Command-line tools and applications
Total applications discovered: 2700+ on a typical Linux system!
๐ก๏ธ Security
Blocked Operations
The server blocks dangerous commands including:
- File operations:
rm
,mv
,cp
,dd
- System control:
shutdown
,reboot
,sudo
,su
- Network tools:
wget
,curl
,ssh
,nc
- Shell access:
bash
,sh
,exec
,eval
Safe Operations
Allows safe applications and commands:
- All GUI applications (games, media players, etc.)
- Development tools (IDEs, editors, etc.)
- System utilities (file managers, terminals, etc.)
- Media applications (browsers, video players, etc.)
๐ง Troubleshooting
Common Issues
1. "No DISPLAY variable" (Linux)
- You're running in a headless environment
- Need X11 forwarding or a graphical desktop
2. "Permission denied" errors
- Grant accessibility permissions (macOS)
- Run as administrator if needed (Windows)
- Check user permissions (Linux)
3. "Module not found" errors
- Activate the virtual environment first
- Install missing dependencies
4. Applications won't launch
- Check if the application is installed
- Use
list_applications
to see available apps - Try the exact name from the application list
Platform-Specific Notes
Linux:
- Requires X11 display server
- Some window management needs
wmctrl
andxdotool
- Screenshot functionality needs
scrot
macOS:
- Requires accessibility permissions for automation
- Uses native macOS APIs for window management
Windows:
- May require administrator privileges for some operations
- Uses native Windows APIs
๐ค Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
๐ License
This project is open source. See the LICENSE file for details.
๐ Related Projects
- Model Context Protocol - The protocol this server implements
- Claude Desktop - The primary client for this server
- PyAutoGUI - GUI automation library used
๐ Version History
- v1.0.0 - Initial release with basic functionality
- v1.1.0 - Added universal application launching โญ
- v1.1.1 - Enhanced application discovery and security
โ ๏ธ Important Security Notice: This server can control your computer. Only use it with trusted AI assistants and review actions before execution. The server includes security safeguards but should be used responsibly.