
Server Ops MCP
io.github.GT-dinuo由 GitHub 账号 GT-dinuo 发布v1.0.3更新于 Oct 24, 2026
Server ops MCP: logs, monitoring, code edit, Nginx & certs. Local + SSH, confirmations & redaction.
概览
一个本地 MCP 服务器,让 AI 助手通过本地或 SSH 检查并运维项目或远程服务器:日志、资源、文件、Nginx 与证书。
- 可以做什么
- 检查系统资源:CPU、内存、磁盘、负载、进程、服务状态与系统日志,并提供内存与磁盘分析工具。处理项目日志:列出、读取和搜索项目日志与多通道日志。读写代码:读取、列出、搜索、写入、打补丁和删除文件,均限制在项目根目录内。管理 Nginx 与证书:测试和读取配置、重载 Nginx、安装与续期证书。执行白名单命令并审计配置中的泄露密钥,待执行操作需经确认。
- 适用场景
- 适合让助手排查生产问题、做例行服务器巡检、搜索日志、做小幅代码修改,或在本地项目及通过 SSH 连接的远程主机上处理 Nginx 与证书任务。
- 运行要求
- 需要 Node.js 18 或更高版本,通过 npx 或构建后的入口在本地运行。必须设置 OPS_PROJECT_ROOT。远程模式还需 OPS_SSH_HOST、OPS_SSH_PORT、OPS_SSH_USER,以及 OPS_SSH_KEY 或 OPS_SSH_PASSWORD 之一;受保护的密钥还需 OPS_SSH_PASSPHRASE。可选 OPS_CONFIG_PATH 指向配置文件,用于日志通道、命令白名单和读取限制。
安装
在 SourceWeft 中
- 打开 控制台中的 Server Ops MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Server Ops MCP
English | 简体中文
[npm version] [License: MIT] [Node.js] [MCP] [GitHub stars]
A general-purpose server-ops MCP Server. Let AI tools like Claude Code / Cursor / Codex manage multiple projects or servers through .mcp.json — log troubleshooting, system resource inspection, code read/write, and Nginx / certificate management.
Supports local and remote (SSH) modes, with built-in two-step confirmation, command whitelisting, path-traversal protection, and automatic secret redaction.
Features
- 🔍 Log troubleshooting: list / read / search project logs, multi-channel logs & system logs
- 📊 Resource monitoring: CPU / memory / disk / load / processes / service status at a glance
- 📁 Code operations: read, write, patch, delete, and search files — all sandboxed to the project root
- 🌐 Nginx & certificates: config test & read, safe reload, certificate install & renewal
- 🔒 Secure by design: two-step confirmation for writes, command whitelist, path-traversal protection, auto redaction
Installation
Requires Node.js 18+. No clone or build needed — npx fetches and runs the published npm package on first use (see the config below).
To build from source instead (e.g. for development):
Build output goes to dist/; the entry point is dist/index.js.
Configuration
In each project where you want to use this tool, create (or append to) .mcp.json and declare an MCP Server per environment. Local mode only needs OPS_PROJECT_ROOT; remote mode adds the SSH variables.
If you built from source, point the command at the local build instead: "command": "node", "args": ["/absolute/path/to/server-ops-mcp/dist/index.js"].
Environment Variables
Usage
Once configured, just give ops instructions in natural language in your AI tool. The AI picks and calls the right tool automatically.
Read-only operations (run directly)
Write operations (require confirmation)
For writes, deletes, command execution, Nginx reload, certificate install, and similar, the tool first returns a confirmationId. The AI shows you exactly what will run, and it only executes after you confirm:
file_write, file_patch, file_delete, command_exec, and similar all follow the same confirmation flow.
Typical scenarios
- Production troubleshooting: "Why is the server memory full?" →
memory_analysis+log_searchworking together - Routine inspection: "Is the disk almost full? Which directory uses the most?" →
disk_analysis - Security audit: "Audit the project config for leaked secrets" →
config_audit(output is auto-redacted)
Tool List
System Ops
Project Code
Security
- Read-only tools run directly.
- Writes, command execution, Nginx reload, certificate install require two-step confirmation (
confirm_execute). - Command execution uses a whitelist — dangerous operations like
rm -rf,sudo, and piping into a shell are rejected. - File operations are sandboxed to
OPS_PROJECT_ROOT; path traversal is blocked. - Passwords, tokens, and other secrets in
.envfiles and logs are automatically redacted.
Custom Configuration
Download config.example.json as config.json, then point OPS_CONFIG_PATH at it to customize log channels, the command whitelist, read limits, and more.
Main fields of config.example.json:
logChannels: channel name → log directory path (relative to project root)maxReadLines/maxReadBytes: per-read line / byte limitscommandWhitelist.direct: commands that run directlycommandWhitelist.confirm: commands that require confirmation
Development
Notes
- Remote operations rely on SSH — use a read-only account or a tightly-scoped command whitelist for the AI.
- Private key files should have permission
600(chmod 600 ~/.ssh/id_rsa). - Never commit
.mcp.jsonorconfig.jsoncontaining passwords to a repository.
License
MIT © 2026 server-ops-mcp
来源:README.md,提交 16c2f8b
工具
0版本历史
1- v1.0.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分