
A MCP server written to SSH into a specified server, fully written in Nodejs
概览
A cross-platform Model Context Protocol (MCP) server that provides SSH connectivity tools. This server enables AI assistants to securely connect to and execute commands on remote servers via SSH. - : Works on Windows, macOS, and Linux - : Username/password and SSH key authentication - : Connect to servers using either IP version - : Manage multiple SSH connections simultaneously - : Upload, download, and list files via SFTP - : Run bash, python, and other scripts remotely - : Uses the robust ssh2 library for secure connections - : Works with Claude CLI, Claude Desktop, and other MCP clients This auto-detects your OS and registers the MCP server with the correct configuration for your platform. On Windows, npx is a batch file (npx.cmd). Claude Code launches MCP servers using Node.js child_process.spawn(), which cannot execute .cmd files directly. The cmd /c wrapper tells Windows to run it through the command interpreter. : Edit ~/.config/claude/claude_desktop_config.
README
以下为原文 README 节选,完整内容请查看原文。
SSH MCP Server
A cross-platform Model Context Protocol (MCP) server that provides SSH connectivity tools. This server enables AI assistants to securely connect to and execute commands on remote servers via SSH.
Features
- Cross-platform compatibility: Works on Windows, macOS, and Linux
- Multiple authentication methods: Username/password and SSH key authentication
- IPv4 and IPv6 support: Connect to servers using either IP version
- Multiple connections: Manage multiple SSH connections simultaneously
- Comprehensive file operations: Upload, download, and list files via SFTP
- Script execution: Run bash, python, and other scripts remotely
- Secure: Uses the robust
ssh2library for secure connections - MCP compatible: Works with Claude CLI, Claude Desktop, and other MCP clients
Installation & Setup
Quick Setup (Recommended)
-
Add to Claude CLI with one command (cross-platform):
npx @zibdie/ssh-mcp-server@latest --installThis auto-detects your OS and registers the MCP server with the correct configuration for your platform.
Or manually, if you prefer:
macOS/Linux:
claude mcp add ssh-mcp-server -- npx '@zibdie/ssh-mcp-server@latest'Windows:
claude mcp add ssh-mcp-server -- cmd /c npx @zibdie/ssh-mcp-server@latestWhy the difference? On Windows,
npxis a batch file (npx.cmd). Claude Code launches MCP servers using Node.jschild_process.spawn(), which cannot execute.cmdfiles directly. Thecmd /cwrapper tells Windows to run it through the command interpreter. -
Restart Claude CLI
-
Test the connection:
"Connect to my server at example.com with username myuser"
Alternative: Manual Installation
For Claude CLI
-
Install globally:
npm install -g @zibdie/ssh-mcp-server -
Add to configuration:
macOS/Linux: Edit
~/.config/claude/claude_desktop_config.json{ "mcpServers": { "ssh-mcp-server": { "command": "ssh-mcp-server" } } }Windows: Edit
%APPDATA%\Claude\claude_desktop_config.json{ "mcpServers": { "ssh-mcp-server": { "command": "cmd", "args": ["/c", "ssh-mcp-server"] } } }
For Claude Desktop
-
Install globally:
npm install -g @zibdie/ssh-mcp-server -
Add to configuration:
安装
npx @zibdie/ssh-mcp-server@latest --install配置
{
"mcpServers": {
"ssh-mcp-server": {
"command": "ssh-mcp-server"
}
}
}