devops-mcp lets any AI assistant that speaks MCP read from your Kubernetes, Jenkins, GitHub Actions, GitLab CI, AWS, Azure, GCP, ServiceNow, Slack and Teams, so on-call engineers can ask one question instead of checking six dashboards.
New here? Your assistant can look at your servers and build systems and explain what it finds, but it cannot change them.
It is an MCP server. MCP (Model Context Protocol) is the open standard AI clients use to call outside tools, so this works with Claude, Cursor, VS Code Copilot, Gemini CLI, OpenAI Codex CLI, Windsurf, Zed and anything else that supports MCP. No model vendor is required.
You need Python 3.11 or later, pipx on your PATH, and any MCP client.
pipx install "git+https://github.com/gerardrecinto/devops-mcp.git"
devops-mcp --print-config cursor
devops-mcp --check--print-config prints the setup for your client and where to paste it. Pick one of claude-code, claude-desktop, cursor, windsurf, vscode, gemini-cli, codex, zed or http. --check prints which services have local configuration and what to do next. It does not make network requests or verify credentials. Then ask your assistant:
Which pods are failing in my cluster?
With no other setup it uses your current kubeconfig (~/.kube/config), so the answer is about your real cluster. A service you have not set up returns a plain "not configured" error.
This installs from GitHub on purpose. The devops-mcp package on PyPI is a different project, and this one is not published there yet.
Illustrative only. The pod names, incident number and times are made up to show the flow. They are not output from a real system.
You: "The API deployment has been stuck for 20 minutes. What's going on?"
Assistant:
[k8s_get_deployment_status("api-server", "production")]
desired: 3 ready: 1 updated: 3 strategy: RollingUpdate
[k8s_get_failing_pods("production")]
api-server-7d9f8b-xk2p9 CrashLoopBackOff restarts: 14
[k8s_pod_logs("api-server-7d9f8b-xk2p9", tail_lines=30)]
[09:10:03] FATAL postgresql://db-prod:5432: Connection refused
[k8s_get_events("production", event_type="Warning")]
OOMKilling Pod/db-prod-0 "Memory limit exceeded" count: 3
Assistant: db-prod-0 was OOMKilled, so the API pods cannot reach the database.
Copy .env.example to ~/.devops-mcp/.env and fill in only the services you use. The server reads that file on start, then restart your client. Run devops-mcp --check again to check that the configuration is present. An actual tool call verifies access.
Azure, GCP and Slack need extra packages:
pipx install --force "mcp-devops[azure,gcp,slack] @ git+https://github.com/gerardrecinto/devops-mcp.git"To see the output shape before connecting anything, add the demo flag. Every response is then labelled as sample data and is not real information about your systems. Remove the flag once you connect real systems.
claude mcp add devops-mcp -e DEVOPS_MCP_DEMO=1 -- devops-mcpOther clients: set DEVOPS_MCP_DEMO=1 in the env block of the config that --print-config shows.
Three small add-ons that the server does not turn on by itself.
devops_mcp.tracing: OpenTelemetry spans around a tool call. Install withpip install "mcp-devops[otel]", callconfigure_tracing(), then wrap a function with@traced("tool_name"). Spans record the tool name and argument names, never argument values. A sample collector config is indocs/observability/otel-collector.yaml.devops_mcp.slo: multi-window burn-rate alerts (the 14.4x, 6x, 3x and 1x pattern from the Google SRE Workbook). Try it:python -m devops_mcp.slo --slo 0.999 --window 1h=200/10000 --window 5m=20/1000.devops_mcp.evals: score a saved agent run against what a good run must do. Each scenario lists the tools that must be called in order, the tools that must never be called, a call budget, and whether a repeated identical call fails. No model call, no network, so it runs in CI. Try it:python -m devops_mcp.evals examples/eval_scenarios.json examples/eval_traces.json. The shipped example prints one PASS and one FAIL on purpose (the failing run repeats a log fetch) and exits 1.
35 tools. The full list with arguments is in the tool browser, and the tables are below.
| Service | Tools |
|---|---|
| Incident timeline | 1 |
| Kubernetes | 5 |
| Jenkins | 3 |
| GitHub Actions | 2 |
| GitLab CI | 2 |
| AWS | 4 |
| Azure | 4 |
| GCP | 4 |
| ServiceNow | 3 |
| Slack and Teams | 6 |
| Server health | 1 |
slack_post_message and teams_post_message can tell a whole channel something false if an assistant posts before it has looked at anything. With Joltrin the server can refuse a post until this session has read real data from a system.
It needs a Joltrin build with the gate command (in Joltrin's master, not yet in a release: go install github.com/sharedcode/joltrin/v5/cmd/sop-mcp-server@master). Copy examples/order.json and examples/runbooks.json next to each other, then start the server with the file named in the environment:
DEVOPS_MCP_ORDER=$PWD/examples/order.json DEVOPS_MCP_ENABLE_WRITES=1 devops-mcpA post then returns order_not_satisfied until one of the tools listed under record (for example k8s_get_failing_pods) has returned real data in the same server session.
What to know:
- Off unless
DEVOPS_MCP_ORDERis set. Nothing else changes. - Only real data counts. An error, or sample data from demo mode, does not.
- If the file or
sop-mcp-servercannot be used, the two post tools are refused and say why. Read tools keep working. - A session is one server process, or the name in
DEVOPS_MCP_ORDER_SESSION. A long-running server keeps "already looked" until it restarts. - It checks that a read happened, not that its result was good news.
- It is read-only by default. Read-only means no tool applies, deletes, restarts or triggers anything.
- The only writes are Slack and Teams messages, and they are refused unless you set
DEVOPS_MCP_ENABLE_WRITES=1. - Tool calls are logged to
~/.devops-mcp/audit.logwhen audit storage is available, with secret-like values redacted. Audit failures produce a warning and leave the server usable. - It reports what the APIs return. The assistant's explanation of a root cause is a hypothesis to check, not a verdict.
- It does not create or close ServiceNow records, run
kubectl apply, or start builds.
Every tool, by service
| Tool | What it answers |
|---|---|
incident_timeline |
What changed, and what broke, in the last N hours? One ordered view across ServiceNow, Kubernetes, GitHub Actions and Jenkins, with the changes that landed just before the first failure listed as suspects |
Suspects are matched by time proximity (a change within 2 hours before the first failure) and the response says so. A source that is unconfigured, in demo mode or failing is reported as skipped and never filled in with sample data.
| Tool | What it answers |
|---|---|
k8s_get_failing_pods |
What pods are crashing right now? |
k8s_pod_logs |
What is this pod printing? |
k8s_describe_pod |
Full state: conditions, restart counts, events |
k8s_get_events |
What Warnings has the cluster emitted? |
k8s_get_deployment_status |
Is this rollout progressing or stuck? |
| Tool | What it answers |
|---|---|
jenkins_get_build_status |
Did build #N succeed, and how long did it take? |
jenkins_get_build_log |
Last N lines of a build |
jenkins_list_failing_jobs |
Which jobs are currently red? |
| Tool | What it answers |
|---|---|
gh_get_workflow_run |
Status and conclusion for a specific run |
gh_list_failed_runs |
Which workflows have failed in the last 24 hours? |
| Tool | What it answers |
|---|---|
gl_get_pipeline |
Status, ref and duration of one pipeline |
gl_list_failed_pipelines |
Which pipelines failed recently? Works with gitlab.com or a self-hosted GITLAB_URL |
| Tool | What it answers |
|---|---|
aws_get_cloudwatch_logs |
What did this log group emit? |
aws_get_metric |
Current CloudWatch metric value |
aws_describe_s3_bucket |
Versioning, lifecycle, encryption config |
aws_get_ecs_service_status |
Running vs desired vs pending |
| Tool | What it answers |
|---|---|
azure_get_monitor_logs |
KQL query against Log Analytics |
azure_get_metric |
Azure Monitor metric |
azure_get_aks_node_status |
AKS node pool state |
azure_get_resource_health |
Is this Azure resource healthy? |
| Tool | What it answers |
|---|---|
gcp_get_logs |
Cloud Logging filter query |
gcp_get_metric |
Cloud Monitoring metric |
gcp_get_gke_cluster_status |
GKE cluster and node pool status |
gcp_get_cloud_run_status |
Cloud Run revision and traffic split |
| Tool | What it answers |
|---|---|
snow_list_incidents |
Open incidents right now |
snow_get_incident |
Full detail on INC0012345 |
snow_get_change_requests |
Scheduled or in-flight changes |
| Tool | What it does |
|---|---|
slack_post_message |
Post to a channel (needs DEVOPS_MCP_ENABLE_WRITES=1) |
slack_get_channel_history |
What was said in #incidents recently? |
slack_search_messages |
Search Slack messages across channels |
teams_post_message |
Post an alert card via webhook (needs DEVOPS_MCP_ENABLE_WRITES=1) |
teams_get_channel_messages |
Recent messages in a Teams channel (Graph API) |
teams_list_channels |
Channels in a Teams team (Graph API) |
| Tool | What it answers |
|---|---|
devops_mcp_health |
Which integrations are configured, and are demo mode and writes on? |
Tool failures come back as {"error", "message", "hint"} instead of a stack trace.
Docker
The image includes every integration. It speaks MCP over stdio, so the client starts it:
docker pull ghcr.io/gerardrecinto/devops-mcp:latest
claude mcp add devops-mcp -- docker run -i --rm --env-file ~/.devops-mcp/.env \
-v ~/.kube:/home/devops-mcp/.kube:ro ghcr.io/gerardrecinto/devops-mcp:latestOther clients and HTTP
Most clients start the server themselves over stdio. devops-mcp --print-config <client> prints the exact snippet.
For a client or agent framework that connects over the network, run it as an HTTP server:
devops-mcp --transport streamable-http --port 8000It listens on 127.0.0.1 and the endpoint is http://127.0.0.1:8000/mcp. --transport sse is also available for older clients. There is no authentication on this port. If you bind another address with --host, put a reverse proxy that checks credentials in front of it.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json, then restart:
{
"mcpServers": {
"devops-mcp": {
"command": "devops-mcp"
}
}
}Credentials go in ~/.devops-mcp/.env (see .env.example). To try sample data first, add "env": { "DEVOPS_MCP_DEMO": "1" } and remove it later.
Why it is built this way
A first draft of "wrap the Kubernetes API in an MCP tool" is easy. The parts that make it safe to run against production are not, and each one is tested here:
- One timeline instead of six dashboards.
incident_timelinemerges changes, CI failures, cluster warnings and incidents into one ordered view and names the changes that landed shortly before things broke. That cross-system join is the part a single-service wrapper does not give you. - It never invents data. An unconfigured service returns a plain "not configured" error. Sample data is opt-in (
DEVOPS_MCP_DEMO=1) and every response is labelled, so an assistant cannot report a made-up OOMKill or a Slack message that was never sent. - It finds the failures that matter. A crash-looping pod reports phase
Running; the reason sits on the container state. The pod check reads container waiting and terminated reasons, so CrashLoopBackOff and ImagePullBackOff are caught, not justPending. - Read-only by default. No tool applies, deletes, restarts or triggers anything. The only writes are Slack and Teams messages, and those are refused unless the operator sets
DEVOPS_MCP_ENABLE_WRITES=1. - Prompt-injection aware. A webhook URL supplied by the model is ignored unless its host is in
DEVOPS_MCP_TEAMS_WEBHOOK_ALLOWLISTand is an https Microsoft endpoint, so injected text in a log line cannot make the server POST channel content to an arbitrary host. - A private audit trail. When audit storage is available, each tool call is logged as one JSON line in
~/.devops-mcp/audit.log(mode 0600, rotated at 10 MB). Secret-like parameters are redacted, message tools log the destination and a SHA-256 of the body instead of the body, and an audit initialization or write failure is logged without stopping the server. - Bounded output. Pod logs are capped by lines and bytes (a cut is marked
[truncated ...]), and Jenkins console logs are streamed so a multi-hundred-MB build log cannot exhaust memory. - Partial installs work. Each integration loads on its own; one broken module never stops the rest.
Architecture
See docs/architecture.md for the full protocol flow, tool registration, and audit logging diagrams.
+-----------------------------------------------------------------------+
| AI assistant (any MCP client) |
| "Why is production down?" / "Which jobs are failing right now?" |
+-----------------------------------+-----------------------------------+
| MCP Protocol (stdio)
v
+-----------------------------------------------------------------------+
| devops-mcp server |
| |
| Kubernetes | Jenkins/GHA | AWS | Azure |
| pods/events | build logs | CW logs | Monitor/AKS |
| deployment | failing jobs | metrics/ECS | resource health |
| | | | |
| GCP | ServiceNow | Slack | Teams |
| Cloud Logs | incidents | post/search | post/messages |
| GKE/Run | changes | history | channels |
| |
| Audit log (~/.devops-mcp/audit.log) |
+-----------------------------------------------------------------------+
Partial installs
Each tool module (Kubernetes, Jenkins, AWS, etc.) loads independently. If a module fails to import, the server logs the error and continues. Every other module still registers its tools normally. The version is logged at startup.
A service without credentials answers with a "not configured" error instead of guessing. Set DEVOPS_MCP_DEMO=1 to get labelled sample data instead.
Security
Infrastructure tools are read-only. The assistant can observe and explain, not modify. The Slack and Teams post tools are the only writes, and they are off until you set DEVOPS_MCP_ENABLE_WRITES=1.
| Action | Available |
|---|---|
| Read pod logs, events, deployment status | yes |
| Read build logs and pipeline status | yes |
| Read CloudWatch / Azure Monitor / Cloud Logging | yes |
| Read ServiceNow incidents and changes | yes |
| Post to Slack / Teams | only with DEVOPS_MCP_ENABLE_WRITES=1 |
kubectl apply / trigger builds / modify resources |
no |
| Create or close ServiceNow records | no |
To let the model pick a Teams webhook per call, list the allowed hosts in DEVOPS_MCP_TEAMS_WEBHOOK_ALLOWLIST (comma-separated). Otherwise only TEAMS_WEBHOOK_URL is used.
Credentials are environment variables only. Each service is independently optional.
When audit storage is available, tool calls are appended to ~/.devops-mcp/audit.log with secret-like parameters redacted.
For the commercial path, launch angles, and first-customer profile, see docs/go-to-market.md.
Run the tests
pip install -e ".[dev]"
pytest tests/ -v --cov=devops_mcpRoadmap
- Grafana alert history
- PagerDuty incident lookup
- Terraform state drift detection
- ArgoCD sync status
- SSE transport
For the commercial path and first-customer profile, see docs/go-to-market.md.
Each release has SHA256SUMS and SHA256SUMS.asc, a PGP signature made with the release signing key in release-signing-key.asc. Key fingerprint: 2E2B 3624 9A63 F824 1934 B6CF 0162 AE8B BEF8 D486.
gh release download "$(gh release view --repo gerardrecinto/devops-mcp --json tagName -q .tagName)" --repo gerardrecinto/devops-mcp
curl -sO https://raw.githubusercontent.com/gerardrecinto/devops-mcp/main/release-signing-key.asc
gpg --import release-signing-key.asc
gpg --verify SHA256SUMS.asc SHA256SUMS
shasum -a 256 -c SHA256SUMSgpg --verify should say Good signature and show the fingerprint above. A good signature proves the checksums file was signed by whoever holds that key, so compare the fingerprint with the one in other places you trust before relying on it. Then shasum -a 256 -c checks that your downloaded files match. Releases before the one that added SHA256SUMS.asc were signed after the fact, from checksums that matched the published files.
MIT
Optional paid help: scoped reviews and setup.