Uses environment variables for configuration of SSH credentials, browser settings, and logging preferences
Enables execution of custom JavaScript code within browser automation context for dynamic web interactions
Provides secure SSH-based control over remote Linux servers including command execution, script management, file system operations, and system monitoring
Enables comprehensive browser automation including web navigation, form interactions, screenshot capture, and JavaScript execution with real-time monitoring
Supports unit testing framework for validating MCP server functionality
Built with Python 3.8+ providing the core implementation for SSH connectivity and browser automation capabilities
Awesome Linux MCP Server
A comprehensive Model Context Protocol (MCP) server that provides AI models with secure control over remote Linux servers and browser automation capabilities.
๐ Features
SSH-Based Linux Server Control
Remote Command Execution: Run commands securely on remote Linux servers via SSH
Script Management: Execute and create bash scripts on remote systems
File System Operations: List directories with detailed information
System Monitoring: Comprehensive CPU, memory, and disk usage monitoring
Browser Automation
Web Navigation: Navigate to URLs with automatic wait conditions
Interactive Controls: Click, hover, fill forms, and select dropdown options
Screenshot Capture: Full page or element-specific screenshots
JavaScript Execution: Run custom JavaScript in browser context
Real-time Monitoring: Console logs and network request tracking
MCP Resources
Console Logs: Access browser console output as MCP resources
Screenshots: Current browser screenshots as base64 data
Network Details: HTTP request/response monitoring data
๐ ๏ธ Installation
Prerequisites
Python 3.8+
SSH access to a Linux server
Chrome/Chromium browser (for browser automation)
Setup
Clone or create the project directory:
mkdir awesome-linux-mcp cd awesome-linux-mcpInstall dependencies:
pip install -r requirements.txtConfigure environment variables:
cp config.example.env .env # Edit .env with your SSH and configuration settingsSet up SSH access:
Ensure you have SSH access to your target Linux server
Use either SSH key authentication (recommended) or password authentication
Test SSH connection manually first:
ssh user@host
โ๏ธ Configuration
Environment Variables
Variable | Description | Default | Required |
| Remote Linux server hostname/IP | localhost | Yes |
| SSH port | 22 | No |
| SSH username | - | Yes |
| Path to SSH private key | - | No* |
| SSH password | - | No* |
| Run browser in headless mode | true | No |
| Logging level (DEBUG, INFO, WARNING, ERROR) | INFO | No |
*Either SSH_KEY_PATH
or SSH_PASSWORD
must be provided for authentication.
SSH Key Setup (Recommended)
Generate SSH key pair (if you don't have one):
ssh-keygen -t ed25519 -C "your-email@example.com"Copy public key to remote server:
ssh-copy-id user@remote-serverSet
SSH_KEY_PATH
to the path of your private key (e.g.,~/.ssh/id_ed25519
)
๐โโ๏ธ Running the Server
Development Mode
Testing the Server
You can test the MCP protocol directly:
๐ค Claude Desktop Integration
Add the server to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
๐ ๏ธ Available Tools
Command Execution Tools
execute_command
Execute a single terminal command on the remote Linux server.
execute_script
Execute a bash script with optional arguments.
create_bash_script
Create and deploy a new bash script to the remote server.
File System Tools
list_directory
List directory contents with detailed information.
System Monitoring Tools
get_system_info
Get comprehensive system information (CPU, memory, disk usage).
Browser Automation Tools
puppeteer_navigate
Navigate browser to a URL.
puppeteer_screenshot
Capture screenshot of page or element.
puppeteer_click
Click on a web page element.
puppeteer_hover
Hover over a web page element.
puppeteer_fill
Fill a form input field.
puppeteer_select
Select an option from a dropdown.
puppeteer_evaluate
Execute JavaScript in browser context.
puppeteer_get_console_logs
Get browser console logs.
puppeteer_get_screenshot
Get current browser screenshot.
puppeteer_get_network_details
Get network request details.
๐ MCP Resources
console://logs
Access browser console output.
screenshot://current
Get current browser screenshot as base64.
network://details
Get network request/response data as JSON.
๐ Security Considerations
SSH Security
Use SSH key authentication instead of passwords when possible
Ensure SSH keys have proper permissions (600)
Regularly rotate SSH keys
Use SSH config for host-specific settings
Command Execution Security
All commands are validated before execution
Timeout protection prevents hanging commands
Output is sanitized and truncated for safety
No shell injection vulnerabilities
Browser Security
Headless mode prevents visible attacks
Isolated browser sessions per server instance
Network monitoring for security analysis
JavaScript execution in sandboxed environment
๐ Troubleshooting
SSH Connection Issues
Verify SSH credentials and server accessibility
Test manual SSH connection:
ssh user@host
Check firewall settings and port accessibility
Ensure SSH key has correct permissions
Browser Automation Issues
Install Chrome/Chromium browser
Ensure sufficient system resources
Check headless mode compatibility
Verify browser dependencies
Command Execution Timeouts
Increase timeout values for long-running commands
Check server performance and resource usage
Verify command syntax and server responsiveness
๐ Usage Examples
System Administration
Web Automation
Network Monitoring
๐งช Testing
Unit Tests
Integration Tests
Manual Testing
Use the MCP Inspector tool for interactive testing:
๐ค Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests for new functionality
Submit a pull request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
Built with the Model Context Protocol
Uses Paramiko for SSH
Uses Pyppeteer for browser automation
Inspired by various MCP server implementations in the ecosystem
Made with โค๏ธ for the AI and Linux communities
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables AI models to securely control remote Linux servers via SSH for command execution, file operations, and system monitoring, plus browser automation capabilities for web navigation, form interaction, and screenshot capture.