Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Enables AI tools to manage SSH connections, execute commands, transfer files, and perform remote server diagnostics via MCP protocol.

README.md

SSH MCP Server

高效的 SSH 远程运维 MCP 服务。让 AI 工具通过 MCP 协议管理 SSH 连接、执行命令、传输文件。

功能

| Tool | 说明 | |------|------| | ssh_connect | 建立 SSH 连接(支持跳板机) | | ssh_disconnect | 断开连接 | | ssh_exec | 执行单条命令 | | ssh_exec_script | 执行多行脚本 | | sftp_read | 读取远程文件 | | sftp_write | 写入远程文件 | | sftp_list | 列出远程目录 | | ssh_status | 查看所有连接状态 | | ssh_history | 查询操作历史日志 | | ssh_analyze | 一键诊断远程服务器 | | ssh_logs | 日志查询与增量监控(file/journalctl/docker) | | ssh_host_add | 保存服务器配置(支持备注和标签) | | ssh_host_remove | 删除已保存的服务器 | | ssh_host_list | 列出所有已保存的服务器 | | ssh_host_update | 更新服务器备注/标签(AI 知识积累) |

核心特性

  • 连接池管理 — 持久化连接,避免重复建连
  • 跳板机支持 — 通过 jump host 连接内网服务器
  • 多认证方式 — 密码 / 私钥
  • SFTP 文件操作 — 读写文件、浏览目录
  • 空闲超时清理 — 30 分钟无活动自动断开
  • 多行脚本执行 — 通过 bash -s 执行复杂脚本
  • 持久化操作日志 — 所有操作记录到 ~/.ssh-mcp/logs/operations.jsonl,支持 AI 溯源
  • 一键服务器诊断 — 系统信息、资源、网络、Docker、GPU 全面检查

安装

npm install -g @honwee/ssh-mcp-server

或者直接通过 npx 使用(无需全局安装):

npx @honwee/ssh-mcp-server

配置

Claude Desktop

编辑 ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "ssh": {
      "command": "npx",
      "args": ["-y", "@honwee/ssh-mcp-server"]
    }
  }
}

Cursor

在 Cursor Settings → MCP 中添加:

{
  "mcpServers": {
    "ssh": {
      "command": "npx",
      "args": ["-y", "@honwee/ssh-mcp-server"]
    }
  }
}

Gemini CLI / Antigravity

settings.json 中添加:

{
  "mcpServers": {
    "ssh": {
      "command": "npx",
      "args": ["-y", "@honwee/ssh-mcp-server"]
    }
  }
}

使用示例

直连服务器

1. ssh_connect(host="192.168.1.100", username="root", password="xxx", alias="web-server")
2. ssh_exec(connectionId="web-server", command="uptime")
3. ssh_exec(connectionId="web-server", command="df -h")
4. sftp_list(connectionId="web-server", remotePath="/var/log")
5. sftp_read(connectionId="web-server", remotePath="/etc/nginx/nginx.conf")
6. ssh_disconnect(connectionId="web-server")

通过跳板机连接

ssh_connect(
  host="10.0.0.50",
  username="deploy",
  privateKey="-----BEGIN OPENSSH PRIVATE KEY-----\n...",
  alias="internal-db",
  jumpHost={
    host="bastion.example.com",
    username="admin",
    password="xxx"
  }
)

执行多行脚本

ssh_exec_script(
  connectionId="web-server",
  script="#!/bin/bash\necho '--- Disk Usage ---'\ndf -h\necho '--- Memory ---'\nfree -h\necho '--- Top Processes ---'\nps aux --sort=-%mem | head -10"
)

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Files & Docs servers.