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 分

    請在儲存庫或註冊中心條目中宣告授權條款。