The MCP SSH Manager enables Claude Code to seamlessly manage multiple SSH connections and perform remote operations through the Model Context Protocol (MCP).
Core Capabilities:
Execute commands on remote servers with optional working directory support and sudo privileges (with secure password masking)
Transfer files - upload to and download from remote systems
Deploy applications with automatic permission handling, backup creation, and service restart options
List configured SSH servers with their connection details
Management Features:
Server aliases - create shortcuts for frequently used servers
Command aliases - define shortcuts for common commands
Automation hooks - control project-specific workflows (list, enable, disable, status)
Configuration profiles - switch between different setups for various project types (default, frappe, docker, nodejs)
Provides Docker container management capabilities through SSH connections, including specialized command aliases and automation hooks for Docker operations
Offers ERPNext-specific SSH management features through specialized profiles, including custom command aliases and automation hooks tailored for ERPNext deployments
Provides Frappe framework-specific SSH management capabilities through dedicated profiles, including specialized command aliases and automation hooks for Frappe applications
Enables Node.js application management through SSH connections with specialized profiles, including custom command aliases and automation hooks for Node.js deployments
MCP SSH Manager - SSH Remote Server Management via Model Context Protocol ๐
Looking for MCP SSH tools? This is the MCP SSH Manager - a complete Model Context Protocol (MCP) server for SSH remote server management compatible with Claude Code and OpenAI Codex.
A powerful Model Context Protocol (MCP) server that enables Claude Code and OpenAI Codex to manage multiple SSH connections seamlessly. Control remote servers, execute commands, transfer files, manage databases, and automate DevOps tasks directly from your AI assistant.
Keywords: MCP SSH, MCP SSH Manager, SSH MCP, Model Context Protocol SSH, Claude Code SSH, SSH MCP Server, Remote SSH Management, MCP Server SSH
๐ What's New in v3.0.0
Major Release - Enterprise DevOps Platform (Released: October 1, 2025)
This release adds 12 new MCP tools transforming SSH Manager into a comprehensive DevOps automation platform:
๐พ Backup & Restore System (4 tools)
Automated backups for MySQL, PostgreSQL, MongoDB, and file systems
Smart scheduling with cron integration and retention policies
One-click restore with cross-database support
Metadata tracking for audit and compliance
๐ฅ Health & Monitoring (4 tools)
Real-time health checks with CPU, RAM, Disk, and Network metrics
Service monitoring for nginx, mysql, docker, and custom services
Process management with CPU/RAM sorting and kill capabilities
Alert thresholds with configurable notifications
๐๏ธ Database Management (4 tools)
Safe database dumps with compression and selective exports
Database imports with automatic decompression
Schema exploration listing databases, tables, and collections
Secure queries with SQL injection prevention (SELECT-only)
๐ Total: 37 MCP Tools | ๐ง ~4,100 Lines of Code Added | โ Production Ready
๐ Table of Contents
๐ Features
Core Features
๐ Multiple SSH Connections - Manage unlimited SSH servers from a single interface
๐ Secure Authentication - Support for both password and SSH key authentication
๐ File Operations - Upload and download files between local and remote systems
โก Command Execution - Run commands on remote servers with working directory support
๐ Default Directories - Set default working directories per server for convenience
๐ฏ Easy Configuration - Simple
.env
file setup with guided configuration tool
Enterprise DevOps Features (v3.0) ๐
๐พ Backup & Restore - Automated backups for MySQL, PostgreSQL, MongoDB, and files
๐ฅ Health Monitoring - Real-time server health checks (CPU, RAM, Disk, Services)
๐๏ธ Database Management - Safe database operations with SQL injection prevention
๐ Process Management - Monitor and control server processes
โ ๏ธ Smart Alerts - Configurable health thresholds and notifications
v2.0 Features
๐ Bash CLI - Lightning-fast pure Bash CLI for server management
๐ Advanced Logging - Comprehensive logging system with levels and history
๐ Rsync Integration - Bidirectional file sync with rsync support
๐ป Persistent Sessions - Maintain shell context across multiple commands
๐ฅ Server Groups - Execute commands on multiple servers simultaneously
๐ง SSH Tunnels - Local/remote port forwarding and SOCKS proxy support
๐ System Monitoring - Real-time monitoring of CPU, memory, disk, and network
๐ท๏ธ Server Aliases - Use short aliases instead of full server names
๐ Smart Deployment - Automated file deployment with permission handling
๐ Sudo Support - Execute commands with sudo privileges securely
๐ OpenAI Codex Support - Compatible with OpenAI Codex via TOML configuration
๐ Alternative Search Terms
Looking for:
MCP SSH server? โ You're in the right place
SSH MCP integration? โ This is it
Claude Code SSH tools? โ Fully compatible
Model Context Protocol SSH manager? โ Complete solution
OpenAI Codex SSH server? โ Full support
Remote SSH MCP server? โ Works seamlessly
MCP Server for SSH? โ Production ready
SSH automation with AI? โ Perfect tool
This is the MCP SSH Manager you've been searching for! ๐ฏ
๐ Prerequisites
Node.js (v18 or higher)
npm (comes with Node.js)
For Claude Code: Claude Code CLI installed
For OpenAI Codex: Codex CLI configured
Bash 4.0+ (for CLI management tools)
rsync (for file synchronization)
sshpass (optional, for rsync with password authentication)
macOS:
brew install hudochenkov/sshpass/sshpass
Linux:
apt-get install sshpass
๐ Quick Start - Claude Code
1. Install MCP SSH Manager
Option A: Install from npm (recommended)
Option B: Install from source
2. Install to Claude Code
3. Configure Auto-Approval (Optional but Recommended)
To avoid being prompted for approval on every SSH command, add auto-approve configuration:
Edit ~/.config/claude-code/claude_code_config.json
:
Important: Restart Claude Code after making this change.
For full auto-approval of all SSH tools, see the complete list in examples/claude-code-config.example.json.
4. Start Using!
In Claude Code, you can now:
With Default Directories:
If you set /var/www/html
as default for production, these commands are equivalent:
"Run 'ls' on production"
โ executes in/var/www/html
"Run 'ls' on production in /tmp"
โ executes in/tmp
(overrides default)
๐ Quick Start - OpenAI Codex
1. Install MCP SSH Manager
Same installation as Claude Code (see above), then configure for Codex:
2. Manual Configuration (Optional)
If you prefer manual setup, add to ~/.codex/config.toml
:
3. Configure Servers in TOML Format
Create or edit ~/.codex/ssh-config.toml
:
๐ก See
4. Start Using in Codex!
In OpenAI Codex, you can now:
Converting Between Formats
Switch easily between Claude Code (.env) and Codex (TOML):
Both formats can coexist! The system supports both simultaneously.
๐ ๏ธ Available MCP Tools
Core Tools
ssh_list_servers
Lists all configured SSH servers with their details.
ssh_execute
Execute commands on remote servers.
Parameters:
server
(name),command
,cwd
(optional working directory)Note: If no
cwd
is provided, uses the server's default directory if configured
ssh_upload
Upload files to remote servers.
Parameters:
server
,local_path
,remote_path
ssh_download
Download files from remote servers.
Parameters:
server
,remote_path
,local_path
Backup & Restore Tools (v2.1+) ๐
ssh_backup_create
Create backup of database or files on remote server.
Types: MySQL, PostgreSQL, MongoDB, Files
Parameters:
server
,type
,name
,database
,paths
,retention
Automatic compression and metadata tracking
See Backup Guide for detailed usage
ssh_backup_list
List all available backups on remote server.
Parameters:
server
,type
(optional filter)Returns backup details with size, date, and retention info
ssh_backup_restore
Restore from a previous backup.
Parameters:
server
,backupId
,database
,targetPath
Supports cross-database restoration
ssh_backup_schedule
Schedule automatic backups using cron.
Parameters:
server
,schedule
(cron format),type
,name
Automatic cleanup based on retention policy
Health & Monitoring Tools (v2.2+) ๐ฅ
ssh_health_check
Perform comprehensive health check on remote server.
Checks: CPU, Memory, Disk, Network, Uptime, Load average
Returns overall health status (healthy/warning/critical)
Optional detailed mode for extended metrics
ssh_service_status
Check status of services (nginx, mysql, docker, etc.).
Parameters:
server
,services
(array)Returns running/stopped status for each service
Works with both systemd and sysv init systems
ssh_process_manager
List, monitor, or kill processes on remote server.
Actions: list (top processes), kill (terminate), info (details)
Sort by CPU or memory usage
Filter processes by name
ssh_alert_setup
Configure health monitoring alerts and thresholds.
Actions: set (configure), get (view), check (test thresholds)
Configurable CPU, memory, and disk thresholds
Automatic alert triggering when thresholds exceeded
Database Management Tools (v2.3+) ๐๏ธ
ssh_db_dump
Create database dump/backup on remote server.
Supports: MySQL, PostgreSQL, MongoDB
Parameters:
server
,type
,database
,outputFile
,dbUser
,dbPassword
,dbHost
,dbPort
Optional:
compress
(gzip),tables
(specific tables only)Returns dump size and location
ssh_db_import
Import SQL dump or restore database on remote server.
Supports: MySQL, PostgreSQL, MongoDB
Parameters:
server
,type
,database
,inputFile
,dbUser
,dbPassword
,dbHost
,dbPort
Handles compressed (.gz) files automatically
Optional:
drop
(drop database before restore for MongoDB)
ssh_db_list
List databases or tables on remote server.
Parameters:
server
,type
,database
(optional),dbUser
,dbPassword
,dbHost
,dbPort
Without database: lists all databases (filters system DBs)
With database: lists all tables/collections
Returns structured list with count
ssh_db_query
Execute read-only SQL queries on remote database.
Parameters:
server
,type
,database
,query
,dbUser
,dbPassword
,dbHost
,dbPort
Security: Only SELECT queries allowed for safety
MongoDB: Use
collection
parameter for find queriesReturns query results with row count
Deployment Tools (v1.2+)
ssh_deploy
๐
Deploy files with automatic permission and backup handling.
Parameters:
server
,files
(array),options
(owner, permissions, backup, restart)Automatically handles permission issues and creates backups
ssh_execute_sudo
๐
Execute commands with sudo privileges.
Parameters:
server
,command
,password
(optional),cwd
(optional)Securely handles sudo password without exposing in logs
Server Management
ssh_alias
๐ท๏ธ
Manage server aliases for easier access.
Parameters:
action
(add/remove/list),alias
,server
Example: Create alias "prod" for "production" server
ssh_command_alias
๐
Manage command aliases for frequently used commands.
Parameters:
action
(add/remove/list/suggest),alias
,command
Aliases loaded from active profile
Example: Custom aliases for your project
ssh_hooks
๐ฃ
Manage automation hooks for SSH operations.
Parameters:
action
(list/enable/disable/status),hook
Hooks loaded from active profile
Example: Project-specific validation and automation
ssh_profile
๐
Manage configuration profiles for different project types.
Parameters:
action
(list/switch/current),profile
Available profiles: default, frappe, docker, nodejs
Example: Switch between different project configurations
๐ง Configuration
Profiles
SSH Manager uses profiles to configure aliases and hooks for different project types:
Set active profile:
Environment variable:
export SSH_MANAGER_PROFILE=frappe
Configuration file: Create
.ssh-manager-profile
with profile nameDefault: Uses
default
profile if not specified
Available profiles:
default
- Basic SSH operationsfrappe
- Frappe/ERPNext specificdocker
- Docker container managementnodejs
- Node.js applicationsCreate custom profiles in
profiles/
directory
Environment Variables
Servers are configured in the .env
file with this pattern:
Server Management Tool
The Python management tool (tools/server_manager.py
) provides:
List servers - View all configured servers
Add server - Interactive server configuration
Test connection - Verify server connectivity
Remove server - Delete server configuration
Update Claude Code - Configure MCP in Claude Code
Install dependencies - Setup required packages
๐ Project Structure
๐งช Testing
Test Server Connection
Verify MCP Installation
Check Server Status in Claude Code
๐ Security Best Practices
Never commit - Always use
.env.example
as templateUse SSH keys when possible - More secure than passwords
Limit server access - Use minimal required permissions
Rotate credentials - Update passwords and keys regularly
๐ Advanced Usage
Documentation
DEPLOYMENT_GUIDE.md - Deployment strategies and permission handling
ALIASES_AND_HOOKS.md - Command aliases and automation hooks
Real-world examples and best practices
๐ Troubleshooting
MCP Tools Not Available
Ensure MCP is installed:
claude mcp list
Restart Claude Code after installation
Check server logs for errors
Connection Failed
Test connection:
python tools/test-connection.py [server_name]
Verify network connectivity
Check firewall rules
Ensure SSH service is running on remote server
Permission Denied
Verify username and password/key
Check SSH key permissions:
chmod 600 ~/.ssh/your_key
Ensure user has necessary permissions on remote server
๐ ๏ธ Available MCP Tools
Once installed in Claude Code, you'll have access to these powerful tools:
Core Tools
ssh_execute
- Execute commands on remote serversssh_upload
- Upload files to remote serversssh_download
- Download files from remote serversssh_list_servers
- List all configured SSH servers
Advanced Tools (v2.0)
ssh_sync
- Bidirectional file synchronization with rsyncssh_tail
- Real-time log monitoring with follow modessh_monitor
- System metrics monitoring (CPU, RAM, disk, network)ssh_history
- View command execution history
Session Management
ssh_session_start
- Start persistent SSH sessionssh_session_send
- Send commands to active sessionssh_session_list
- List active sessionsssh_session_close
- Close specific session
Server Groups
ssh_execute_group
- Execute commands on server groupsssh_group_manage
- Manage server groups (create, update, delete)
SSH Tunnels
ssh_tunnel_create
- Create SSH tunnels (local, remote, SOCKS)ssh_tunnel_list
- List active tunnels with statisticsssh_tunnel_close
- Close specific or all tunnels
Deployment & Security
ssh_deploy
- Smart deployment with permission handlingssh_execute_sudo
- Execute commands with sudo privilegesssh_alias
- Manage server aliases
๐ Usage Examples
Backup & Restore
For detailed backup examples, see examples/backup-workflow.js and docs/BACKUP_GUIDE.md.
Using the Bash CLI
Using in Claude Code or OpenAI Codex
Once installed, simply ask your AI assistant:
Claude Code examples:
"List my SSH servers"
"Execute 'df -h' on production server"
"Upload this file to staging:/var/www/"
"Create an SSH tunnel to access remote MySQL"
"Monitor CPU usage on all servers"
"Start a persistent session on prod1"
OpenAI Codex examples:
"Show my SSH servers"
"Run df -h on production"
"Upload file.txt to staging:/tmp/"
"Check CPU usage on all servers"
Both AI assistants support the same MCP tools! ๐
๐ค Contributing
We welcome contributions! Please see CONTRIBUTING.md for details.
Development Setup
Fork the repository
Clone and install dependencies
Setup pre-commit hooks for code quality:
./scripts/setup-hooks.shCreate your feature branch
Make your changes (hooks will validate on commit)
Push to your branch
Open a Pull Request
Code Quality
This project uses automated quality checks:
ESLint for JavaScript linting
Black for Python formatting
Flake8 for Python linting
Prettier for code formatting
Pre-commit hooks for automated validation
Secret detection to prevent credential leaks
Run validation manually: ./scripts/validate.sh
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
Built for Claude Code
Uses the Model Context Protocol
SSH handling via node-ssh
Server management with Paramiko
๐ง Support
For issues, questions, or suggestions:
Open an issue on GitHub Issues
Check existing issues before creating new ones
Made with โค๏ธ for the Claude Code community
Known Limitations
Command Timeout
The timeout parameter for SSH commands is advisory only
Due to SSH2 library limitations, commands may continue running on the server even after timeout
For critical timeout needs, use the system's
timeout
command directly in your command
SSH Sync (rsync)
Password authentication requires
sshpass
to be installedSSH key authentication is recommended for better security and reliability
Large file transfers may take time and appear to hang - be patient
Connection Management
Connections are pooled and reused for performance
If a connection becomes stale, it will be automatically reconnected on next use
Force reconnection by using the
ssh_connection_status
tool withreconnect
action
Support
For issues, feature requests, or contributions, please visit: https://github.com/bvisible/mcp-ssh-manager
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
Enables Claude to manage multiple SSH connections, execute remote commands, and transfer files across servers. Supports secure authentication, default directories, sudo operations, and deployment automation with profiles for different project types.
- ๐ What's New in v3.0.0
- ๐ Table of Contents
- ๐ Features
- ๐ Alternative Search Terms
- ๐ Prerequisites
- ๐ Quick Start - Claude Code
- ๐ Quick Start - OpenAI Codex
- ๐ ๏ธ Available MCP Tools
- ๐ง Configuration
- ๐ Project Structure
- ๐งช Testing
- ๐ Security Best Practices
- ๐ Advanced Usage
- ๐ Troubleshooting
- ๐ ๏ธ Available MCP Tools
- ๐ Usage Examples
- ๐ค Contributing
- ๐ License
- ๐ Acknowledgments
- ๐ง Support
- Known Limitations
- Support
Related Resources
Related MCP Servers
- -securityAlicense-qualityThe Claude Dev Server enables direct interaction with the file system within a specified workspace, allowing users to perform file and directory operations and implement code artifacts in software development using natural language commands.
Adamik MCP Serverofficial
AsecurityAlicenseAqualityEnables read and write interactions with 60+ blockchain networks through Claude Desktop, providing a standardized multi-chain API for transaction management, account insights, staking, and token interactions.Last updated -1242MIT License- AsecurityAlicenseAqualityEnables Claude to interact with FTP servers through natural language commands, allowing users to list directories, download/upload files, create directories, and delete files/directories on FTP servers.Last updated -611MIT License
- AsecurityAlicenseAqualityA server that lets Claude desktop app execute terminal commands on your computer and edit files through Model Context Protocol, featuring command execution, process management, and advanced file operations.Last updated -1914,6145MIT License