SuperAPI AI Directory

server-ops-mcp

Server operations locally or over SSH: log troubleshooting, CPU, memory and disk monitoring, code edits, and Nginx and certificate management.

Open website

About this tool

server-ops-mcp is a general-purpose server operations MCP Server. It lets AI tools such as Claude Code / Cursor / Codex manage multiple projects or servers through .mcp.json configuration, covering operations such as log troubleshooting, system resource checks, code reading and writing, and Nginx and certificate management.

Main capabilities

Log troubleshooting: list / read / search project logs, multi-channel logs, and system logs. Resource monitoring: an overview of CPU / memory / disk / load / processes / service status. Code operations: read, write, patch, delete, and search files, all sandboxed within the project root directory. Nginx and certificates: configuration testing and reading, safe reload, certificate installation and renewal. Security design: two-step confirmation for write operations, command whitelist, path traversal protection, automatic redaction.

How to use

Requires Node.js 18+. No need to clone or build—on first use, npx automatically fetches and runs the published npm package. If you want to build from source (for example, for development purposes), the build output is located in dist/, and the entry point is dist/index.js. In each project where you want to use this tool, create (or append to) .mcp.json and declare the MCP Server according to the environment. Local mode only requires OPS_PROJECT_ROOT; remote mode requires additional SSH variables. If building from source, point the command to the local build: "command": "node", "args": ["/absolute/path/to/server-ops-mcp/dist/index.js"]. After configuration is complete, issue operations instructions in natural language in the AI tool, and the AI will automatically select and call the appropriate tools.

Read-only operations (run directly)

Write operations (require confirmation): for writing, deletion, command execution, Nginx reload, certificate installation, etc., the tool first returns a confirmationId. The AI will show you the exact content to be executed, and it will only actually execute after you confirm. file_write, file_patch, file_delete, command_exec, etc. all follow the same confirmation process.

Typical scenarios

Production troubleshooting: "Why is the server memory full?" → memory_analysis and log_search work together. Routine inspection: "Is the disk almost full? Which directory uses the most space?" → disk_analysis. Security audit: "Audit whether the project configuration leaks secrets" → config_audit (output is automatically redacted).

Limitations and security constraints

Read-only tools can be run directly. Writing, command execution, Nginx reload, and certificate installation require two-step confirmation (confirm_execute). Command execution uses a whitelist—dangerous operations such as rm -rf, sudo, and piping to a shell will be rejected. File operations are sandboxed within OPS_PROJECT_ROOT, and path traversal will be blocked. Sensitive information such as passwords and tokens in .env files and logs is automatically redacted.

Custom configuration

Download config.example.json as config.json, then point OPS_CONFIG_PATH to it to customize log channels, the command whitelist, read limits, etc. The main fields of config.example.json include:

logChannels: channel name → log directory path (relative to the project root directory) maxReadLines / maxReadBytes: the line / byte limit for each read commandWhitelist.direct: commands that can be run directly commandWhitelist.confirm: commands that require confirmation

Recommendations for remote operations

Remote operations rely on SSH—it is recommended to use a read-only account for the AI or a strictly limited command whitelist. Private key file permissions should be 600 (chmod 600 ~/.ssh/id_rsa). Never commit .mcp.json or config.json containing passwords to a code repository.

The license is MIT © 2026 server-ops-mcp. For the Chinese documentation, see README.zh-CN.md.