Skip to main content
Glama

SSH MCP Server

让 AI 客户端安全地操作你的服务器 —— 基于 SSH 的 MCP 服务器

通过标准化 MCP 工具在远端执行命令与传输文件,内置 Web 管理台与 Windows 托盘应用。

Release CI/CD License: ISC

它能做什么

把 Claude Code、Cursor 等支持 MCP 协议的 AI 客户端连到你的 SSH 服务器上,AI 就可以:

  • ⚙️ 执行命令 —— 远程运维、日志排查、服务管理

  • 📤 上传 / 📥 下载文件 —— 配置分发、日志拉取、大文件断点续传

  • 🖥️ 多机管理 —— 项目 → 环境 → 主机三级树,一次配置处处可用

两种使用形态,按需选择:

形态

适合场景

CLI / npm 包

作为 stdio MCP Server 挂给任意 MCP 客户端,轻量即用

Windows 桌面应用(推荐)

纯托盘常驻 + 内置 Web 管理台 + 在线自更新,零 Node.js 环境

Related MCP server: sshops

✨ 核心特性

连接能力

  • 🔐 多种认证:密码 / 私钥(含加密私钥)/ SSH Agent / 键盘交互式 2FA

  • 🔗 SOCKS5 与 HTTP(S) 代理,穿透跳板网络

  • 🚄 双传输模式:

    • exec —— 每命令一通道,标准 Linux 主机

    • shell —— 持久会话 + 标记协议,适配堡垒机 / 跳板机

  • ⏱️ 连接 / 命令 / SFTP 三级超时独立可控;大文件走 fastPut/fastGet 分片并发

安全策略

  • 命令白名单 / 黑名单(正则),主机级与全局级双层过滤

  • 本地与远端路径白名单,约束文件传输范围

  • 全量审计日志:命令、输出、传输记录可追溯

Web 管理台

  • 项目-环境-主机三级可视化管理,连接拖拽排序

  • 测试连接、JSON 批量导入导出、~/.ssh/config 自动复用

  • 定时备份快照与一键恢复;MCP 客户端(Claude Code 等)一键注册

  • 明暗双主题,跟随系统切换

Windows 桌面应用

  • 🎯 纯托盘单 exe:SSH 服务、MCP Server、Admin 静态站点全部内嵌,无 Node.js 依赖

  • 开机自启、关机驻留;「打开管理页」直达系统默认浏览器

  • 🔄 在线自更新:内置 minisign 验签,自动检测新版本静默升级

📸 界面一览

连接管理 —— 三级树管理全部主机:

系统页 —— 服务状态与 MCP 客户端一键注册:

🚀 快速开始

方式一:Windows 桌面应用

Releases 下载 SSH-MCP-Server_x.x.x_x64-setup.exe 安装。启动后驻留系统托盘,托盘菜单「打开管理页」进入 Web 控制台。

已安装用户后续升级自动完成,无需手动操作。

方式二:npm 包(stdio MCP Server)

# 全局安装
npm install -g @sieop/ssh-mcp-server

在 MCP 客户端中注册(以 Claude Code 为例):

claude mcp add ssh-server -- ssh-mcp-server --host your.server.com --username root --password YOUR_PWD

或直接写 JSON 配置:

{
  "mcpServers": {
    "ssh-server": {
      "command": "npx",
      "args": ["-y", "@sieop/ssh-mcp-server", "--host", "your.server.com", "--username", "root", "--password", "YOUR_PWD"]
    }
  }
}

也支持配置文件与多连接模式,详见 docs/migration.md 与 CLI 帮助(--help)。

方式三:源码构建

git clone https://github.com/SIE-Operations-and-Maintenance-Team/ssh-mcp-server.git
cd ssh-mcp-server && npm install

npm run build                 # 构建 Node 版
npm test                      # 运行测试
npm --prefix admin-web install && npm --prefix admin-web run build   # 构建管理台前端
npm run tauri:build           # 构建 Windows 桌面应用(需 Rust 工具链)

🧰 MCP 工具一览

工具

说明

execute-command

远程执行命令,支持目录切换、超时与输出限制,受白/黑名单约束

upload / download

SFTP 文件传输,大文件分片并发,路径白名单校验

list-servers

列出所有可用连接

🏗️ 架构

┌─ Windows 桌面应用(Tauri 2 纯托盘单 exe)──────────────────┐
│                                                            │
│  SSH 连接池 ── MCP StreamableHTTP (/mcp)                   │
│      │                                                     │
│  Admin API (/admin/api/*) ── 内嵌静态站点 (/admin/)        │
│                                                            │
└────────────────── 系统默认浏览器打开管理页 ────────────────┘

Node 版(npm 包):stdio MCP Server + 可选 --admin 启动同一套 Web 管理台

关键模块:src/services/ssh-connection-manager.ts(SSH 核心)、src/server/(Fastify Admin 服务)、src-tauri/(Rust 桌面壳)、admin-web/(React 管理台)。

📋 更多文档

📄 许可证

ISC © SIE Operations and Maintenance Team

本项目源自 classfang/ssh-mcp-server,在其基础上重构与扩展。

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables remote SSH command execution and bidirectional file transfers through a standardized interface. It allows AI assistants to securely manage remote servers while keeping credentials isolated and applying command-level security controls.
    ISC
  • A
    license
    Not graded
    quality
    C
    maintenance
    A lightweight, zero-agent SSH operations tool that enables remote command execution, file transfer, and audit logging. It integrates as an MCP server for AI-driven infrastructure management.
    26
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that gives AI agents SSH capabilities to execute commands, transfer files, and inspect remote systems through a preconfigured host list.
    43
    MIT

View all related MCP servers

Related MCP Connectors

  • Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.

  • Connect MCP clients to 2,000+ AI models without managing provider API keys.

  • MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SIE-Operations-and-Maintenance-Team/ssh-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server