mcp-ssh
by shuakami·★ 62·综合分 45
一个提供AI驱动SSH管理功能的MCP服务器,通过标准化协议实现远程操作。
概述
mcp-ssh是一个全面的MCP(模型上下文协议)服务器,使AI模型能够管理SSH连接并执行远程命令。它支持连接管理、命令执行、tmux会话处理、文件操作和进程监控。该服务器具有智能命令执行和阻塞检测功能,支持tmux集成实现持久化会话,并具备健壮的错误恢复机制。
试试问 AI
装完之后,这里有 6 个你可以让 AI 做的事:
什么时候选它
当你需要AI驱动的SSH管理功能、tmux集成和智能命令处理时,选择这个服务器。
什么时候不要选它
如果你需要纯SSH客户端而没有AI功能,或者在没有Python支持的限制环境中工作,请避免使用此工具。
此 server 暴露的工具
从 README 抽取出 12 个工具create_ssh_connectionCreate a new SSH connection to a remote server
execute_commandExecute a command on a connected SSH server
execute_composite_commandExecute multiple commands connected by && or ;
create_tmux_sessionCreate a new tmux session on the remote server
list_tmux_sessionsList all active tmux sessions on the remote server
send_tmux_keysSend key sequences to a tmux session
capture_tmux_outputCapture output from a specific tmux session
upload_fileUpload a file to the remote server via SSH
download_fileDownload a file from the remote server to local
read_fileRead the contents of a file on the remote server
detect_blocking_processesDetect blocking processes on the remote server
list_ssh_connectionsList all configured SSH connections
可对比工具
安装
安装步骤
- 克隆并安装:
git clone https://github.com/shuakami/mcp-ssh.git
cd mcp-ssh
npm install
npm run build- 在MCP客户端(如Cursor)中配置:
{
"mcpServers": {
"ssh-mcp": {
"command": "python3",
"args": ["/path/to/mcp-ssh/bridging_ssh_mcp.py"]
}
}
}- 重启客户端以激活MCP服务器。
FAQ
- mcp-ssh支持哪些认证方式?
- mcp-ssh支持密码认证和SSH密钥认证两种方式,可以处理各种密钥格式并安全存储凭证。
- 如何处理长时间运行的命令?
- 该服务器实现了智能阻塞检测,能自动检测并等待阻塞进程。它支持超时设置,并提供强制执行选项。
mcp-ssh 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。