Opsgate logo

Opsgate

by polymatx

Typed infrastructure tools with deny-by-default host modes, approval prompts, SSH support, and hash-chained audit logging.

Install Opsgate

Run the project’s own setup commands, in order.

Setup steps from the project

polymatx/opsgate installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    go install github.com/polymatx/opsgate/cmd/opsgate@latest
    
  2. 2. Add to Claude Code
    claude mcp add opsgate -- opsgate serve --config ~/.opsgate/config.yaml
    

Overview

polymatx/opsgate MCP server gives AI agents typed tools for inspecting and operating local or SSH-reachable hosts without exposing a general-purpose shell. Its 25 tools cover services, logs, Docker, disks, ports, files, and nginx, while each host uses an observe, operate, or full policy mode. Changes in operate mode require human approval through MCP elicitation, and refusals as well as executions enter a hash-chained audit log. Reach for it when an agent needs controlled infrastructure access with explicit command construction and SSH known-host verification.

Use cases

  • Inspect services, ports, logs, and disk usage on a host
  • Check Docker containers without granting shell access
  • Approve or refuse controlled nginx and service changes
  • Audit agent actions and policy refusals
  • Manage remote hosts through verified SSH connections

Key features

  • 25 typed infrastructure tools
  • Deny-by-default per-host modes
  • MCP approval for changes
  • Hash-chained audit logging
  • Local and SSH execution
  • Known-hosts verification

Tools8

What Opsgate lets your agent do. Expand a tool for its parameters.

Self-reported~23 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

9/9 checks healthy over the last 33d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
Last commit14d agoMost recent push to the default branch.
Tools exposed8Callable tools this server registers over MCP.

How Opsgate works

What polymatx/opsgate MCP server does

polymatx/opsgate places a policy and audit boundary between an MCP client and infrastructure. Instead of accepting an arbitrary shell command, it exposes typed operations whose arguments are used to construct the underlying process arguments. This prevents the agent from supplying a command string directly.

The server can work against the local machine or hosts reached through SSH. It supports infrastructure inspection and selected operations across system services, journald logs, Docker, disk usage, directories, listening ports, files, and nginx. Host policy is deny-by-default and can be set to observe, operate, or full mode.

How it works

Read-only investigation uses tools such as service_status, service_list, journal_tail, journal_errors, docker_ps, docker_inspect, disk_usage, and dir_list. The broader tool set also covers ports, files, and nginx operations, including configuration testing and reloads.

In observe mode, state-changing requests are refused. In operate mode, a change pauses for human confirmation through MCP elicitation. The approval interface shows the host, requested operation, context, and generated command before execution. A denial is returned as a refusal and nothing runs.

Every attempt is written to an audit log, including policy refusals. The log uses hash chaining so entries can be linked in sequence. SSH connections use known-hosts verification.

Setup and configuration

The binary requires Go 1.26 or newer when installed from source, and the documented quick start uses the latest Go install target:

bash
go install github.com/polymatx/opsgate/cmd/opsgate@latest
opsgate serve

Running opsgate serve without a configuration file starts a local, read-only service. The default audit path is ~/.opsgate/audit.jsonl. Use opsgate init to create a starter configuration at ~/.opsgate/config.yaml.

MCP clients that can launch local processes can use stdio. Claude Code can register opsgate serve directly, while Claude Desktop, Cursor, and VS Code can configure the executable and an optional absolute config path. A Docker image is available as ghcr.io/polymatx/opsgate; mount the opsgate directory and SSH directory when the container must reach remote hosts.

For clients that cannot launch a local process, serve MCP over HTTP with opsgate serve --http 127.0.0.1:8080. Non-loopback HTTP binding requires http.auth_token, sent as a Bearer token. A TLS-terminating reverse proxy is recommended for remote access, and a VPN interface is safer than exposing the endpoint publicly.

Tools and capabilities

  • Inspect service state and enumerate services.
  • Read recent journal entries and identify journal errors.
  • List and inspect Docker containers.
  • Check disk usage and list directories.
  • Inspect listening ports.
  • Work with files and nginx-related operations.
  • Run locally or through SSH with known-hosts verification.
  • Apply per-host observe, operate, or full modes.
  • Require human approval for changes in operate mode.
  • Record executions and refusals in a hash-chained JSONL audit log.

Limitations and notes

The local default is observe mode, so it is suitable for inspection but refuses changes until policy is configured differently. HTTP deployment exposes an infrastructure-management API to the reachable network; the bearer token is its protection, so use a long random token, TLS, and network restrictions when publishing it. Operate-mode changes also require a person who can respond to the approval prompt, which makes unattended HTTP use a poor fit for mutation workflows.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Opsgate

polymatx/opsgate is an MCP server that connects AI agents to local or SSH-reachable servers through typed infrastructure tools. Its main tools inspect services, journals, Docker containers, disk usage, directories, and nginx, while host modes, approval prompts, and audit logging constrain and record operations.

Install it with Go 1.26 or newer using `go install github.com/polymatx/opsgate/cmd/opsgate@latest`, then run `opsgate serve`. Use `opsgate init` to create a starter configuration at `~/.opsgate/config.yaml`.

Yes, polymatx/opsgate works with Cursor over stdio. Add the `opsgate` executable to Cursor's MCP configuration and optionally pass an absolute path to the opsgate YAML configuration.

Yes, it can operate against hosts over SSH with known-hosts verification. The server runs where its SSH key is available; for container deployments, mount the relevant SSH directory into the container.

Use the HTTP transport because cloud or sandboxed clients may not launch a local process or access SSH keys. Run `opsgate serve --http 127.0.0.1:8080`, configure an authentication token for non-loopback binding, and place public access behind TLS and network controls.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewOpsgate AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/polymatx-opsgate?style=directory)](https://allmcps.com/mcp/polymatx-opsgate)
HTML Embed
<a href="https://allmcps.com/mcp/polymatx-opsgate"><img src="https://allmcps.com/api/badge/polymatx-opsgate?style=directory" alt="Opsgate on AllMCPs" /></a>