Skip to main content
Glama

GitOps Safe MCP

一个刻意精简的 stdio MCP 服务器,提取自 spectrenet-mcp 提交 2e63f009d8f4642e17398685baef0251811d6637。它仅暴露:

  • repository_status:Git 状态和最近五次提交(只读)。

  • diff_summary:未暂存差异统计和工作树名称(只读)。

  • tofu_validatetofu fmt -check -recursivetofu validate -no-color

  • ansible_syntax:通过固定的、由运维管理的 ansible-playbook --syntax-check 命令检查一个受控的 YAML playbook。

没有 Git 写入、OpenTofu plan/apply、Ansible playbook 运行、shell 或任意命令工具。

重要的 Ansible 警告

Ansible 语法检查不能保证是惰性的:查找插件以及某些集合/插件加载在解析 playbook 时可能执行代码。 将配置的仓库和依赖视为受信任的代码。在专用的非特权账户下运行此服务器,使用经过清理的环境、只读的仓库挂载、无生产凭据,并限制网络/文件系统访问。可执行文件必须配置为由运维管理的绝对路径(或由运维拥有的绝对路径包装器);绝不接受来自工具参数的值。

Related MCP server: DevOps MCP Server

安全边界

所有配置的子路径和请求的 playbook 都会被解析(包括符号链接),必须是相对路径,必须存在,并且必须严格保持在允许的解析根目录之下。每个子进程都接收相同的显式最小允许列表(PATH、基本的用户/区域设置/终端/临时变量和 XDG_*);仅 Ansible 额外接收受控的 ANSIBLE_CONFIG。不相关的进程凭据、云令牌和提供程序密钥不会被继承。子进程使用 argv 数组、固定的动词/标志、超时和有界的 stdout/stderr。审计 JSONL 包括时间戳、UUID 请求 ID、工具/目标、非变更标记、退出代码、超时状态和持续时间——但不包括命令输出或环境值。

这是纵深防御,而不是沙箱。参见 安全架构

安装和运行

推荐使用 Python 3.11+ 和 uv

uv sync --extra test
cp .env.example .env.reference  # reference only; the package does not load dotenv files
uv run gitops-safe-mcp

使用服务管理器或密钥/配置管理器注入设置。确保审计目录仅对服务/运维可写。

验证

uv run --extra test pytest
uv run python -m compileall -q src tests
uv build

测试使用临时假仓库和假可执行文件。它们不会针对真实基础设施运行 OpenTofu 或 Ansible。

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides read-only access to Unix/Linux command-line tools for AI agents, blocking dangerous operations like file deletion, modification, and command execution while enabling safe file inspection, searching, and system information gathering.
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables read-only integration with GitHub, Jenkins, and Artifactory for DevOps monitoring, analysis, and troubleshooting. Provides repository inspection, build log retrieval, and artifact management through natural language.
    MIT

View all related MCP servers

Related MCP Connectors

  • Risk-scan a diff, flag AI-generated-code tells, find secrets. 5 of 7 tools need no account.

  • Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.

  • Independent static verification for exact immutable public GitHub commits.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bgauger/gitops-safe-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server