Devops MCP 479186b0

MCPAI代理

提供方 CynepMyx

AI代理 未标注 无需鉴权 社区 / 第三方 ClaudeCursor

一个自托管的模型上下文协议服务器,为AI助手提供对Linux服务器的直接访问,包括Docker容器、SSH执行、系统健康、日志、Nginx和Prometheus等功能。

一句话选型结论

按资料字段整理

Devops MCP 479186b0 属于AI代理类 MCP 服务器,传输方式未标注,无需鉴权,可直接接入 Claude、Cursor,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类AI代理 传输方式未标注 鉴权无需鉴权 部署方式未标注
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 16 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

AI代理
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量16暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

自托管Python本地部署AI助手Docker管理SSH执行系统监控

安装与配置

未标注 无需鉴权
上游未给出传输方式
  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 16 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
给代理接外部能力

让代理在任务中途调用搜索、数据库等真实工具。

多步任务编排

把一串操作拆成步骤,由代理按顺序执行。

自动化重复流程

把固定流程交给代理跑,减少手工操作。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 16 个工具,覆盖面较广,能满足多种调用。
  • 已适配 Claude、Cursor,换客户端不用重新研究配置。
  • 资料标注无需鉴权,装好就能连。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在AI代理场景里让模型直接调用外部能力的人。
  • 已经在用 Claude、Cursor 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Devops MCP 479186b0当前 16 未标注 未标注 无 2026-05-17
Filesystem 560c4363 13 未标注 本地部署 无 2026-05-17
Server Everything (everything) 11 stdio · 本地进程 本地部署 有 2026-05-17
Time 7365cb6d 2 SSE · 服务端推送 远程部署 有 2026-05-18
Everything Claude Code 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Openmemory 557e1585 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

AI代理
字段来自项目仓库与公开索引,中文说明由本站标注
提供方CynepMyx上游标注的维护方 CynepMyx
分类AI代理本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式无需鉴权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

13.4 KB
来自项目仓库与上游目录的原文,未做删改

DevOps MCP

A self-hosted Model Context Protocol server that gives AI assistants (Claude, Cursor, etc.) direct access to your Linux server — Docker containers, SSH execution, system health, logs, Nginx, Prometheus, and more.

Deploy it once on your server. Connect any MCP-compatible client.

> Intended for trusted self-hosted environments. Binds to 127.0.0.1 by default. Access to Docker socket and SSH gives the server significant power over your infrastructure — treat it accordingly.


Tools

Tool Description
server_health CPU, memory, disk, uptime, Docker summary, failed systemd units
system_info Detailed system info: hostname, platform, load avg, CPU freq
docker_list List containers with status, ports, health
docker_logs Fetch logs from a container (tail N lines)
docker_inspect Full container inspect (config, mounts, network)
docker_stats CPU/memory/network stats for running containers
docker_control Start, stop, or restart a container
ssh_exec Execute commands on remote hosts via SSH key
file_get Read a remote file over SFTP — no shell, no quoting problems
file_put Write a remote file over SFTP: diff preview, backup, preserved mode, config test with automatic rollback
db_query Run SQL against PostgreSQL or MySQL; writes require confirmation
ssh_sessions Inspect or close the SSH connections kept open between calls
log_tail Read system log files (syslog, nginx, auth, etc.)
nginx_test Run nginx -t config validation
systemd_status Check status of systemd services
tls_check Verify TLS certificate expiry and chain for a domain
prometheus_query Run PromQL instant or range queries
prometheus_targets List Prometheus scrape targets and their health
search_web Web search via SerpAPI
search_ai AI-powered technical search via Exa

Security

Security is built in, not bolted on:

  • SSH commands are read-only by default — only safe, read-only commands allowed without confirmed=true (uptime, df, cat, grep, journalctl, systemctl status, docker ps, etc.)
  • Flags are parsed, not searched — for sed, curl, git, ip, journalctl, dpkg, find and others the words are parsed per command: sed -ni, curl -XPOST, git -c, ip l s eth0 down, find -exec require confirmed=true; wget always does (see SECURITY.md)
  • Log path allowlist — log_tail only reads from predefined safe paths
  • Nginx container allowlist — nginx_test only runs against approved container names
  • docker_control requires confirmation — stop and restart require confirmed=true; AI must ask user before proceeding
  • file_put requires confirmation — writes need confirmed=true; dry_run=true returns the unified diff and touches nothing
  • Credential files are refused — file_get and file_put will not open shadow, sudoers, authorized_keys or private keys
  • Tool annotations — every tool declares readOnlyHint / destructiveHint, so the client can gate destructive calls by protocol rather than by trusting the model to read a description
  • Container runs as non-root — mcpuser (UID 1000), all Linux capabilities dropped, no-new-privileges
  • SSH key path validation — only keys from /app/keys/ are accepted
  • TLS check port allowlist — tls_check only connects to ports: 80, 443, 465, 993, 995, 8080, 8443
  • Audit log — every tool call is logged to /audit/audit.jsonl with timestamp, args and outcome (ok, refused, error)

