Get the FREE Ultimate OpenClaw Setup Guide →

SSH

A MCP server written to SSH into a specified server, fully written in Nodejs

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio zibdie-ssh-mcp-server npx -y @zibdie/ssh-mcp-server@latest \
  --env SSH_MCP_SERVER_DEBUG="false (set to true to enable verbose logging)"

How to use

The SSH MCP Server provides a cross-platform way for MCP clients to manage remote SSH connections via an MCP interface. It exposes tools for establishing SSH sessions, executing commands, transferring files with SFTP, and listing or manipulating remote files. Users can connect to multiple SSH servers concurrently, authenticate via username/password or SSH keys, and perform scripted actions on remote hosts. This makes it suitable for AI assistants and automation workflows that need secure remote command execution and file operations over SSH.

To use the server, install or run it via npx as shown in the installation steps, then tell Claude CLI, Claude Desktop, or other MCP clients to add the server. Once connected, you can invoke tools like ssh_connect to open a session, ssh_execute to run commands, ssh_upload_file and ssh_download_file for file transfers, and ssh_list_files or ssh_list_connections to manage and inspect connections. The server supports IPv4/IPv6 and multiple authentication methods, and leverages the ssh2 library for secure connections.

How to install

Prerequisites:

  • Node.js (recommended LTS version) and npm installed on the host running the MCP client setup
  • Claude CLI or Claude Desktop (for the quick setup example) or any MCP client compatible with the MCP protocol

Option A: Quick Setup (via npx)

  1. Run the server through Claude integration (recommended): claude mcp add ssh-mcp-server npx '@zibdie/ssh-mcp-server@latest'

  2. If you encounter Windows-related startup issues, use a supported terminal (Windows Terminal, PowerShell, or Git Bash) and ensure Claude CLI stdin support is available.

Option B: Manual Setup (Node.js/npm)

  1. Install globally and configure Claude to load the server: npm install -g @zibdie/ssh-mcp-server

  2. Add to Claude Desktop/CLI configuration: macOS/Linux: Edit ~/.config/claude/claude_desktop_config.json Windows: Edit %APPDATA%\Claude\claude_desktop_config.json

    Example snippet to add: { "mcpServers": { "ssh-mcp-server": { "command": "ssh-mcp-server" } } }

  3. Start using the server via your MCP client by selecting the ssh-mcp-server entry and connecting to your SSH endpoints.

Additional notes

Tips and common issues:

  • Ensure SSH server endpoints are accessible from the MCP host network and firewalls allow SSH (port 22 by default, or custom port).
  • When using SSH keys, provide correct paths and permissions; consider using an explicit passphrase for private keys.
  • For multi-server setups, assign distinct connectionId values to differentiate sessions (e.g., production, staging).
  • If you see authentication failures, verify that the chosen authentication method (password vs. key) matches the SSH server configuration.
  • Enable verbose logging only when debugging by setting the env var SSH_MCP_SERVER_DEBUG=true (inside the mcp_config for the server).
  • SFTP operations (upload/download/list) rely on the remote server allowing SFTP access and the user having appropriate permissions.
  • Remember to disconnect sessions with ssh_disconnect when done to free resources.

Related MCP Servers

Sponsor this space

Reach thousands of developers