GitOps Safe MCP
Provides Ansible playbook syntax checking to validate configuration before execution, with a contained and safe execution environment.
Provides read-only Git repository status and diff summary tools, allowing inspection of working tree and recent commits without modification.
Provides validation tools for OpenTofu configurations, including formatting checks and validate commands to ensure infrastructure code is correct.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GitOps Safe MCPCheck the repository status and diff summary"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GitOps Safe MCP
A deliberately narrow stdio MCP server extracted from spectrenet-mcp commit 2e63f009d8f4642e17398685baef0251811d6637. It exposes only:
repository_status: Git status and five recent commits (read-only).diff_summary: unstaged diff statistics and working-tree names (read-only).tofu_validate:tofu fmt -check -recursiveandtofu validate -no-color.ansible_syntax: one contained YAML playbook through a pinned/operator-managedansible-playbook --syntax-checkcommand.
There are no Git write, OpenTofu plan/apply, Ansible playbook-run, shell, or arbitrary-command tools.
Important Ansible warning
Ansible syntax-check is not guaranteed to be inert: lookup plugins and some collection/plugin loading can execute code while parsing a playbook. Treat the configured repository and dependencies as trusted code. Run this server under a dedicated unprivileged account, with a scrubbed environment, read-only repository mount, no production credentials, and restricted network/filesystem access. The executable must be configured as an absolute operator-managed path (or an absolute operator-owned wrapper); it is never accepted from a tool argument.
Related MCP server: Gumi-MCP
Safety boundaries
All configured child paths and requested playbooks are resolved (including symlinks), must be relative, must exist, and must remain strictly below their allowed resolved root. Every subprocess receives the same explicit minimal allowlist (PATH, basic user/locale/terminal/temp variables, and XDG_*); Ansible alone additionally receives the contained ANSIBLE_CONFIG. Unrelated process credentials, cloud tokens, and provider secrets are not inherited. Subprocesses use argv arrays, fixed verbs/flags, timeouts, and bounded stdout/stderr. Audit JSONL includes timestamp, UUID request ID, tool/target, non-mutating marker, exit code, timeout status, and duration—but not command output or environment values.
This is defense in depth, not a sandbox. See Security and Architecture.
Install and run
Python 3.11+ and uv are recommended:
uv sync --extra test
cp .env.example .env.reference # reference only; the package does not load dotenv files
uv run gitops-safe-mcpInject settings with a service manager or secret/configuration manager. Ensure the audit directory is writable only by the service/operator.
Verify
uv run --extra test pytest
uv run python -m compileall -q src tests
uv buildTests use temporary fake repositories and fake executables. They do not run OpenTofu or Ansible against real infrastructure.
This server cannot be deployed
Maintenance
Related MCP Connectors
Run verified read-only code tools: quant diagnostics + agent-ops preflight, no source exposure.
Read-only AI coding tools for change verification, release readiness, capacity, and guidance.
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
Detects database migration table locks, terraform cost leaks, and OWASP API flaws.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to inspect Git repositories for changes across committed, staged, unstaged, and untracked scopes, and run allowlisted validation commands with structured results.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to safely inspect a local repository's code and metadata while blocking private data from leaving the machine, providing read-only tools for search, change tracking, and integrity verification.MIT
- FlicenseAqualityBmaintenanceEnables AI assistants to securely inspect local Git repositories and perform restricted write operations in isolated worktrees, with sandboxed script execution and limited GitHub repository management.24-
- AlicenseAqualityCmaintenanceEnables AI clients to securely inspect local source repositories with read-only tools for listing files, reading files, and searching text, while enforcing path traversal protection and sensitive-file filtering.3MIT