Quick Start

Prerequisites

  • Docker + Docker Compose on the target server
  • SSH access to the server

1. Clone and configure```bash

git clone https://github.com/CynepMyx/devops-mcp.git
cd devops-mcp
cp .env.example .env


Edit `.env`:```dotenv
SERPAPI_KEY=your_serpapi_key       # optional, for search_web
EXA_API_KEY=your_exa_key           # optional, for search_ai
DOCKER_GID=999                     # match your server's docker group GID
PROTECTED_CONTAINERS=devops-mcp   # comma-separated, cannot be stopped/restarted

2. Deploy```bash

docker compose up -d


The MCP server starts on `127.0.0.1:8765`, serving streamable HTTP on `/mcp` and
legacy SSE on `/sse`.

### 3. Connect to Claude Code

Add to `~/.claude.json` (or your Claude Desktop config):```json
{
  "mcpServers": {
    "devops": {
      "type": "http",
      "url": "http://YOUR_SERVER:8765/mcp"
    }
  }
}

/mcp runs stateless: every request carries what it needs, so restarting the
container does not leave the client holding a dead session and answering
-32602 to every call. The older SSE transport is still mounted:```json
{ "type": "sse", "url": "http://YOUR_SERVER:8765/sse" }


For remote servers, use an SSH tunnel:```bash
ssh -L 8765:127.0.0.1:8765 user@your-server

Then use http://localhost:8765/sse.


SSH Key Setup

Place your private key in the keys/ directory:```bash
cp ~/.ssh/id_ed25519 keys/my-server.pem
chmod 600 keys/my-server.pem


Then use in `ssh_exec`:```
ssh_exec(host="10.0.0.5", user="deploy", key="/app/keys/my-server.pem", command="uptime")

SSH Host Key Verification

Strict checking turns itself on as soon as there is something to check against: if
/app/ssh/known_hosts is non-empty, unknown hosts are rejected. While the file is empty
— a fresh install — connections run in warn mode instead, since rejecting every host
would only teach you to ignore the warning. SSH_STRICT_HOST_KEY=false forces warn mode
back, and verify_host_key on a single call overrides either way.

Getting the keys in there is the part worth doing carefully:```bash

On the server itself, over an access you already trust

cat /etc/ssh/ssh_host_ed25519_key.pub

then add "10.0.0.5 ssh-ed25519 AAAA..." to /opt/devops-mcp/ssh/known_hosts


`ssh-keyscan` is the convenient way and the weaker one: it trusts whoever answers on the
port, which is exactly what host key checking exists to catch. Read the key from the
machine through access you already have, or from the provider's console.

> The `known_hosts` file is mounted read-only into the container and gitignored — it
> never ends up in source control.

---

## Connections Stay Open

`ssh_exec`, `file_get` and `file_put` share one live SSH connection per host and
credential instead of authenticating on every call. Measured against a real host, the
first call takes 220 ms and the ones after it 50 ms, and a twenty step diagnostic opens
one connection instead of twenty. That second part matters as much as the speed: a burst
of connections from one address is exactly what fail2ban is built to notice.

The pool covers connections this server opens itself, including the ones it opens through
a jump host. A second hop the container does not control — an `ssh` or `sshpass` call
inside the command text — is still a fresh connection every time.

## Reaching a Server Through Another One

Pass `jump_host` and the credentials for it, and the connection is tunnelled:```
ssh_exec(host="10.0.0.5", user="deploy", password="...",
         jump_host="203.0.113.9", jump_user="ops", jump_key="/app/keys/bastion.pem",
         command="uptime")

The jump host only carries bytes. Authentication with the target happens end to end
inside the tunnel, so the target's password is never an argument to a command running on
the intermediate box, where anyone with ps can read it. This is the same thing OpenSSH
does with ssh -J.

The alternative — running ssh or sshpass as a command on the jump host — costs more
than it looks: the password lands in the process list, output travels through a second
shell with a second round of quoting, the connection is outside the pool, and file_get
and file_put cannot reach the target at all, because SFTP does not fit inside a command
string. With jump_host all of that works normally.

Jump connections are pooled and shared: ten client servers behind one bastion open one
connection to the bastion. Closing it with ssh_sessions closes what rides on it, and
the reaper leaves a jump host alone while anything is tunnelled through it.

Commands still run as separate channels, so nothing carries over between them: no working
directory, no environment, no shell state. That is on purpose. A persistent shell would
let two separately validated calls add up to one command that neither of them was.

Connections close themselves after five minutes idle, and ssh_sessions shows what is
open or closes it now:```
ssh_sessions(action="status")
ssh_sessions(action="close", host="10.0.0.5")


Credentials never share a connection: the pool key includes host, port, username and
which key or password was used, and a password is stored only as a hash. Set
`SSH_POOL=false` to go back to connecting every time.

---

## Editing Remote Files

`ssh_exec` runs everything through a shell, so writing a config with it means fighting
quoting rules and a 500 character ceiling. `file_get` / `file_put` use SFTP instead —
the bytes travel as bytes.```
file_put(host="10.0.0.5", user="deploy", key="/app/keys/my-server.pem",
         path="/etc/nginx/conf.d/site.conf", content="...", dry_run=true)

