mcp-ssh
Manage Docker containers on remote hosts: view, start, stop, restart containers, and check resource usage.
Execute Git commands like git pull on remote servers for deployment and version control.
Inspect Kubernetes cluster nodes and host resource usage for container orchestration.
Comprehensive remote Linux server management including system monitoring, process management, file operations, and diagnostics.
Manage MySQL service: start, stop, restart, check status, and perform database operations via commands.
Manage NGINX web server: restart, reload, check status, and edit configuration files.
Manage Redis service: start, stop, restart, and check status.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-ssh check system status and show CPU, memory, and disk usage"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SSH MCP Server
基于 Model Context Protocol (MCP) 的远程 Linux/Unix 服务器管理服务,让 AI 助手通过自然语言即可完成服务器运维、诊断、文件操作等全套任务。
English | 中文
目录
Related MCP server: mcp-ssh-multi
功能概览
功能模块 | 说明 |
连接管理 | 多主机配置、连接测试、自动重连 |
命令执行 | 执行单条命令或多行脚本,支持任意 Shell 解释器 |
系统信息 | CPU、内存、磁盘、网络、系统日志一键采集 |
服务管理 | systemd 服务的启停、重启、状态查看 |
进程管理 | 进程列表、搜索、终止信号发送 |
文件操作 | 读写、追加、列目录、搜索、正则内容匹配 |
文件传输 | SFTP 上传/下载、元信息查询 |
系统诊断 | 磁盘健康、高负载分析、网络连通性、安全审计、日志分析 |
应用场景
日常运维
一句话查服务器状态:「帮我看一下服务器现在的系统情况」,AI 立即返回 CPU、内存、磁盘、负载汇总。
服务快速管理:「重启 nginx」、「查看 mysql 服务状态」、「把 redis 设为开机自启」。
批量服务器巡检:配置多台主机,逐一采集系统信息生成巡检报告。
故障排查
高负载排查:「服务器 CPU 跑满了,帮我看看是什么进程」,AI 自动分析 top 进程并给出建议。
OOM 内存溢出排查:查看 dmesg OOM 事件、内存占用最高进程,快速定位问题。
磁盘爆满告警:「磁盘快满了」,AI 检查各分区使用率、inode 占用并找出大文件。
网络异常诊断:测试出站连通性、DNS 解析、路由表,定位网络层问题。
日志快速分析:「分析一下 /var/log/app.log 的错误」,AI 统计 ERROR/WARN/CRITICAL 数量并给出近期错误样本。
安全审计
登录异常检测:统计 SSH 暴力破解失败次数,查看近期登录记录。
端口安全扫描:列出所有监听端口及关联进程,发现可疑开放端口。
SUID 文件检查:扫描系统中 SUID 提权文件,识别潜在安全风险。
世界可写文件:检查 /tmp、/var/tmp 等目录中的高危权限文件。
文件与配置管理
远程配置热改:直接读取并修改
/etc/nginx/nginx.conf、/etc/hosts等配置文件,无需手动 SSH 登录。日志实时查尾:「看一下 nginx 最近 100 行错误日志」,即时返回结果。
配置文件批量下发:将本地修改好的配置文件通过 SFTP 上传到多台服务器。
跨服务器文件同步:下载远程文件到本地后,再上传到其他服务器。
自动化脚本执行
执行复杂运维脚本:发送多行 Bash/Python 脚本到远程服务器执行,支持任意 Shell 解释器。
数据库备份:在远端执行
mysqldump/pg_dump并将备份文件下载到本地。定时任务检查:查看 crontab 配置,确认定时任务是否正确配置并运行。
应用部署辅助:远程
git pull、重建容器、重启服务,完成一键部署流程。
多环境管理
开发/测试/生产环境并行管理:通过
SSH_HOSTS_JSON配置多台服务器,按名称切换,一次会话管理所有环境。容器宿主机管理:查看 Docker/Kubernetes 宿主机的资源使用,辅助容器调度决策。
云服务器集群巡检:批量连接 ECS/EC2 实例,汇总各节点状态。
环境要求
Python 3.10+
uv(推荐)或 pip目标服务器:Linux / Unix(支持 systemd 的发行版效果最佳)
安装方式
方式一:uvx 直接运行(无需安装)
uvx ssh-mcp-zlzero --host 192.168.1.100 --username admin --key-file ~/.ssh/id_rsa方式二:pip 安装
pip install ssh-mcp-zlzero
ssh-mcp-zlzero --host 192.168.1.100 --username admin --key-file ~/.ssh/id_rsa方式三:源码安装(开发调试)
git clone https://github.com/zhouxiangjing/mcp-ssh.git
cd mcp-ssh
uv pip install -e ".[dev]"配置说明
环境变量
变量名 | 默认值 | 说明 |
|
| 远程主机 IP 或域名 |
|
| SSH 端口 |
|
| SSH 用户名 |
| — | 密码(使用密钥认证时可省略) |
| — | 私钥路径,如 |
| — | 加密私钥的口令 |
|
| 连接超时秒数 |
|
| 跳过主机密钥校验(生产环境不推荐) |
|
| 自定义 known_hosts 路径 |
| — | 多主机 JSON 配置(见下方) |
|
| 日志级别: |
将 .env.example 复制为 .env 并填写配置,服务器启动时会自动加载。
CLI 参数
所有环境变量均可通过 CLI 参数覆盖:
ssh-mcp-zlzero \
--host 192.168.1.100 \
--port 22 \
--username admin \
--key-file ~/.ssh/id_rsa \
--timeout 60运行 ssh-mcp-zlzero --help 查看完整参数列表。
多主机配置
通过 SSH_HOSTS_JSON 管理多台服务器,工具调用时传入 host_name 参数即可切换目标主机,省略时使用默认主机:
export SSH_HOSTS_JSON='[
{"name": "web", "host": "10.0.0.1", "port": 22, "username": "admin", "key_file": "~/.ssh/web_key"},
{"name": "db", "host": "10.0.0.2", "port": 22, "username": "root", "password": "secret"},
{"name": "edge", "host": "10.0.0.3", "port": 2222, "username": "ops", "key_file": "~/.ssh/edge_key"},
{"name": "dev", "host": "10.0.0.4", "port": 22, "username": "dev", "key_file": "~/.ssh/id_rsa"},
{"name": "prod", "host": "10.0.0.5", "port": 22, "username": "admin", "key_file": "~/.ssh/prod_key"}
]'MCP 客户端接入
Claude Desktop
在 claude_desktop_config.json 中添加:
{
"mcpServers": {
"ssh": {
"command": "uvx",
"args": ["ssh-mcp-zlzero"],
"env": {
"SSH_HOST": "192.168.1.100",
"SSH_USERNAME": "admin",
"SSH_KEY_FILE": "~/.ssh/id_rsa"
}
}
}
}Cursor / 其他 MCP 客户端
{
"mcpServers": {
"ssh": {
"command": "uvx",
"args": ["ssh-mcp-zlzero"],
"env": {
"SSH_HOST": "your-server-ip",
"SSH_USERNAME": "your-username",
"SSH_KEY_FILE": "~/.ssh/id_rsa"
}
}
}
}DeepV Code
在 ~/.deepv/settings.json 的 mcpServers 中添加:
{
"ssh": {
"command": "uvx",
"args": ["--from", "ssh-mcp-zlzero", "ssh-mcp-zlzero"],
"env": {
"SSH_HOST": "your-server-ip",
"SSH_USERNAME": "your-username",
"SSH_PASSWORD": "your-password",
"SSH_IGNORE_KNOWN_HOSTS": "true"
}
}
}多主机示例(生产/测试/开发环境并行):
{
"ssh": {
"command": "uvx",
"args": ["--from", "ssh-mcp-zlzero", "ssh-mcp-zlzero"],
"env": {
"SSH_HOSTS_JSON": "[{\"name\":\"prod\",\"host\":\"10.0.0.1\",\"username\":\"admin\",\"key_file\":\"~/.ssh/prod_key\"},{\"name\":\"dev\",\"host\":\"10.0.0.2\",\"username\":\"dev\",\"key_file\":\"~/.ssh/id_rsa\"}]"
}
}
}工具列表
连接管理
工具 | 说明 |
| 验证 SSH 连接,返回主机名、当前用户、系统负载 |
| 列出 |
| 关闭指定主机的 SSH 连接(下次调用自动重连) |
| 关闭所有活跃的 SSH 连接 |
命令执行
工具 | 说明 |
| 执行单条 Shell 命令,返回 stdout/stderr 及退出码 |
| 执行多行脚本,支持 |
系统信息
工具 | 说明 |
| 一键采集主机名、OS、内核、负载、CPU、内存、磁盘、网络接口 |
| CPU 实时负载、各核使用率、top CPU 进程 |
| 内存与 Swap 使用详情(free/used/cached/available) |
| 各分区磁盘使用率、inode 占用、I/O 统计 |
| 网络接口详情、路由表、活跃连接列表 |
| 读取 journald / syslog 日志,支持按服务过滤 |
| 查看 systemd 服务状态(active/inactive/failed) |
| 启动/停止/重启/重载/启用/禁用 systemd 服务 |
进程管理
工具 | 参数说明 |
| 按 CPU / 内存 / PID 排序列出进程,默认显示 20 条 |
| 按名称或关键字搜索进程,返回 PID 及详情 |
| 向指定 PID 发送信号: |
| 列出所有 TCP/UDP 监听端口及关联进程 |
文件操作
工具 | 说明 |
| 读取远程文件内容,支持 |
| 覆盖写入远程文件,自动创建父目录 |
| 追加内容到远程文件末尾 |
| 列出远程目录(等价于 |
| 删除文件或目录, |
| 按文件名模式在目录树中搜索,支持 |
| 在远程文件中正则搜索,支持递归、忽略大小写、上下文行数 |
SFTP 文件传输
工具 | 说明 |
| 将本地文件通过 SFTP 上传到远程服务器,返回传输字节数 |
| 将远程文件下载到本地,自动创建本地目录 |
| 查询远程文件元信息:大小、权限、UID/GID、修改时间 |
系统诊断
工具 | 说明 |
| 检查内核磁盘错误日志、失败的 systemd 单元、inode 超 80% 的分区 |
| 分析高负载原因:top CPU/内存进程、OOM 事件记录 |
| 从远程服务器出发测试 ping 和 DNS 解析,诊断出站网络问题 |
| 安全审计:SSH 失败登录、监听端口、SUID 文件、高危权限文件、近期登录记录 |
| 读取日志文件末尾 N 行(默认 50 行) |
| 统计日志中 ERROR / WARN / CRITICAL / Exception 数量,并返回近期错误样本 |
开发指南
环境准备
git clone https://github.com/zhouxiangjing/mcp-ssh.git
cd mcp-ssh
uv pip install -e ".[dev]"运行测试
pytest tests/ -v测试覆盖率
pytest tests/ --cov=src --cov-report=term-missing代码检查与格式化
ruff check src/ tests/
ruff format src/ tests/项目结构
mcp-ssh/
├── src/
│ ├── common/
│ │ ├── config.py # 环境变量与多主机配置解析
│ │ ├── connection.py # SSH 连接池与自动重连
│ │ ├── server.py # MCP Server 实例
│ │ └── utils.py # 公共工具函数
│ └── tools/
│ ├── connection_mgmt.py # 连接管理工具
│ ├── diagnostics.py # 系统诊断工具
│ ├── exec.py # 命令/脚本执行工具
│ ├── file.py # 文件操作工具
│ ├── process.py # 进程管理工具
│ ├── sftp.py # SFTP 传输工具
│ └── system.py # 系统信息采集工具
└── tests/ # 单元测试安全说明
优先使用密钥认证,避免在配置中明文存储密码。
生产环境禁止开启
SSH_IGNORE_KNOWN_HOSTS=true,防止中间人攻击。所有凭据通过环境变量或
.env文件读取,不会硬编码在代码中。.env文件已通过.gitignore排除在版本控制之外。delete_file拒绝删除/、~、.等危险路径。kill_process仅允许发送固定白名单信号:TERM/KILL/HUP/USR1/USR2/INT/QUIT。manage_service仅允许执行白名单操作:start/stop/restart/reload/enable/disable。
免责声明
请在使用本项目前仔细阅读以下声明。使用本项目即表示您已阅读、理解并同意以下所有条款。
风险告知
本项目(SSH MCP Server)通过 AI 模型驱动的自然语言指令对远程服务器执行真实操作,包括但不限于:
执行任意 Shell 命令与脚本
读写、删除远程文件及目录
启停、重启系统服务
终止运行中的进程
通过 SFTP 上传/下载文件
上述操作均为不可逆或难以回滚的真实变更,一旦执行无法撤销。
责任限制
本项目作者及贡献者对以下情形概不负责,亦不承担任何直接、间接、附带、特殊或衍生损失:
AI 模型误解用户意图导致执行了错误命令
误删文件、误停服务、误杀进程造成的数据丢失或业务中断
错误配置导致服务器权限泄露或安全漏洞
在生产环境中未经充分验证直接使用造成的任何后果
凭据(密码、私钥)通过不安全渠道泄露引发的安全事故
因网络中断、SSH 会话异常导致命令执行状态不确定引发的问题
第三方 AI 服务(Claude、GPT 等)产生幻觉或错误推理导致的误操作
推荐安全实践
为将操作风险降至最低,强烈建议遵循以下方案:
1. 最小权限原则
为 MCP 专用的 SSH 账号授予最低必要权限,禁止直接使用 root:
# 创建专用运维账号
useradd -m -s /bin/bash mcp-ops
# 仅允许执行特定命令(通过 sudoers 精细控制)
echo 'mcp-ops ALL=(ALL) NOPASSWD: /bin/systemctl status *, /bin/journalctl *' >> /etc/sudoers.d/mcp-ops
chmod 440 /etc/sudoers.d/mcp-ops2. 生产环境操作前必须备份
# 操作配置文件前先备份
cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak.$(date +%Y%m%d%H%M%S)
# 重要数据目录快照
tar czf /backup/data-$(date +%Y%m%d).tar.gz /var/data/3. 环境隔离策略
环境 | 建议 |
开发环境 | 可直接使用,风险可控 |
测试环境 | 可使用,建议开启操作日志 |
预发布环境 | 只读操作自动执行,写操作需人工二次确认 |
生产环境 | 强烈建议只读模式,所有变更操作须人工审批后执行 |
4. 网络访问控制
# 通过 iptables / firewalld 限制 SSH 来源 IP
firewall-cmd --permanent --add-rich-rule='rule family=ipv4 source address=10.0.0.0/24 service name=ssh accept'
firewall-cmd --permanent --add-rich-rule='rule family=ipv4 service name=ssh drop'
firewall-cmd --reload5. 操作审计日志
# 开启 SSH 会话完整审计(记录所有执行命令)
# 在 /etc/ssh/sshd_config 中添加:
ForceCommand /usr/bin/script -q -f /var/log/ssh-audit/$(date +%Y%m%d-%H%M%S)-$USER.log或使用 auditd 记录所有 execve 系统调用:
audit -a always,exit -F arch=b64 -S execve -k mcp-ops-audit6. 密钥安全管理
为 MCP 配置专用 SSH 密钥对,与个人密钥严格隔离
私钥设置口令(
SSH_KEY_PASSPHRASE),禁止使用无口令裸私钥连接生产服务器定期轮换密钥,离职人员的密钥立即吊销
禁止将密钥或密码提交到代码仓库
7. 高危操作二次确认建议
在使用 AI 执行以下操作时,务必在 AI 给出命令后,先阅读确认再批准执行,切勿一键允许:
任何包含
rm -rf的删除操作systemctl stop/disable关键服务修改
/etc/sudoers、/etc/passwd、/etc/ssh/sshd_config等系统配置涉及防火墙规则变更的命令
数据库清空或 truncate 操作
适用场景声明
本项目适合用于:
个人开发/测试服务器的日常管理
内网受控环境下的运维自动化
学习 MCP 协议与 AI 运维工具集成
只读监控与信息采集场景
本项目不建议直接用于:
无备份机制的生产数据库服务器
金融、医疗等对数据完整性有严格要求的系统
多人共享且无操作审计的服务器环境
License
MIT — 详见 LICENSE。
Available Tools
34 toolsanalyze_log_errorsA
Analyze a log file for error patterns and summarize findings.
Searches for ERROR, WARN, CRITICAL, Exception, and similar keywords.
Args: path: Absolute path to the log file. host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Error/warning summary with counts and recent examples.
Inputs: path (required), host_name. Returns: result
append_fileA
Append content to a remote file.
Args: path: Absolute path to the file. content: Text content to append. host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Success message or error details.
Inputs: path (required), content (required), host_name. Returns: result
check_disk_healthB
Check disk health using SMART data and filesystem errors.
Args: host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Disk health status and any detected errors.
Inputs: host_name. Returns: result
check_high_loadA
Diagnose high CPU/memory load and identify resource hogs.
Args: host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Top resource consumers and system load details.
Inputs: host_name. Returns: result
check_network_connectivityA
Test outbound network connectivity from the remote server.
Args: target: IP or hostname to ping/reach (default "8.8.8.8"). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Ping results and DNS resolution status.
Inputs: target, host_name. Returns: result
check_securityA
Run a basic security audit of the remote server.
Checks for: failed login attempts, listening ports, SUID files, world-writable directories, and recent auth log entries.
Args: host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Security audit report.
Inputs: host_name. Returns: result
check_service_statusA
Check the status of a systemd service.
Args: service: Service name (e.g., "nginx", "mysql", "docker"). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Service status including active state, PID, and recent logs.
Inputs: service (required), host_name. Returns: result
close_all_connectionsA
Close all active SSH connections.
Returns: Confirmation message.
Inputs: no named parameters. Returns: result
close_connectionA
Close the SSH connection to a host.
The connection will be re-established automatically on the next tool call.
Args: host_name: Named host to disconnect; disconnects default host if omitted.
Returns: Confirmation message.
Inputs: host_name. Returns: result
delete_fileA
Delete a file or directory on the remote server.
Args: path: Absolute path to delete. recursive: If True, delete directory and all its contents (use with caution). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Success message or error details.
Inputs: path (required), host_name, recursive. Returns: result
download_fileA
Download a file from the remote server to local via SFTP.
Args: remote_path: Absolute file path on the remote server. local_path: Destination absolute local path (on the machine running this MCP server). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Success message with transferred file size, or error details.
Inputs: local_path (required), remote_path (required), host_name. Returns: result
execute_commandA
Execute a shell command on the remote SSH server.
Runs any shell command and returns stdout + stderr. Suitable for one-off commands, diagnostics, log tailing, service control, etc.
Args: command: The shell command to execute (e.g., "df -h", "systemctl status nginx"). timeout: Maximum seconds to wait for the command to finish (default 60). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Command output (stdout), or combined stdout/stderr on error.
Inputs: command (required), timeout, host_name. Returns: result
execute_scriptA
Execute a multi-line shell script on the remote SSH server.
Uploads the script via stdin and runs it with the specified shell. Useful for multi-step automation, configuration changes, or complex checks.
Args: script: The full script content (multi-line bash/sh/python script). shell: Shell interpreter to use: "bash", "sh", "python3", etc. (default "bash"). timeout: Maximum seconds to wait (default 120). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Script output or error details.
Inputs: script (required), shell, timeout, host_name. Returns: result
find_processA
Search for processes by name or keyword.
Args: name: Process name or keyword to search (e.g., "nginx", "python"). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Matching processes with their PIDs and details.
Inputs: name (required), host_name. Returns: result
get_cpu_infoA
Get detailed CPU usage and statistics.
Returns current CPU load, per-core usage, and top CPU-consuming processes.
Args: host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: CPU usage report.
Inputs: host_name. Returns: result
get_disk_infoA
Get disk usage and I/O statistics.
Args: host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Disk usage per filesystem and I/O stats.
Inputs: host_name. Returns: result
get_file_infoA
Get detailed metadata of a remote file or directory.
Args: path: Absolute path on the remote server. host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: File metadata: size, permissions, owner, modification time.
Inputs: path (required), host_name. Returns: result
get_memory_infoA
Get memory and swap usage details.
Args: host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Memory usage report including free, used, cached, and swap.
Inputs: host_name. Returns: result
get_network_infoA
Get network interface status, connections, and statistics.
Args: host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Network interfaces, active connections, and routing table.
Inputs: host_name. Returns: result
get_open_portsA
List all open listening ports and their associated processes.
Args: host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Listening ports with protocol, port number, and process name.
Inputs: host_name. Returns: result
get_system_logsA
Retrieve system logs from journald or /var/log/syslog.
Args: lines: Number of recent log lines to retrieve (default 100). unit: Optional systemd service name to filter logs (e.g., "nginx", "sshd"). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Recent system log entries.
Inputs: unit, lines, host_name. Returns: result
get_system_overviewA
Get a comprehensive system overview of the remote server.
Collects hostname, OS release, kernel, uptime, CPU, memory, disk, and load average in one call. Best starting point for system analysis.
Args: host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Formatted system overview report.
Inputs: host_name. Returns: result
grep_fileA
Search for a text pattern in remote files.
Args: path: File path or directory to search. pattern: Text or regex pattern to search for. recursive: Search recursively in directories (default False). ignore_case: Case-insensitive search (default True). context_lines: Lines of context around each match (default 2). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Matching lines with file names and line numbers.
Inputs: path (required), pattern (required), host_name, recursive, +2 more. Returns: result
kill_processA
Send a signal to a process by PID.
Args: pid: Process ID to signal. signal: Signal name: "TERM" (graceful, default), "KILL" (force), "HUP" (reload). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Result of the kill command.
Inputs: pid (required), signal, host_name. Returns: result
list_configured_hostsA
List all SSH hosts configured in SSH_HOSTS_JSON.
Returns: Table of configured host names and their connection details.
Inputs: no named parameters. Returns: result
list_directoryA
List files and directories at a remote path.
Args: path: Directory path to list (default "/"). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Directory listing with permissions, size, and modification time.
Inputs: path, host_name. Returns: result
list_processesA
List running processes sorted by resource usage.
Args: sort_by: Sort field: "cpu" (default), "mem", or "pid". limit: Number of processes to show (default 20). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Process list with PID, user, CPU%, MEM%, and command.
Inputs: limit, sort_by, host_name. Returns: result
manage_serviceA
Start, stop, restart, or reload a systemd service.
Args: service: Service name (e.g., "nginx", "mysql", "docker"). action: Action to perform: "start", "stop", "restart", "reload", "enable", "disable". host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Result of the service management action.
Inputs: action (required), service (required), host_name. Returns: result
read_fileA
Read the content of a remote file.
Args: path: Absolute path to the file (e.g., "/etc/nginx/nginx.conf"). max_lines: Maximum number of lines to return (default 200, 0 = unlimited). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: File content as text.
Inputs: path (required), host_name, max_lines. Returns: result
search_filesA
Search for files by name pattern in a remote directory tree.
Args: path: Root directory to search from. pattern: File name pattern (e.g., "*.log", "nginx.conf"). file_type: Filter by type: "file" (f), "dir" (d), or "any" (default). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: List of matching file paths.
Inputs: path (required), pattern (required), file_type, host_name. Returns: result
tail_logA
Tail the end of a remote log file.
Args: path: Absolute path to the log file (e.g., "/var/log/nginx/error.log"). lines: Number of lines to retrieve from the end (default 50). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Last N lines of the log file.
Inputs: path (required), lines, host_name. Returns: result
test_connectionA
Test SSH connectivity to the target host.
Verifies the connection is alive and returns basic server identity.
Args: host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Connection status and remote hostname.
Inputs: host_name. Returns: result
upload_fileA
Upload a local file to the remote server via SFTP.
Args: local_path: Absolute local file path (on the machine running this MCP server). remote_path: Destination absolute path on the remote server. host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Success message with transferred file size, or error details.
Inputs: local_path (required), remote_path (required), host_name. Returns: result
write_fileA
Write content to a remote file (overwrites existing content).
Creates parent directories if they do not exist.
Args: path: Absolute path to the destination file. content: Text content to write. host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Success message or error details.
Inputs: path (required), content (required), host_name. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 34 tools
Most tools are clearly distinct, targeting specific resources and actions (file ops, process ops, system info). However, some overlap exists between diagnostic tools like check_high_load and get_cpu_info/get_memory_info, and between execute_command and execute_script, which could cause agents to select the wrong tool in ambiguous situations.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., read_file, list_processes, get_system_overview, manage_service). Even less conventional names like tail_log and grep_file are still recognizable and fit the pattern.
With 34 tools, this server significantly exceeds the recommended range for a typical MCP server. While the domain is broad, many tools could be consolidated (e.g., get_cpu_info, get_memory_info, get_disk_info could be subsumed into get_system_overview), and the high count introduces unnecessary complexity for agents.
The tool set provides comprehensive coverage of SSH operations: connection management, file transfer and editing, process control, system monitoring, log inspection, service management, and diagnostics. No obvious dead ends or missing CRUD operations exist for the stated purpose.
Maintenance
Related MCP Connectors
Linux server administration over OAuth MCP: shell, Docker, systemd, files and monitoring.
Termalin's hosted MCP server. Claude, ChatGPT or any MCP client runs commands, moves files over SFTP, queries databases and reads server metrics and monitoring alerts on your servers, keylessly through Termalin Connectors: no SSH key is handed over and no inbound port is opened. Per-host command policy and an audit log. Needs a termal.in Pro or Team account (new accounts start with a 14-day Pro trial).
Remote MCP server for managing Muninx tickets, messages, ticket search, and support analytics.
Related MCP Servers
- AlicenseBqualityAmaintenanceAn MCP server for read-only Linux system administration and diagnostics on RHEL-based systems via SSH. It enables users to troubleshoot remote hosts by accessing system information, services, logs, and network configurations through natural language.23757 PyPI319Apache 2.0
- AlicenseAqualityCmaintenanceMCP server for managing multiple SSH servers via AI assistants, offering tools for remote command execution, file operations, and system monitoring.1125 PyPI2MIT
- AlicenseAqualityDmaintenanceMCP server for managing remote servers via SSH, enabling command execution, file transfer, rsync, tunnels, health checks, backups, and database operations.172,541 npm1MIT
- AlicenseBqualityDmaintenanceAn MCP server for managing Ubuntu/Linux systems, enabling AI assistants to execute commands, manage services, files, logs, and packages via local or SSH connection.47MIT