mcp-ssh

AiondaDotCom/mcp-ssh

3.4

If you are the rightful owner of mcp-ssh 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.

A Model Context Protocol (MCP) server for managing and controlling SSH connections, integrating with MCP-compatible clients like Claude Desktop.

The MCP SSH Agent is a server designed to facilitate SSH operations through a standardized interface compatible with MCP clients such as Claude Desktop. It automatically discovers SSH hosts from your local SSH configuration files and executes commands using native SSH tools, ensuring high reliability. This server allows users to perform SSH operations seamlessly, leveraging AI-powered capabilities for managing remote connections. By integrating with Claude Desktop, users can execute SSH commands, manage file transfers, and perform connectivity checks directly through conversational interfaces. The server supports a wide range of SSH functionalities, including key-based authentication, file uploads and downloads, and batch command execution, making it a versatile tool for developers and system administrators.

Features

  • Reliable SSH: Utilizes native ssh/scp commands for maximum reliability.
  • Automatic Discovery: Finds hosts from SSH config and known_hosts files.
  • Full SSH Support: Works with SSH agents, keys, and all authentication methods.
  • File Operations: Supports uploading and downloading files using scp.
  • Batch Commands: Allows execution of multiple commands in sequence.

Usages

usage with Claude Desktop

{
  "mcpServers": {
    "mcp-ssh": {
      "command": "npx",
      "args": ["@aiondadotcom/mcp-ssh"]
    }
  }
}

manual server configuration

{
  "servers": {
    "mcp-ssh": {
      "command": "npx",
      "args": ["@aiondadotcom/mcp-ssh"]
    }
  }
}

Tools

  1. listKnownHosts

    Lists all known SSH hosts, prioritizing entries from ~/.ssh/config first, then additional hosts from ~/.ssh/known_hosts.

  2. runRemoteCommand

    Executes a command on a remote host using ssh.

  3. getHostInfo

    Returns detailed configuration for a specific host.

  4. checkConnectivity

    Tests SSH connectivity to a host.

  5. uploadFile

    Uploads a file to the remote host using scp.

  6. downloadFile

    Downloads a file from the remote host using scp.

  7. runCommandBatch

    Executes multiple commands sequentially.