Server Ops MCP

Official registry Developer tools

Server ops MCP: logs, monitoring, code edit, Nginx & certs. Local + SSH, confirmations & redaction.

What can you do with Server Ops MCP?

  • 🔍 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

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package server-ops-mcp
Claude Code
claude mcp add server-ops-mcp -e 'OPS_PROJECT_ROOT=<OPS_PROJECT_ROOT>' -e 'OPS_SSH_HOST=<OPS_SSH_HOST>' -e 'OPS_SSH_PORT=<OPS_SSH_PORT>' -e 'OPS_SSH_USER=<OPS_SSH_USER>' -e 'OPS_SSH_KEY=<OPS_SSH_KEY>' -e 'OPS_SSH_PASSWORD=<your ops_ssh_password>' -e 'OPS_SSH_PASSPHRASE=<your ops_ssh_passphrase>' -e 'OPS_CONFIG_PATH=<OPS_CONFIG_PATH>' -- npx -y server-ops-mcp@1.0.3
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "server-ops-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "server-ops-mcp@1.0.3"
            ],
            "env": {
                "OPS_PROJECT_ROOT": "<OPS_PROJECT_ROOT>",
                "OPS_SSH_HOST": "<OPS_SSH_HOST>",
                "OPS_SSH_PORT": "<OPS_SSH_PORT>",
                "OPS_SSH_USER": "<OPS_SSH_USER>",
                "OPS_SSH_KEY": "<OPS_SSH_KEY>",
                "OPS_SSH_PASSWORD": "<your ops_ssh_password>",
                "OPS_SSH_PASSPHRASE": "<your ops_ssh_passphrase>",
                "OPS_CONFIG_PATH": "<OPS_CONFIG_PATH>"
            }
        }
    }
}

Environment variables

  • OPS_PROJECT_ROOT required Project root path; all file operations are sandboxed here
  • OPS_SSH_HOST Remote server IP / domain; leave empty to run locally
  • OPS_SSH_PORT SSH port, default 22
  • OPS_SSH_USER SSH username
  • OPS_SSH_KEY Path to SSH private key (choose either key or password)
  • OPS_SSH_PASSWORD secret SSH password (choose either key or password)
  • OPS_SSH_PASSPHRASE secret Private key passphrase
  • OPS_CONFIG_PATH Path to an extra config file (see config.example.json)

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. Server Ops MCP
  2. Features
  3. Installation
  4. Configuration
  5. Usage
  6. Tool List
  7. Security
  8. Custom Configuration
  9. Development
  10. Notes
  11. License

Server Ops MCP

English | 简体中文

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):

git clone https://github.com/GT-dinuo/server-ops-mcp.git
cd server-ops-mcp
npm install
npm run build

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.

{
  "mcpServers": {
    "myproject-server": {
      "command": "npx",
      "args": ["-y", "server-ops-mcp"],
      "env": {
        "OPS_PROJECT_ROOT": "/www/wwwroot/your-project",
        "OPS_SSH_HOST": "<server-ip-or-domain>",
        "OPS_SSH_PORT": "22",
        "OPS_SSH_USER": "ubuntu",
        "OPS_SSH_KEY": "~/.ssh/id_rsa"
      }
    }
  }
}

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
VariableRequiredDescription
OPS_PROJECT_ROOTYesProject root path; all file operations are sandboxed here
OPS_SSH_HOSTNoRemote server IP / domain; leave empty to run locally
OPS_SSH_PORTNoSSH port, default 22
OPS_SSH_USERNoSSH username
OPS_SSH_KEYNoPath to SSH private key (choose either key or password)
OPS_SSH_PASSWORDNoSSH password (choose either key or password)
OPS_SSH_PASSPHRASENoPrivate key passphrase
OPS_CONFIG_PATHNoPath to an extra config file — see "Custom Configuration"

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)
Check the server's CPU, memory, and disk usage
Search for error-level logs from the last hour
List the project's log files
Read the Nginx config and check for problems
Find every place in the code that calls sendSms
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:

You: Reload nginx
AI: (calls nginx_reload, returns the pending action + confirmationId)
    About to run: nginx -s reload. Confirm?
You: Confirm
AI: (calls confirm_execute to run it)

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_search working 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
ToolDescription
system_infoCPU / memory / disk / load / processes
memory_analysisMemory usage analysis
disk_analysisDisk usage analysis
service_statusService status
log_search_systemSearch system logs
nginx_config_testTest Nginx config
nginx_config_readRead Nginx config
nginx_reloadReload Nginx (requires confirmation)
certbot_installInstall certificate (requires confirmation)
certbot_renewRenew certificate (requires confirmation)
Project Code
ToolDescription
log_listList project logs
log_readRead a log
log_searchSearch logs
file_readRead a file
file_listList a directory
file_searchSearch code
file_writeWrite a file (requires confirmation)
file_patchPatch a file (requires confirmation)
file_deleteDelete a file (requires confirmation)
command_execRun whitelisted commands
project_overviewProject overview
config_auditAudit config (auto-redacted)
confirm_executeConfirm and run a pending action

Security

  1. Read-only tools run directly.
  2. Writes, command execution, Nginx reload, certificate install require two-step confirmation (confirm_execute).
  3. Command execution uses a whitelist — dangerous operations like rm -rf, sudo, and piping into a shell are rejected.
  4. File operations are sandboxed to OPS_PROJECT_ROOT; path traversal is blocked.
  5. Passwords, tokens, and other secrets in .env files 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.

curl -o config.json https://raw.githubusercontent.com/GT-dinuo/server-ops-mcp/main/config.example.json
# (if you cloned the repo: cp config.example.json config.json)
# After editing config.json, set in the .mcp.json env:
# "OPS_CONFIG_PATH": "/absolute/path/to/config.json"

Main fields of config.example.json:

  • logChannels: channel name → log directory path (relative to project root)
  • maxReadLines / maxReadBytes: per-read line / byte limits
  • commandWhitelist.direct: commands that run directly
  • commandWhitelist.confirm: commands that require confirmation

Development

npm run dev    # watch mode, recompiles on change
npm run build  # build to dist/
npm run clean  # remove dist/
npm start      # run the built Server

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.json or config.json containing passwords to a repository.

License

MIT © 2026 server-ops-mcp

Frequently asked questions

What is Server Ops MCP?

Server ops MCP: logs, monitoring, code edit, Nginx & certs. Local + SSH, confirmations & redaction.

How do I install Server Ops MCP?

It runs on your machine. In Claude Code: claude mcp add server-ops-mcp -e 'OPS_PROJECT_ROOT=<OPS_PROJECT_ROOT>' -e 'OPS_SSH_HOST=<OPS_SSH_HOST>' -e 'OPS_SSH_PORT=<OPS_SSH_PORT>' -e 'OPS_SSH_USER=<OPS_SSH_USER>' -e 'OPS_SSH_KEY=<OPS_SSH_KEY>' -e 'OPS_SSH_PASSWORD=<your ops_ssh_password>' -e 'OPS_SSH_PASSPHRASE=<your ops_ssh_passphrase>' -e 'OPS_CONFIG_PATH=<OPS_CONFIG_PATH>' -- npx -y server-ops-mcp@1.0.3. For other clients, paste the JSON configuration from this page into their MCP settings.

Does Server Ops MCP need an API key?

Yes. It expects OPS_PROJECT_ROOT, OPS_SSH_PASSWORD, OPS_SSH_PASSPHRASE, which you set in its configuration.

Is Server Ops MCP open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains Server Ops MCP?

It is published by GT-dinuo. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.