GitOps Safe MCP

GitOps Safe MCP

Enables read-only inspection of Git repository status and diff summaries, along with validation of OpenTofu and Ansible configurations, through a strictly limited, non-mutating toolset.

Category
Visit Server

README

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 -recursive and tofu validate -no-color.
  • ansible_syntax: one contained YAML playbook through a pinned/operator-managed ansible-playbook --syntax-check command.

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.

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-mcp

Inject 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 build

Tests use temporary fake repositories and fake executables. They do not run OpenTofu or Ansible against real infrastructure.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured