# ops-mcp [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/key086/ops-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 700  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ops-mcp

## Description
MCP server that lets AI agents run zero-downtime deploys, rollbacks, restarts and log inspection over SSH — battle-tested release engineering as agent tools.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "ops-mcp": {
    "command": "npx",
    "args": ["-y","ops-mcp"]
  }
}
```

## Documentation

## What ops-mcp does

ops-mcp connects an MCP client to one or more configured remote projects over SSH. It is aimed at deployments where a web server or application points at a `current` directory, with each release stored separately under `releases/`. A deployment uploads the configured local distribution directory into a timestamped remote folder and atomically changes the `current` symlink with `ln -sfn`. This lets Nginx continue serving through the release switch without requiring a server-side installation or daemon.

The server also covers operational tasks around a release. Agents can inspect the active and historical versions, run health probes, read application or system logs, restart services, check status, and roll back to an earlier retained release. An audit file named `.ops-history.log` records deployment and rollback activity on the remote host.

## How it works

Project definitions live in a JSON configuration file. Each project can specify its SSH host, username, private key, remote root, local build directory, release retention count, log paths, and service settings. Services may use systemd, pm2, or a custom restart command. For systemd and pm2 deployments, the service abstraction lets the same MCP operation handle the restart step.

After deployment, an optional HTTP health check runs from the remote server, so private or loopback URLs can be tested. The check can define an expected status, retry count, and interval. When automatic rollback is enabled and the check fails, ops-mcp switches back to the previous release. Deployment, rollback, and health-check failures can also be sent to Feishu, DingTalk, WeCom, or Slack webhooks; Feishu signing is supported.

## Setup and configuration

Install the package globally with `npm install -g ops-mcp`, or run it without a global installation through `npx -y ops-mcp`. Node.js 18 or newer is required. The remote machine only needs SSH access; no ops-mcp package or background service is installed there.

Create `~/.ops-mcp/config.json`, or use `./ops.config.json`. The `OPS_MCP_CONFIG` environment variable can point to another file and takes precedence over both default paths. Configure one or more entries in a `projects` array. The project `name` is the identifier supplied to MCP tools, while `remoteRoot/current` should match the path used by the web server or application.

Claude Desktop can start the server with the `npx -y ops-mcp` command in its MCP server configuration. OpenCode uses the same command as a local MCP server. Cursor and other MCP clients can use the server's standard local process interface.

## Tools and capabilities

- `list_projects` returns configured project names and descriptions.
- `deploy` publishes a local build and supports `dryRun` to preview the plan.
- `rollback` selects an earlier retained release and can restart the service.
- `list_releases` shows historical releases and the active version.
- `health_check` runs a configured remote HTTP probe.
- `tail_log` reads configured files or a systemd journal.
- `restart` handles systemd, pm2, or custom service commands.
- `status` reports the active version, service state, disk space, and recent operations.
- The `ops://projects` resource exposes sanitized project information for agent context.

Credentials remain in the local configuration and are removed from tool output and the MCP resource. Use a low-privilege deployment account and restrict sudo access to the required service restart commands. `dryRun` can be combined with a client's tool approval flow before executing a deployment.

_Full upstream README: https://allmcps.com/mcp/ops-mcp/readme_