The dry run returns a unified diff and writes nothing. Repeat with confirmed=true to
apply it: the previous version is kept as /var/backups/oleg/etc/nginx/conf.d/site.conf.bak_
(directories 0700; ~/backups/ when /var/backups is not writable), never next to the file,
where nginx would load it as a second config from conf.d/*.conf. Symlinks are resolved, so a
link in sites-enabled keeps pointing at the file that was updated. Mode and owner
are carried over, and the new content lands via a temporary file in the same directory,
so a reader never sees a half-written config. A file that does not exist yet needs an
explicit mode, because guessing 0644 on a config is how secrets end up world-readable.

Check it, and put the old one back if it fails

A broken config is harmless right up until something reloads it. Pass verify_cmd and
the check runs against what was just written:```
file_put(host="10.0.0.5", user="deploy", key="/app/keys/my-server.pem",
path="/etc/nginx/conf.d/site.conf", content="...",
verify_cmd="nginx -t", confirmed=true)


If the test exits non-zero, the previous content is restored, the same test is run again
to prove the server is back where it started, and the now-pointless backup is removed.
The response carries `verify`, `rolled_back` and `verify_after_rollback`, so the failure
is visible rather than inferred. Set `rollback_on_failure=false` to keep the new content
anyway.

`verify_cmd` accepts config tests only (`nginx -t`, `apachectl configtest`, `sshd -t`,
`php -l`, `named-checkconf`, `haproxy -c`, `systemd-analyze verify`, `docker compose
config`, and similar). It runs automatically as part of a write, so it has to be a test
and not a general shell; anything else belongs in `ssh_exec`, where it shows up as its
own call.

---

## Example Prompts

Once connected, you can ask your AI assistant things like:

- *"Check server health and show me any failed services"*
- *"Restart the nginx container and verify config is valid"*
- *"Show last 50 lines from the nginx access log"*
- *"Is the TLS cert for example.com still valid?"*
- *"Run a Prometheus query for 5-minute CPU usage"*
- *"SSH into 10.0.0.5 as deploy and check disk usage"*

---

## Architecture```
Claude / Cursor / any MCP client
        |  SSE (HTTP)
        v
  FastAPI + MCP Server  <---- security.py (validation layer)
        |
  +-----+------+----------+-----------+----------+
  |            |          |           |          |
Docker SDK  Paramiko  psutil/dbus  httpx      Prometheus
(local)     (SSH)     (system)    (HTTP)       API

Configuration Reference

Variable Default Description
MCP_HOST 0.0.0.0 Bind address inside container
MCP_PORT 8765 Port
AUDIT_LOG_PATH /audit/audit.jsonl Audit log location
PROTECTED_CONTAINERS devops-mcp Containers immune to start/stop/restart
SERPAPI_KEY — SerpAPI key for search_web
EXA_API_KEY — Exa key for search_ai
PROMETHEUS_URL http://host.docker.internal:9090 Prometheus endpoint
ALLOW_SSH_PASSWORD false Enable SSH password auth (key-based is default)
SSH_STRICT_HOST_KEY auto Reject unknown host keys. Defaults to on when known_hosts is non-empty, off when it is empty
SSH_POOL true Keep SSH connections open between calls; false reconnects every time
SSH_POOL_IDLE_TTL 300 Close a pooled connection after this many idle seconds
SSH_POOL_MAX 20 Maximum pooled connections before the least recently used one is dropped
SSH_POOL_KEEPALIVE 30 Keepalive interval, so an idle connection is not dropped silently
DEV_HOT_RELOAD false Enable live tool file-watching (dev only)

Security & Threat Model

DevOps MCP is designed for trusted self-hosted environments. Read SECURITY.md for the full threat model.

Key constraints:
- Binds to 127.0.0.1 by default — not exposed to the internet
- Docker socket access is intentional and powerful — treat the endpoint accordingly
- SSH keys are validated against a path allowlist (/app/keys/)
- Destructive actions (stop, restart, dangerous shell commands) require explicit confirmed=true
- Every tool call is appended to /audit/audit.jsonl


License

MIT

常见问题

6 问
答案由本站依据条目字段整理,不引用上游原文
Devops MCP 479186b0 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

Devops MCP 479186b0 怎么在 Claude、Cursor 里配置?

它的传输方式未标注,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Devops MCP 479186b0 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Devops MCP 479186b0 需要 API Key 吗?

资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Devops MCP 479186b0 支持哪些客户端?

资料标注支持 Claude、Cursor;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Devops MCP 479186b0 能提供哪些能力?

资料显示约 16 个工具;能力标签包括 自托管、系统监控、Python、Claude。具体工具清单以官方文档为准。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。