Alertmanager MCP server
The Alertmanager MCP Server is a Model Context Protocol server for Prometheus Alertmanager incident triage, maintenance silence management, and routing tree introspection. It exposes 14 tools, 11 am:// resources, and 3 guided operational prompts with built-in blast-radius previews and duration caps to prevent overly broad silences.
Summarize firing alerts by severity, preview silence blast radius before creation, simulate routing trees, and audit default-route catch-alls.
Inspect configured Alertmanager backends (am://system/backends), active alert groups, receivers, and silence audit logs.
Step-by-step runbooks for incident alert triage, maintenance window silences, and routing tree debugging.
Configure multi-backend connections, maximum silence duration caps (24h default), and policy validation rules.
Core capabilities
| Capability Domain | What the Server Provides |
|---|---|
| On-Call Alert Triage | Filters active alerts by label matchers, severity, state, and receiver; groups alerts natively and produces concise on-call shift summaries. |
| Safe Silence Lifecycle | Enforces dry-run blast-radius previews before creating broad silences, blocks duplicate active silences, caps maximum duration (24h default), and requires author/ticket attribution. |
| Routing Tree Introspection | Parses the full nested Alertmanager routing tree, enumerates receivers (PagerDuty, Slack, OpsGenie, webhook), simulates routing paths for arbitrary label sets, and audits unrouted default-route alerts. |
| Governance & Compliance | Exports effective Alertmanager configurations as YAML/JSON, tracks silence creation/expiration history, and validates proposed silences against organizational policy. |
How Prometheus and Alertmanager MCP servers work together
| Operational Concern | Prometheus MCP Server | Alertmanager MCP Server |
|---|---|---|
| Time-Series Metrics | Execute PromQL, onboard /metrics, manage exporters | — |
| Alerting Rules | Draft, unit-test, simulate, and deploy PrometheusRule CRDs | — |
| Firing Alerts | — | Triage, group, filter, and summarize active alerts |
| Maintenance Silences | — | Preview blast radius, create, extend, expire, and audit silences |
| Notification Routing | — | Simulate label routing, inspect receivers, and push test alerts |
Architecture
Quickstart
Ensure you have network access to a standalone or clustered Alertmanager HTTP API v2 endpoint (default port 9093).
Run the container pointing to your Alertmanager base URL:
docker run --rm -it \
-p 8768:8768 \
-e ALERTMANAGER_BASE_URL=http://host.docker.internal:9093 \
-e MCP_TRANSPORT=http \
talkopsai/alertmanager-mcp-server:latest
Add the endpoint to your MCP client configuration:
{
"mcpServers": {
"alertmanager": {
"url": "http://localhost:8768/mcp",
"description": "MCP Server for Alertmanager alert triage, silence management, and routing"
}
}
}
Security and silence guardrails
- Mandatory blast-radius preview: Always preview which active alerts match a proposed matcher set (
am_preview_silence) before creating a production silence. - Test alert caution: Calling
am_push_test_alertdispatches a real notification through your Alertmanager routing tree—target non-paging receivers when testing integrations. - Explicit
backend_idscoping: Every tool invocation requires an explicitbackend_idso silences are never created on the wrong cluster.
Project structure
alertmanager-mcp-server/
├── alertmanager_mcp_server/
│ ├── tools/ # 14 MCP tools across 6 functional categories
│ ├── resources/ # 11 MCP resources (am:// URIs)
│ ├── prompts/ # 3 guided workflow prompts
│ ├── services/ # Alertmanager v2 HTTP API client service
│ ├── server/ # FastMCP server setup
│ ├── utils/ # Matcher evaluation and in-memory audit log
│ ├── models/ # Pydantic schemas
│ └── config.py # Multi-backend and silence policy configuration
├── tests/ # Automated test suite
├── Dockerfile
└── pyproject.toml