About SSH Tools MCP
SSH Tools MCP is an MCP server for connecting to SSH hosts, running remote commands, and ending the connection. It provides a small set of SSH operations for MCP clients.
Key features
- 01Connect to SSH hosts
- 02Run commands remotely
- 03Disconnect SSH sessions
- 04Return command output or errors
Use cases
- 01Run nvidia-smi on a remote host
- 02Execute commands over an SSH connection
MCP support
The MCP server exposes tools to connect to an SSH server, run commands on the connected host, and disconnect.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMESSH Tools MCP
这是一个基于MCP (Model Context Protocol) 的SSH工具,允许你通过简单的命令连接到远程服务器并执行命令。
功能
- 连接到SSH服务器
- 执行远程命令(如 nvidia-smi)
- 断开SSH连接
安装
- 安装依赖:
pip install -r requirements.txt
- 运行服务器:
python ssh_server.py
使用方法
该MCP服务器提供以下工具:
-
connect_ssh- 连接到SSH服务器- 参数:
- hostname: 服务器IP地址或主机名
- password: SSH密码
- username: SSH用户名(默认:root)
- port: SSH端口(默认:22)
- 参数:
-
run_command- 在已连接的服务器上执行命令- 参数:
- command: 要执行的命令(例如:nvidia-smi)
- 参数:
-
disconnect_ssh- 断开当前SSH连接
示例
- 连接到服务器:
connect_ssh(hostname="192.168.1.100", password="your_password")
- 执行 nvidia-smi 命令:
run_command(command="nvidia-smi")
- 断开连接:
disconnect_ssh()
注意事项
- 确保目标服务器允许SSH密码认证
- 建议在使用完毕后调用
disconnect_ssh断开连接 - 所有命令执行都会返回命令的输出或错误信息
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.