Sshmcp

io.github.NikolaNddTesla由 GitHub 账号 NikolaNddTesla 发布v1.2.1更新于 Oct 24, 2026

SSH server management with zero-token SFTP file transfer and SOCKS proxy support

概览

AI 生成的概览

让 AI 助手通过 SSH 管理远程服务器:执行命令、传输文件,并同时操作多台主机。

可以做什么
管理连接配置:列出、新增、修改、删除、重命名服务器,并测试连接或快速建立临时连接。在远程主机执行 shell 命令,可设置超时。读写远程文件,上传或下载单个文件与整个目录,并查询异步传输进度。管理 SOCKS4/5 代理预设。以连接池同时操作多台服务器,每项操作通过 server_id 指定目标。
适用场景
适合想用自然语言操作远程 Linux 服务器时使用,例如执行命令、部署构建、上传或下载文件,以及同时管理多台主机。需要经跳板机或 SOCKS 代理连接时也可使用。
运行要求
本机需安装 Node.js 18 或更高版本,并以 npm 包方式运行;需要兼容 MCP 的客户端,以及可 SSH 连接的远程服务器。连接时需提供主机地址、用户名,以及密码、私钥、ssh-agent 或 OTP 等验证方式。
安装前请注意
服务器与代理配置保存在用户主目录下的配置文件,密码以明文存储,生产环境建议改用私钥验证。助手可执行任意远程 shell 命令并写入、覆盖或删除远程文件,误操作可能影响生产系统。连接凭据与私钥路径会提供给本机服务器,请确认其可信。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Sshmcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@nl4ever/sshmcp

[npm version] [MCP Registry] [License: MIT]

中文文档

Let AI manage your remote servers. A Model Context Protocol (MCP) server that gives AI assistants full SSH access — execute commands, transfer files, manage multiple servers simultaneously, all through natural conversation.

You:   "Deploy the latest build to production server"AI:    connects → uploads build → restarts service → verifies status

Features

  • 21 Tools — Connect, execute, upload, download, write files, and more
  • Connection Pool — Operate multiple servers simultaneously, each command tagged with server_id
  • Zero-Token File Transfer — SFTP path-based transfer, file content never enters AI context
  • Directory Upload — Auto tar.gz compress → upload → remote decompress (fast for many small files)
  • Async Transfer + Progress — Background transfer for large files with real-time progress tracking
  • Quick Connect — Temporary connections without saving config, returns host:port as temp ID
  • SOCKS4/5 Proxy — Per-connection proxy support
  • Jump Host — SSH ProxyJump for bastion/gateway access
  • Multi-Auth — Password, private key, ssh-agent, keyboard-interactive (OTP/2FA)

Quick Start

Install globally

bash
npm install -g @nl4ever/sshmcp

Add to Claude Code

bash
claude mcp add sshmcp sshmcp

Add to Claude Desktop

Edit claude_desktop_config.json:

json
{  "mcpServers": {    "sshmcp": {      "command": "npx",      "args": ["-y", "@nl4ever/sshmcp"]    }  }}

Add to Cursor

Go to Settings → MCP Servers → Add:

json
{  "sshmcp": {    "command": "npx",    "args": ["-y", "@nl4ever/sshmcp"]  }}

Tools Overview

Connection Management

ToolDescription
list_serversList all configured servers and active connections
get_serverView server config details
add_serverAdd/update server config (password, key, agent, OTP)
update_serverModify server config (only pass fields you want to change)
delete_serverRemove a server
rename_serverRename a server ID
connectManually connect (usually not needed, tools auto-connect)
quick_connectTemporary connection, returns host:port as ID
disconnectDisconnect specific server or all connections
test_connectionTest connectivity without affecting existing connections

Command Execution

ToolDescription
executeRun shell commands on remote server (with configurable timeout)

File Operations

ToolDescription
read_fileRead remote file content (with optional line range)
write_fileWrite text content to remote file
upload_fileUpload local file to remote (supports async mode)
upload_directoryUpload directory with auto compress → transfer → decompress
download_fileDownload remote file to local (supports async mode)
download_directoryDownload directory with remote compress → transfer → local decompress
transfer_statusCheck progress of async transfers (size/speed/ETA)

Proxy Management

ToolDescription
list_proxiesList all SOCKS proxy presets
add_proxyAdd SOCKS4/5 proxy preset
delete_proxyRemove a proxy preset

Connection Pool: Multi-Server Operations

All operation tools take a server_id parameter. The connection pool auto-manages connections — no manual connect/disconnect needed:

AI: execute(server_id="prod", command="nginx -s reload")         ← auto-connects to prodAI: execute(server_id="dev", command="tail -f /var/log/app.log") ← auto-connects to dev, prod staysAI: execute(server_id="prod", command="curl localhost")           ← reuses prod connection

For temporary servers, use quick_connect which returns host:port as the ID:

AI: quick_connect(host="1.2.3.4", username="root", password="***")→ "Connected: [email protected]:22, use server_id="1.2.3.4:22""
AI: execute(server_id="1.2.3.4:22", command="df -h")AI: disconnect(server_id="1.2.3.4:22")

Async Transfer (Large Files)

For large files, enable background transfer mode to avoid blocking:

AI: upload_file(server_id="prod", local_path="big.tar.gz", remote_path="/data/", async_transfer=true)→ "Background upload started: tf_1"
AI: transfer_status("tf_1")→ "🔄 Uploading: 638.2 MB / 1.2 GB (53.2%) — 12.4 MB/s, ETA 46s"
AI: transfer_status("tf_1")→ "✅ Upload complete: 1.2 GB, 98s, 12.3 MB/s"

Small files use synchronous mode by default — no config needed.

Connection Examples

Password authentication

AI: add_server(server_id="prod", name="Production", host="10.0.0.1", username="deploy", password="***")AI: execute(server_id="prod", command="systemctl status nginx")

Private key authentication

AI: add_server(server_id="aws", name="AWS EC2", host="ec2-xx.compute.amazonaws.com", username="ubuntu", private_key="~/.ssh/id_rsa")

Quick connect (no config saved)

AI: quick_connect(host="192.168.1.100", username="root", password="***")→ server_id="192.168.1.100:22"
AI: execute(server_id="192.168.1.100:22", command="df -h")AI: disconnect(server_id="192.168.1.100:22")

Via SOCKS5 proxy

AI: add_proxy(proxy_id="tunnel", name="SSH Tunnel", host="127.0.0.1", port=1080, type="5")AI: add_server(server_id="internal", ..., proxy="tunnel")

Via jump host

AI: add_server(server_id="bastion", name="Bastion", host="bastion.example.com", username="admin", private_key="~/.ssh/id_rsa")AI: add_server(server_id="internal", name="Internal DB", host="10.0.0.5", username="dbadmin", password="***", jump_host="bastion")

Config Location

Server and proxy configurations are stored in:

~/.ssh-mcp/config.json

Passwords are stored in plaintext. For production use, prefer private key authentication.

Requirements

  • Node.js >= 18
  • An MCP-compatible client (Claude Code, Claude Desktop, Cursor, etc.)
  • Remote server with SSH access

License

MIT

来源:README.md,提交 88bb44e

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.2.1最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。