# xops-cli [Health: Active]

**Category:** 🖥️ Command Line  
**Repository:** https://github.com/wentf9/xops-cli  
**GitHub Stars:** 21  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/xops-cli

## Description
基于 Go 的高性能、跨平台运维 CLI 工具。提供主机管理、SSH 连接、文件传输、批量执行和 Playbook 任务编排，也可通过 Model Context Protocol (MCP) 接入 AI 客户端，配置操作审批和审计。

## Claude Desktop Quick Installation
No confirmed install details yet, so no config is published. Follow the setup steps in the repository above.

## Documentation

## What xops-cli MCP server does

xops-cli MCP server gives MCP-compatible AI clients access to hosts managed through XOps CLI. Its MCP tools cover saved node information, remote command execution, SFTP file reads and writes, and SSH tunnel operations using local port forwarding or remote port forwarding. The underlying CLI supports SSH, SFTP, host aliases, multiple identities, privilege escalation, and shell detection across POSIX shells, fish, Windows CMD, and PowerShell.

The MCP interface is intended for controlled infrastructure work. Commands and paths are evaluated for risk, high-risk actions can require an interactive approval form from the client, and approved operations are recorded in audit logs. If the target configuration changes while approval is pending, the permission is invalidated.

## How it works

Run `xops mcp serve` to start the MCP service over stdio. An MCP client launches the `xops` binary and communicates with it through the process input and output streams. This mode suits local desktop clients such as Claude Desktop, Cursor, and Codex.

For access from other systems on a local network, start the service with the HTTP transport. The service can listen on a specified address and port, advertise a public URL, and protect requests with a token file. Streamable HTTP also supports large streamed file transfers, described by the project as reaching the 10 GiB range.

The server uses XOps host and credential data rather than requiring software on the remote machine. Hosts may be imported or added through the CLI, and credentials are stored locally in encrypted form. SSH connections can use saved aliases, alternate users, keys, jump hosts, and sudo or su elevation according to the configured operation.

## Setup and configuration

Build or install the single XOps binary, then make sure its host inventory and credentials are available to the account running the MCP process. The project supports Linux, macOS, and Windows; compiling from source requires Go 1.26 or newer.

A minimal Claude Desktop configuration points the MCP server at the executable:

```json
{
  "mcpServers": {
    "xops": {
      "command": "/usr/local/bin/xops",
      "args": ["mcp", "serve"]
    }
  }
}
```

For HTTP mode, use the `--transport http` option with `--listen`, `--public-url`, and optionally `--token-file`. Keep the listener and token under the same access controls as the hosts it can operate. The CLI also offers an alternative `xops-agent` Skill for agents that can operate command-line tools directly; that path does not start an MCP service.

## Tools and capabilities

- Query saved nodes and their connection information.
- Execute commands on one or more managed hosts.
- Read and write remote files through SFTP.
- Create SSH local or remote forwarding tunnels.
- Apply command and path risk checks before execution.
- Request client-side approval for high-risk actions.
- Record operation activity in audit logs.
- Transfer files through the Streamable HTTP transport.

## Limitations and notes

The MCP server operates through XOps-managed SSH access, so usable targets depend on valid host definitions and credentials. Stdio mode is local to the client process, while HTTP mode adds network exposure and should be protected with the available token authentication and appropriate listener settings. Approval behavior depends on whether the connected MCP client supports interactive elicitation.

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

