SSH MCP is an MCP server that runs locally on your host that provides the ability to manage and interact with remote SSH hosts. It supports organizing hosts into groups and executing commands across multiple hosts simultaneously. - addhost - Adds a new Linux or Windows host to the SSH configuration with automatic OS detection. Username and password are optional in the connection string - if not pr
Add this skill
npx mdskills install blakerouse/ssh-mcpWell-documented SSH MCP server with clear setup, solid security options, and useful timeout controls
1# SSH MCP2SSH MCP is an MCP server that runs locally on your host that provides the ability to manage and interact with remote SSH hosts. It supports organizing hosts into groups and executing commands across multiple hosts simultaneously.34## Tools56### Host Management7- **add_host** - Adds a new Linux or Windows host to the SSH configuration with automatic OS detection. Username and password are optional in the connection string - if not provided, the current user and SSH agent will be used for authentication.8- **remove_host** - Removes a host from the SSH configuration by group and name.9- **get_groups** - Retrieves the list of all groups from the SSH configuration.10- **get_hosts** - Retrieves the list of hosts from the SSH configuration. Can optionally filter by group.11- **get_os_info** - Retrieves the cached operating system information for Linux and Windows hosts. You can specify individual hosts or an entire group.12- **update_os_info** - Updates the cached operating system information for Linux and Windows hosts. You can specify individual hosts or an entire group.1314### Command Execution15- **perform_command** - SSH into a remote machine and executes a command. You can specify individual hosts or an entire group. Commands that take longer than 30 seconds are automatically moved to background execution. Use background=true to run immediately in background.1617### Command Management18- **get_command_status** - Retrieves the status and results of a background command by its command ID. If no ID is provided, returns the most recent command.19- **list_commands** - Lists all background commands with their current status. Useful for tracking long-running commands.20- **cancel_command** - Cancels a running background command by its command ID.2122## Features2324- **Cross-platform support** - Works with both Linux and Windows remote hosts with automatic OS detection25- **Group-based organization** - Organize hosts into groups for easier management26- **Multiple authentication methods** - Supports password, SSH agent, and SSH key files (~/.ssh/id_rsa, id_ed25519, etc.)27- **Secure host verification** - Uses ~/.ssh/known_hosts for host key verification with automatic host addition28- **Concurrent execution** - Execute commands across multiple hosts simultaneously29- **Automatic background execution** - Commands that take longer than 30 seconds are automatically moved to background, with command IDs returned for status tracking30- **Persistent storage** - Uses BadgerDB for efficient local storage3132## Limitations3334- SSH agent support is Unix-only (SSH_AUTH_SOCK) - password and key file authentication work on all platforms35- Remote hosts can be Linux or Windows (automatic OS detection)363738## How to Setup3940Checkout the repository:4142```shell43$ git clone https://github.com/blakerouse/ssh-mcp44```4546Build the binary:4748```shell49$ go build .50```5152Update the MCP configuration for Claude Desktop:5354```55{56 "mcpServers": {57 "ssh": {58 "command": "<PATH_TO_BUILT_BINARY>"59 }60 }61}62```6364Restart Claude Desktop6566## How to Use6768### Adding Hosts6970Add a host to a group (multiple formats supported - `ssh://` prefix is optional):7172```73add host to production group connecting with 10.0.1.574add host named web01 to production group connecting with user@10.0.1.5:222275add host to staging group connecting with user:pass@10.0.1.1076```7778### Listing Groups and Hosts7980List all groups:81```82show me all groups83```8485List all hosts:86```87list all my hosts88```8990List hosts in a specific group:91```92show me hosts in production group93```9495### Getting OS Information9697Get OS info for all hosts in a group:98```99show OS information for production group100```101102Get OS info for specific hosts:103```104show OS information for production:web01 and production:web02105```106107### Executing Commands108109Run a command on all hosts in a group:110```111run "uptime" on production group112check disk space on staging group113```114115Run a command on specific hosts:116```117run "systemctl status nginx" on production:web01 and production:web02118```119120Commands that complete within 30 seconds will return results immediately. Longer commands are automatically moved to background:121```122run "apt-get update && apt-get upgrade -y" on production group123# If this takes >30s, you'll get a command ID to check later124```125126Force a command to run in background immediately:127```128run "apt-get update && apt-get upgrade -y" on production group in the background129```130131### Managing Background Commands132133Check the status of a background command:134```135show me the status of command abc-123-def136show me the status of the last command137```138139List all background commands:140```141list all background commands142show me all running commands143```144145Cancel a running command:146```147cancel command abc-123-def148stop the running command abc-123-def149```150151### Updating OS Information152153Update cached OS information:154```155update OS information for production group156refresh OS info for staging:db01157```158159### Managing Hosts160161Remove a host:162```163remove production:web01164remove host web02 from staging group165```166
Full transparency — inspect the skill content before installing.