ssh
SSH MCP Server - Connect to remote servers via SSH and execute commands through Model Context Protocol
claude mcp add --transport stdio idletoaster-ssh-mcp-server npx -y @idletoaster/ssh-mcp-server@latest
How to use
This MCP server enables AI assistants (notably Claude Desktop) to securely execute SSH commands on remote servers through the MCP interface. Built in Node.js with the official MCP SDK, it focuses on private-key SSH authentication and token-efficient operation. The server exposes a remote-SSH capability that accepts structured tool calls and returns command outputs, allowing you to perform tasks like checking disk usage, restarting services, or listing processes on remote hosts via SSH keys.
To use it, configure your MCP client (e.g., Claude Desktop) to point at the ssh MCP server. The recommended one-command NPX installation lets you run the server on demand without local installation. Once configured, Claude can issue queries such as running a shell command on a target host by providing host, user, command, and a path to your private key (or rely on auto-discovery for existing keys). The server uses the SSH2 library for secure connections and supports multiple key formats and explicit key paths as shown in the configuration examples.
How to install
Prerequisites:
- Node.js 18+ installed on the host
- NPM 9+ installed
Option A: Run directly with NPX (no local install)
- Ensure you have a Node.js environment with NPX available.
- Start the MCP server using NPX:
npx @idletoaster/ssh-mcp-server@latest
Option B: Install globally for repeated use
- Install the package globally:
npm install -g @idletoaster/ssh-mcp-server
- Run the server locally:
npm start
Option C: Local project installation (for development)
- Create a project folder and initialize:
mkdir ssh-mcp && cd ssh-mcp
npm init -y
- Install dependencies:
npm install @idletoaster/ssh-mcp-server
- Run locally:
npm start
Notes:
- The server is designed to be run on demand via NPX for zero-setup deployments, but a local installation is great for development and testing.
- If you plan to run as a background service, consider using a process manager like PM2 or systemd, depending on your OS.
Additional notes
Tips and common considerations:
- Use NPX to avoid local installs: npx @idletoaster/ssh-mcp-server@latest
- Configure SSH keys securely: private keys with restricted permissions (chmod 600) and consider passphrases where possible.
- Supported key formats include RSA (id_rsa), ED25519 (id_ed25519), and ECDSA (id_ecdsa); OpenSSH and PEM formats are supported as well.
- You can specify an explicit privateKeyPath or rely on environment variable SSH_PRIVATE_KEY or auto-discovery for keys in ~/.ssh.
- In Claude Desktop (or other MCP clients), place the configuration under mcpServers with the server name (e.g., ssh) and ensure the env block is populated if needed.
- Keep the MCP server up to date to benefit from token-efficiency improvements and security fixes mentioned in the v2.1.0 notes.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.