SSH MCP Server - Manage SSH connections through MCP protocol with GUI config panel
Project description
SSH MCP Server
一个带 GUI 配置面板的 SSH MCP Server,支持多服务器管理,一键安装到主流 AI IDE。
功能
- 多服务器管理 - 可配置多个 SSH 服务器连接
- 认证方式 - 支持密码认证和密钥对认证
- GUI 配置面板 -
sshgui一键启动,可视化管理服务器 - 多选工作集 + 显式目标 - 保留单个
sshMCP,GUI 可多选一组服务器,未指定目标时走已选集合首台 - 一键安装 - GUI 内置安装到 Windsurf / Cursor / Claude Code / Codex
- MCP 协议 - 通过 stdio 提供 MCP 工具,供 AI 助手调用
- 并发更稳 - 长命令不会再阻塞其他 MCP 工具调用
- 真实超时 -
exec_command.timeout现在按命令执行总时长生效
安装
# pip 安装(推荐)
pip install sshmcp-r
# 或 uv 安装
uv pip install sshmcp-r
安装后即可使用 sshmcp 命令。
命令一览
| 命令 | 说明 |
|---|---|
sshmcp |
以 MCP Server 模式运行(IDE 自动调用) |
sshgui |
启动 GUI 配置面板 |
sshmcp-install |
一键安装到所有 IDE |
sshmcp-install-windsurf |
安装到 Windsurf |
sshmcp-install-cursor |
安装到 Cursor |
sshmcp-install-claudecode |
安装到 Claude Code |
sshmcp-install-codex |
安装到 Codex |
快速开始
# 1. 安装
pip install sshmcp-r
# 2. 一键安装到你的 IDE(自动写入 MCP 配置)
sshmcp-install-windsurf # 或 cursor / claudecode / codex
sshmcp-install # 安装到全部 IDE
# 3. 打开 GUI 管理 SSH 服务器
sshgui
# 4. 重启 IDE,即可在 AI 对话中使用 SSH 工具
一键安装到 IDE
命令行方式:
sshmcp-install # 安装到所有 IDE
sshmcp-install-windsurf # 仅安装到 Windsurf
sshmcp-install-cursor # 仅安装到 Cursor
sshmcp-install-claudecode # 仅安装到 Claude Code
sshmcp-install-codex # 仅安装到 Codex
GUI 方式: 运行 sshgui,点击工具栏 「安装到 IDE ▾」 按钮,选择目标 IDE。
安装会自动写入 MCP 配置到对应文件:
- Windsurf →
~/.codeium/windsurf/mcp_config.json - Cursor →
~/.cursor/mcp.json - Claude Code →
~/.claude.json - Codex →
~/.codex/config.toml
MCP Tools
| Tool | 说明 |
|---|---|
list_servers |
列出 GUI 当前多选的服务器集合,并标记默认回退服务器/当前连接 |
connect |
连接到指定服务器 |
disconnect |
断开当前连接 |
get_status |
获取当前连接状态 |
exec_command |
在远程服务器执行命令,可选 server_id / server_name |
upload_file |
上传文件到远程服务器,可选 server_id / server_name |
download_file |
从远程服务器下载文件,可选 server_id / server_name |
write_remote_file |
将文本内容写入远程文件,可选 server_id / server_name |
read_remote_file |
读取远程文件内容,可选 server_id / server_name |
list_remote_dir |
列出远程目录内容,可选 server_id / server_name |
多选服务器与迁移
- GUI 中可多选一组服务器,
list_servers只返回这组,不返回全部已配置服务器。 - 已选集合中的首台服务器会作为未显式传参时的默认回退目标。
- 做迁移、比对、双机操作时,仍建议在工具调用中直接传
server_id或server_name,避免依赖回退顺序。
示例:
{
"name": "exec_command",
"arguments": {
"server_name": "old-prod",
"command": "cat /etc/nginx/nginx.conf"
}
}
{
"name": "upload_file",
"arguments": {
"server_name": "new-prod",
"local_path": "D:\\temp\\nginx.conf",
"remote_path": "/etc/nginx/nginx.conf"
}
}
手动配置
也可手动添加到 IDE 的 MCP 配置文件:
{
"mcpServers": {
"ssh": {
"command": "sshmcp"
}
}
}
打包为 exe
pip install pyinstaller
pyinstaller build.spec
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sshmcp_r-1.0.6.tar.gz
(19.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
sshmcp_r-1.0.6-py3-none-any.whl
(20.1 kB
view details)
File details
Details for the file sshmcp_r-1.0.6.tar.gz.
File metadata
- Download URL: sshmcp_r-1.0.6.tar.gz
- Upload date:
- Size: 19.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59bdfb9f483143d2130a67624a8d0f166b22dec883fedd7e486ace4153684ddb
|
|
| MD5 |
e020b64aee3f0b9b76490463f1a8893b
|
|
| BLAKE2b-256 |
b18dbcd86d95bfc082df364e7b6b199bceb1c315837a1b6f03897d36e0ee78f6
|
File details
Details for the file sshmcp_r-1.0.6-py3-none-any.whl.
File metadata
- Download URL: sshmcp_r-1.0.6-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19f276e1c85d9332b3c7aa76e9d2d99cf6d147ec0e68d1ae3e64c03efe111458
|
|
| MD5 |
448a262b85b19d7befd4584ab14d16d4
|
|
| BLAKE2b-256 |
2b6090a629fb6e681cbe5002985fefde926a1804dbfb45f06ffd4c28f487350f
|