classfang/ssh-mcp-server
基于 SSH 的 MCP 服务 🧙♀️。已被MCP官方收录 🎉。 SSH MCP Server 🧙♀️. It has been included in the community MCP repository 🎉.
What it solves
ssh-mcp-server is a bridge tool that allows AI assistants (like Claude Code or Cursor) to execute remote SSH commands and transfer files through a standardized interface. It solves the problem of giving AI models the ability to operate remote servers without exposing sensitive SSH credentials directly to the model itself.
How it works
The project implements the Model Context Protocol (MCP), enabling an AI assistant to call specific tools like execute-command, upload, and download. The server manages the SSH connections locally, using various authentication methods (passwords, private keys, or SSH config files) and can route traffic through SOCKS5, HTTP, or HTTPS proxies. It supports two transport modes: exec for standard command execution and SFTP, and shell for interactive sessions, especially useful for bastion hosts or jump servers.
Who it’s for
Developers, DevOps engineers, and system administrators who want to integrate AI agents into their server management workflows while maintaining security controls over what the AI can execute.
Highlights
- Credential Isolation: SSH credentials stay local and are never shared with the AI model.
- Command Safety: Includes flexible whitelist and blacklist mechanisms using regular expressions to restrict the AI's command range.
- Versatile Connectivity: Supports private keys (with passphrases), SSH config reuse, 2FA/MFA via keyboard-interactive authentication, and proxy support.
- File Management: Enables bidirectional file transfer (upload/download) between the local machine and remote servers.
- Multi-Server Management: Can manage multiple SSH targets simultaneously via a single configuration file.
- Command Templates: Allows wrapping commands in templates (e.g.,
sudoordocker exec) to change users or enter containers.
Related
- Project
- Project
- Project
- Project
- Project