SSH MCP Server
Provides SSH-based command execution, file management, system monitoring, and process management on remote Unix/Linux servers.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
SSH MCP Server
A Model Context Protocol (MCP) server that provides SSH access to Unix/Linux servers through Claude Desktop. Execute commands, manage files, and monitor your remote servers using natural language!
Features
š Direct SSH Access - Execute commands on your remote servers from Claude Desktop
š File Management - Upload, download, and browse files
š System Monitoring - Get real-time system information (CPU, memory, disk, temperature)
š Process Management - Check running processes
š Multi-Command Scripts - Execute multiple commands in sequence
š Secure - Uses SSH key authentication
Related MCP server: SSH MCP Server
Prerequisites
Python 3.8 or higher
Claude Desktop
Remote Unix/Linux server with SSH enabled
SSH key pair for authentication
Installation
1. Clone the Repository
git clone https://github.com/paraporoco/SSH-MCP.git
cd SSH-MCP2. Configure Your Connection
Copy the example configuration file:
# Windows PowerShell
Copy-Item config.example.json config.json
# Linux/Mac
cp config.example.json config.jsonEdit config.json with your server details:
{
"ssh": {
"host": "YOUR_SERVER_IP",
"port": 22,
"user": "YOUR_SSH_USERNAME",
"key_path": "PATH_TO_YOUR_SSH_KEY"
},
"connection": {
"timeout": 30,
"default_command_timeout": 30
}
}Example:
{
"ssh": {
"host": "192.168.1.100",
"port": 22,
"user": "username",
"key_path": "C:\\Users\\YourName\\.ssh\\id_rsa"
},
"connection": {
"timeout": 30,
"default_command_timeout": 30
}
}3. Run Setup Script
Windows (PowerShell)
.\setup.ps1Linux/Mac
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt4. Configure Claude Desktop
Add the MCP server to your Claude Desktop configuration:
Configuration file location:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Add this configuration:
{
"mcpServers": {
"ssh-server": {
"command": "/FULL/PATH/TO/SSH-MCP/venv/Scripts/python.exe",
"args": [
"/FULL/PATH/TO/SSH-MCP/ssh_mcp_server.py"
]
}
}
}Windows Example:
{
"mcpServers": {
"ssh-server": {
"command": "C:\\Users\\YourName\\Projects\\SSH-MCP\\venv\\Scripts\\python.exe",
"args": [
"C:\\Users\\YourName\\Projects\\SSH-MCP\\ssh_mcp_server.py"
]
}
}
}macOS/Linux Example:
{
"mcpServers": {
"ssh-server": {
"command": "/home/username/SSH-MCP/venv/bin/python",
"args": [
"/home/username/SSH-MCP/ssh_mcp_server.py"
]
}
}
}5. Restart Claude Desktop
Completely quit and restart Claude Desktop to load the MCP server.
SSH Key Setup
If you don't have an SSH key pair, create one:
On Windows (PowerShell):
ssh-keygen -t rsa -b 4096 -f $env:USERPROFILE\.ssh\id_rsaOn Linux/Mac:
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsaThen copy your public key to the remote server:
ssh-copy-id -i ~/.ssh/id_rsa.pub username@server-ipOr manually append the public key to ~/.ssh/authorized_keys on your remote server.
Available Tools
Once configured, you can use these tools in Claude Desktop through natural language:
1. ssh_test_connection
Test the SSH connection to your remote server.
Example: "Test my server connection"
2. ssh_execute
Execute a single command on your remote server.
Examples:
"Run 'ls -la' on my server"
"Check disk space on my server"
"Show me the kernel version"
3. ssh_execute_script
Execute multiple commands in sequence.
Example: "Run these commands on my server: cd /home/user, ls -la, pwd"
4. ssh_system_info
Get comprehensive system information (OS, CPU, memory, disk, temperature).
Example: "Show me my server system info"
5. ssh_list_files
List files in a directory.
Examples:
"List files in /home/user"
"Show me what's in /var/log"
6. ssh_read_file
Read the contents of a file.
Example: "Read /etc/hostname from my server"
7. ssh_check_process
Check if a process is running.
Example: "Is nginx running on my server?"
8. ssh_upload_file
Upload a file from your computer to the remote server.
Example: "Upload C:\myfile.txt to /home/user/myfile.txt"
9. ssh_download_file
Download a file from the remote server to your computer.
Example: "Download /var/log/syslog to C:\logs\syslog.txt"
Usage Examples
Here are some natural language prompts you can use in Claude Desktop:
System Monitoring:
"What's the server CPU temperature?"
"How much RAM is being used?"
"Show me disk usage"
"What's the uptime?"
File Operations:
"List all Python files in /home/user/projects"
"Read the config file at /etc/nginx/nginx.conf"
"Upload this script to my server"
Process Management:
"Is docker running?"
"Show me all Python processes"
"Check if Apache is active"
Command Execution:
"Update package lists with apt update"
"Restart the nginx service"
"Create a directory called /home/user/backup"
Configuration Options
Environment Variables (Alternative to config.json)
Instead of using config.json, you can set environment variables:
SSH_HOST- Remote server IP addressSSH_USER- SSH usernameSSH_KEY_PATH- Path to SSH private keySSH_PORT- SSH port (default: 22)SSH_TIMEOUT- Connection timeout in seconds (default: 30)SSH_COMMAND_TIMEOUT- Command execution timeout (default: 30)
Troubleshooting
Connection Issues
Verify server is reachable:
ping YOUR_SERVER_IPTest SSH manually:
ssh -i /path/to/key username@server-ipCheck SSH service on server:
sudo systemctl status sshVerify SSH key permissions:
Private key should be readable only by you (chmod 600)
Public key should be in
~/.ssh/authorized_keyson the server
MCP Server Not Loading
Verify Python installation:
python --version # Should be 3.8+Check virtual environment:
# Activate venv and test venv/Scripts/python.exe ssh_mcp_server.py # Windows venv/bin/python ssh_mcp_server.py # Linux/MacCheck Claude Desktop logs:
Look for error messages in Claude Desktop console
Verify paths in
claude_desktop_config.jsonare absolute
Restart Claude Desktop completely:
Close all instances
Check system tray for hidden instances
Restart and wait 10-15 seconds for MCP servers to initialize
Permission Denied Errors
Ensure your SSH key has correct permissions
Verify the user has necessary permissions on the remote server
Check that the SSH key is not password-protected (or use ssh-agent)
Security Considerations
ā ļø Never commit
config.jsonor SSH keys to version controlUse SSH key authentication instead of passwords
Restrict SSH key permissions (chmod 600)
Consider using a dedicated SSH user with limited permissions
Keep your SSH keys secure and rotate them regularly
Use firewall rules to restrict SSH access
Development
Running Tests
# Activate virtual environment
# Windows
.\venv\Scripts\activate
# Linux/Mac
source venv/bin/activate
# Run test connection
python test_connection.pyProject Structure
SSH-MCP/
āāā ssh_mcp_server.py # Main MCP server
āāā config.example.json # Configuration template
āāā config.json # Your config (gitignored)
āāā requirements.txt # Python dependencies
āāā setup.ps1 # Windows setup script
āāā test_connection.ps1 # Windows test script
āāā .gitignore # Git ignore rules
āāā README.md # This fileContributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
License
MIT License - see LICENSE file for details
Acknowledgments
Built with FastMCP
Uses Paramiko for SSH connections
Designed for Claude Desktop
Support
For issues, questions, or contributions:
Open an issue on GitHub
Check existing issues for solutions
Refer to the MCP documentation
Note: This project is not officially affiliated with Anthropic or Claude Desktop.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables SSH remote access to servers through Claude, allowing users to execute commands, transfer files via SFTP, and manage multiple remote connections using natural language.129MIT
- FlicenseNot gradedqualityDmaintenanceEnables managing Ubuntu/Linux servers through natural language by establishing SSH connections and executing remote commands. Supports real-time command execution and output through Claude Desktop or Cursor IDE.14-
- AlicenseAqualityDmaintenanceEnables Claude to connect to servers via SSH, execute commands, transfer files, and manage connections through natural language.921 npm1MIT
- -licenseNot gradedqualityNot gradedmaintenanceEnables Claude Code to control remote servers via SSH for automated deployment, testing, and operations, including command execution and file transfer.4-