sshmcp
v1.2.1SSH server management with zero-token SFTP file transfer and SOCKS proxy support
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_servers
列出所有已配置的服务器
get_server
查看单台服务器的配置详情
| Parameter | Type | Description |
|---|---|---|
server_id * | string | 服务器ID |
connect
连接到已配置的服务器
| Parameter | Type | Description |
|---|---|---|
server_id * | string | 服务器ID |
quick_connect
临时连接服务器(不保存配置,用完即走)
| Parameter | Type | Description |
|---|---|---|
host * | string | IP 地址或域名 |
username * | string | SSH 用户名 |
password | string | SSH 密码 |
port | integer | SSH 端口,默认 22 |
private_key | string | 私钥文件路径 |
disconnect
断开当前连接
test_connection
测试服务器连通性(不影响当前连接)
| Parameter | Type | Description |
|---|---|---|
server_id * | string | 服务器ID |
execute
在远程服务器执行 shell 命令
| Parameter | Type | Description |
|---|---|---|
command * | string | 要执行的命令 |
timeout | integer | 超时秒数,默认 30 |
write_file
将内容写入远程文件(覆盖写入)
| Parameter | Type | Description |
|---|---|---|
content * | string | 要写入的文本内容 |
remote_path * | string | 远程文件路径 |
upload_file
上传本地文件到远程服务器(路径直传,不占 Token)
| Parameter | Type | Description |
|---|---|---|
local_path * | string | 本地文件绝对路径 |
remote_path * | string | 远程目标路径 |
upload_directory
上传本地目录到远程服务器(自动压缩传输再解压,高效传输大量文件)
| Parameter | Type | Description |
|---|---|---|
local_path * | string | 本地目录绝对路径 |
remote_path * | string | 远程目标路径 |
download_file
从远程服务器下载文件到本地
| Parameter | Type | Description |
|---|---|---|
remote_path * | string | 远程文件路径 |
local_path | string | 本地保存路径,留空则保存到当前目录 |
add_server
添加或更新服务器配置
| Parameter | Type | Description |
|---|---|---|
host * | string | IP 地址或域名 |
name * | string | 服务器名称 |
server_id * | string | 服务器ID(唯一标识) |
username * | string | SSH 用户名 |
jump_host | string | 跳板机服务器ID(ProxyJump) |
keyboard_interactive | boolean | 启用键盘交互式认证(OTP/2FA) |
passphrase | string | 私钥密码短语 |
password | string | SSH 密码 |
port | integer | SSH 端口,默认 22 |
private_key | string | 私钥文件路径(文件必须存在) |
private_key_content | string | 私钥内容字符串(优先于 private_key) |
proxy | string | SOCKS5/4 代理预设ID,留空直连 |
use_agent | boolean | 使用系统 ssh-agent |
delete_server
删除服务器配置
| Parameter | Type | Description |
|---|---|---|
server_id * | string | 服务器ID |
list_proxies
列出所有已配置的 SOCKS 代理
add_proxy
添加或更新 SOCKS 代理预设
| Parameter | Type | Description |
|---|---|---|
host * | string | 代理服务器地址 |
name * | string | 代理名称 |
port * | integer | 代理端口 |
proxy_id * | string | 代理ID(唯一标识) |
password | string | 认证密码(可选) |
type | string | SOCKS 版本,4 或 5,默认 5 |
username | string | 认证用户名(可选) |
delete_proxy
删除代理预设
| Parameter | Type | Description |
|---|---|---|
proxy_id * | string | 代理ID |