opsprobe
Allows read-only command execution inside allowlisted Docker containers and approved container restarts on Docker hosts.
Provides PromQL querying for instant metrics or capped range summaries per series, supporting incident investigation.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
opsprobe
Let an AI agent investigate production, without handing it the keys.
opsprobe is an MCP server that gives AI assistants (Claude Code, Claude Desktop, any MCP client) a fixed set of safe diagnostic tools for your systems: metrics, logs, health checks, read-only host checks and your team's runbooks. It wraps every call in guardrails, and anything that changes something waits for a person to approve that exact command.
In one minute
AI assistants are good at incident triage: they read metrics and logs quickly and connect the dots. But the usual way to let one help is to give it a shell, and then it can run anything on any host, with nobody watching. Most teams rightly say no.
opsprobe is the middle ground:
The agent can | The agent cannot |
Query Prometheus and Loki (time ranges and output capped) | Reach any host, URL or command that isn't in |
Hit allowlisted health endpoints | Pass arguments outside their allowed patterns (no |
Run read-only checks ( | Change anything without a person approving that exact command |
Run your team's runbooks step by step | Approve its own request: approval exists only in a human-run CLI |
Request a change, such as a restart | See secrets: tokens, keys and passwords are redacted before it sees them |
Every call is written to an audit log: who asked what, on which target, and whether it was allowed.
Related MCP server: OPP Observatory MCP
See it work (5 minutes)
The demo is a fictional two-service shop. checkout places an order every half second by calling payments. Payments has a bug: it leaks one pooled connection every few charges, and after about a minute the pool is empty and every order fails.
git clone https://github.com/narkhedeakshay26/opsprobe.git && cd opsprobe
pip install -e .
docker compose -f examples/demo/docker-compose.yml up -d # shop + Prometheus + LokiConnect an agent. For Claude Code:
claude mcp add opsprobe -- opsprobe serve -c "$PWD/examples/demo/opsprobe.yaml"(Claude Desktop: see docs/connecting.md.) Then ask:
"Checkout is failing orders. Find out why and fix it."
What happens:
The agent calls
list_targets, sees thecheckout-failingrunbook and runs it.The runbook's probes show:
payments health
503;payments_pool_in_useat 20/20;log lines
connection pool exhausted (20/20 in use).
The agent calls
request_action restart_container container=shop-paymentsand tells you:PENDING APPROVAL 7f3a9c21 action: restart_container host: docker-host command: docker restart shop-paymentsYou approve it in a terminal. That's the only way it can be approved:
opsprobe approve 7f3a9c21 -c examples/demo/opsprobe.yamlThe agent calls
execute_approved. Payments restarts and checkout recovers. The runbook also tells the agent the restart is only a band-aid because the leak is the real bug, so it should say so.Review everything that happened:
opsprobe audit -c examples/demo/opsprobe.yaml
No agent handy? Call the same tools yourself, exactly as the agent would:
opsprobe call -c examples/demo/opsprobe.yaml run_runbook name=checkout-failing
opsprobe call -c examples/demo/opsprobe.yaml run_check host=payments check=app_log lines=5
opsprobe call -c examples/demo/opsprobe.yaml run_check host=payments check=app_log_head lines=3 # watch the api_key get redactedCI runs this whole scenario on every push (tests/e2e_demo.sh): the shop
breaks, the runbook finds the cause, the approval flow restarts payments, and health returns to 200.
How it works
flowchart LR
A["AI agent<br/>(any MCP client)"] -- tool call --> G
subgraph G["opsprobe"]
direction TB
R[rate limit] --> L[allowlists<br/>hosts · checks · URLs · arg patterns]
L --> X[run]
X --> S[redact secrets] --> C[cap output] --> AU[(audit log)]
end
X --> P[(Prometheus)]
X --> Lo[(Loki)]
X --> H[hosts<br/>docker exec · ssh · local]
G -- text result --> A
A -. request_action .-> Q[(pending approvals)]
U["👤 person"] -- "opsprobe approve <id>" --> Q
Q -. approved, once .-> XThe tools the agent sees
Tool | What it does | Guardrails |
| Everything the agent may touch | – |
| PromQL; instant, or a range summarised per series (last/min/max) | max range, max series |
| LogQL, newest first | stream selector required, max range, max lines |
| GET a URL: status, latency, start of body | URL allowlist (globs), timeout |
| Run one named read-only command on one host | host and check allowlists, argument regexes, no shell |
| Run a Markdown runbook's probes in order | every probe goes through the same guards |
| Ask for a change; returns an approval id | action and host allowlists, argument regexes, reason required |
| Run an approved action | once, before expiry, only if the command still matches exactly |
Every tool returns plain text written for a model. A refusal says what is allowed, so the agent
can correct itself instead of guessing:
DENIED: host 'db-9' is not allowed. Allowed hosts: checkout, payments, docker-host.
Safety model
Risk | How opsprobe handles it |
Agent runs an arbitrary command | It can't: only named commands from |
Shell injection through arguments | Commands are split into arguments before values go in and run without a shell. Every value must fully match its regex. Over SSH every argument is quoted |
Agent acts on the wrong machine | Hosts are an allowlist. An approval is bound to one action + one host + the exact command (SHA-256); any change in between voids it |
Agent approves its own request | There is no approve tool. Approval only happens through |
An approval reused or left lying around | Single use (marked used before running), and it expires (15 min by default) |
Secrets reach the model | Built-in redaction (private keys, AWS keys, JWTs, bearer tokens, |
Huge output or a looping agent | Output capped per call; calls per minute capped |
"What did the AI do last night?" | JSON-lines audit log of every call, refusal, request, approval and execution |
Something left running on servers | Nothing is installed or left running: every call is one short command |
One thing you must do yourself: keep the approval channel out of the agent's reach. If the same
agent also has an unrestricted shell on the machine where opsprobe approve works, it could run that
command itself. Run opsprobe where that agent has no shell, or as a different user. See
docs/security.md.
Use it on your systems
Write
opsprobe.yaml. Start fromexamples/demo/opsprobe.yaml: every key is commented.prometheus: { url: http://prometheus:9090 } loki: { url: http://loki:3100 } http_check: { allow: ["https://*.internal.example/health"] } hosts: web-1: { executor: ssh, address: 10.0.0.11, user: probe, key_file: ~/.ssh/probe } checks: service_status: "systemctl status {unit} --no-pager" journal: "journalctl -u {unit} -n {lines} --no-pager" disk: "df -h" actions: restart_service: { command: "sudo systemctl restart {unit}", hosts: [web-1] } args: unit: "(nginx|api|worker)\\.service" runbooks: runbooks/Use a dedicated read-only account on hosts, plus one narrow sudo rule for the approved actions.
Validate it:
opsprobe check -c opsprobe.yaml.Try the tools yourself:
opsprobe call -c opsprobe.yaml list_targets.Write runbooks for your common incidents (docs/runbooks.md). A runbook is the best way to make an agent investigate the way your team would.
Connect your MCP client (docs/connecting.md).
CLI
opsprobe serve [-c cfg] [--transport stdio|http] run the MCP server
opsprobe tools the tool descriptions the agent sees
opsprobe call [-c cfg] TOOL key=value ... call a tool yourself
opsprobe pending [-c cfg] approval requests waiting
opsprobe approve|deny [-c cfg] ID [--yes] decide one (shows the exact command first)
opsprobe audit [-c cfg] [--tail N] read the audit log
opsprobe check [-c cfg] validate the config and runbooksProject layout
opsprobe/
├── opsprobe/
│ ├── config.py opsprobe.yaml: allowlists, refuses unsafe checks at load time
│ ├── guard.py rate limit, secret redaction, output cap, audit log
│ ├── tools.py the tools (one guarded path for all of them)
│ ├── executors.py local / docker exec / ssh, never through a shell
│ ├── approvals.py request → human approve → execute once
│ ├── runbooks.py Markdown runbooks with ```probe blocks
│ ├── server.py MCP server (FastMCP), no approval tool by design
│ └── cli.py
├── examples/demo/ fictional shop, Prometheus, Loki, config, runbooks
├── docs/ security · runbooks · connecting
└── tests/ guardrail, tool and approval tests + a full end-to-end demo run in CIDocs
Roadmap
More back ends: Kubernetes (pods, events, logs) and Kafka consumer lag, read-only
Approval through Slack buttons, in addition to the CLI
Per-user identity on the HTTP transport (who asked, not just what)
MIT licensed. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only AI coding tools for change verification, release readiness, capacity, and guidance.
Read-only production context for AI agents: Docker/K8s health, deploys, logs, traffic, code graph
Permission checks, human approval cards, and signed audit trails for AI agent tool calls.
Run verified read-only code tools: quant diagnostics + agent-ops preflight, no source exposure.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to safely explore and diagnose remote servers by providing a read-only sandbox with controlled access to files, logs, Docker, and databases. It exposes MCP tools that allow natural-language investigation and direct command execution without write permissions.4-
- AlicenseNot gradedqualityBmaintenanceProvides read-only production observability through a small set of tools for health, job status, latest data, approved logs, and deployment metadata, enabling AI planning and review without a production write path.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI clients to inspect git history, Docker containers, read-only PostgreSQL, HTTP endpoints, and logs through operator-defined allow-lists, with every access audited and secrets redacted.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to triage Kubernetes incidents using read-only cluster diagnostics, secret-redacted logs and events, and proposed changes that require explicit human approval before execution.MIT