MCP Servers

模型上下文协议服务器、框架、SDK 和模板的综合目录。

MCP server for SSH operations using mcp-go and goph

创建于 12/20/2025
更新于 2 days ago
Repository documentation and setup instructions

ssh-mcp-go

MCP server for SSH operations built with:

  • https://github.com/mark3labs/mcp-go
  • https://github.com/melbahja/goph

It exposes three tools over stdio:

  • ssh_exec: run a remote command and return output
  • ssh_upload: upload a local file or directory to remote
  • ssh_download: download a remote file or directory to local

Requirements

  • Go 1.20+ (recommended)
  • An SSH server you can reach

Environment Variables

  • SSH_SERVER (required): user@host or host
  • SSH_PORT (optional, default 22)
  • SSH_KEY (optional): path to private key
  • SSH_PASSPHRASE or SSH_KEY_PASSPHRASE (optional): private key passphrase
  • SSH_PASSWORD (optional): password auth (also used for keyboard-interactive)
  • SSH_USER (optional): username when SSH_SERVER does not include user@

Auth priority is simple: if SSH_KEY is set, its key auth is included; if SSH_PASSWORD is set, password auth is included. At least one must be provided.

Build

go build -o ssh-mcp-go .

Run (stdio)

SSH_SERVER=user@host \
SSH_PORT=22 \
SSH_KEY=~/.ssh/id_rsa \
SSH_PASSPHRASE=your_passphrase \
./ssh-mcp-go

Tool Usage (example)

From an MCP client, call tools with the following arguments:

  • ssh_exec
    • command (string)
  • ssh_upload
    • local_path (string)
    • remote_path (string)
  • ssh_download
    • remote_path (string)
    • local_path (string)

Notes

  • Host key verification is not enforced (uses InsecureIgnoreHostKey).
  • Directory transfers are recursive.
快速设置
此服务器的安装指南

安装命令 (包未发布)

git clone https://github.com/FrontMage/ssh-mcp-go
手动安装: 请查看 README 获取详细的设置说明和所需的其他依赖项。

Cursor 配置 (mcp.json)

{ "mcpServers": { "frontmage-ssh-mcp-go": { "command": "git", "args": [ "clone", "https://github.com/FrontMage/ssh-mcp-go" ] } } }