Alertmanager MCP Server
Alertmanager is the notification brain of the Prometheus ecosystem — but operating it effectively requires deep knowledge. Understanding the routing tree to know who gets paged, creating silences with the right matchers and durations, auditing why an alert didn't reach the right receiver, and managing maintenance windows all require intimate familiarity with Alertmanager's configuration model. If you ask an AI assistant to help, it typically guesses at matcher syntax, creates overly broad silences, or can't explain the routing logic.
This server fixes that. It gives AI assistants (Claude, Cline, Cursor, or your own agent) structured, safe tools to operate Alertmanager natively. Instead of guessing at matchers or writing silence payloads from memory, your AI can now confidently manage the entire alert lifecycle:
- On-Call Triage. The AI summarizes active alerts grouped by severity and service, explains routing paths, and identifies alerts falling into the default route — all in one guided workflow.
- Safe Silence Management. Mandatory preview dry-runs before creating silences, duplicate detection, 24-hour duration caps, blast-radius warnings, and policy validation — preventing overly broad silences that could mask real incidents.
- Routing Introspection. Simulate routing for any label set, inspect the full routing tree, list receivers with integration types, and audit which alerts hit the default route.
- Governance & Compliance. Export effective configuration for Git storage, audit recent silence changes with author tracking, and validate proposed silences against organizational policy.
- Multi-Backend Support. Manage multiple Alertmanager backends with explicit
backend_idon every call — no hidden defaults.
Key Features
Backend Discovery & Multi-Backend
- Discover and inspect multiple Alertmanager backends
- Health checks, version info, cluster peer status
- Supports standalone and clustered Alertmanager deployments
Alert Triage & On-Call
- List and filter alerts by label, severity, state, and receiver
- Alert group inspection (Alertmanager's native grouping)
- Human-readable on-call summaries with severity/service breakdowns
- Push test alerts to verify notification integrations
Silence Lifecycle Management
- Full CRUD: create, update (extend), expire silences
- Mandatory preview dry-run before broad silences
- Duplicate silence detection — blocks creating equivalent active silences
- 24-hour duration cap (configurable)
- LLM-friendly
silence_alerthelper with scope control (instance/service/env) - Policy validation for compliance checks
Routing & Notification Introspection
- Full nested routing tree inspection
- Receiver enumeration with integration type detection (Slack, PagerDuty, email, webhook)
- Route simulation for any label set with human-readable explanations
- Default route audit — identifies misconfigured alerts
Governance & Audit
- Export effective configuration as YAML or JSON
- Track recent silence lifecycle changes with author attribution
- In-memory audit log for all MCP-initiated operations
- Silence policy validation (duration caps, comment requirements, blast radius)
Architecture
The server translates high-level MCP requests into Alertmanager v2 API calls through a service layer.
How it works:
- An AI assistant connects via HTTP, SSE, or stdio
- The AI loads
am://system/backendsresource to discover available backends - Every subsequent tool call requires an explicit
backend_id— no hidden state - The service layer interacts with Alertmanager's v2 HTTP API
- Safety guardrails enforce silence duration caps and blast-radius warnings
Relationship with Prometheus MCP Server
The Alertmanager and Prometheus MCP Servers are complementary:
| Concern | Prometheus MCP Server | Alertmanager MCP Server |
|---|---|---|
| Metrics | Query, explore, onboard | — |
| Alert Rules | Draft, test, simulate, deploy | — |
| Active Alerts | — | Triage, summarize, filter |
| Silences | — | Create, preview, expire, audit |
| Routing | — | Inspect, simulate, audit |
| Notifications | — | Receiver enumeration, test alerts |
Use both together for full observability coverage — Prometheus for the metric and rule layer, Alertmanager for the notification and silence layer.
Tech Stack
| Category | Technologies |
|---|---|
| Language | Python 3.12+ |
| MCP Framework | FastMCP ≥2.13.3 |
| Protocol | Model Context Protocol (MCP) |
| Alertmanager | HTTP API v2 · Silence API · Route Simulation |
| Transport | HTTP · SSE · Streamable-HTTP · stdio |
| Infrastructure | Docker · uv |
Quick Start
You'll need access to an Alertmanager instance (standalone or clustered).
Docker (recommended):
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
Point your MCP client at it:
{
"mcpServers": {
"alertmanager": {
"url": "http://localhost:8768/mcp",
"description": "MCP Server for Alertmanager alert triage, silence management, and routing"
}
}
}
Security
- Never expose the MCP server to the public internet without proper authentication
- Silences affect real alert notifications — always preview before creating silences in production
- Test alerts fire real notifications —
am_push_test_alertwill trigger downstream integrations (Slack, PagerDuty, email) - Configuration export may contain sensitive routing rules — treat exported configs as confidential
Project Layout
alertmanager-mcp-server/
├── alertmanager_mcp_server/
│ ├── tools/ # 14 MCP Tools across 6 categories
│ ├── resources/ # 11 MCP Resources (am:// URIs)
│ ├── prompts/ # 3 Guided workflow prompts
│ ├── services/ # Alertmanager HTTP API wrapper
│ ├── server/ # FastMCP setup
│ ├── utils/ # Matcher logic, audit log
│ ├── models/ # Pydantic data models
│ ├── exceptions/ # Custom exception hierarchy
│ ├── config.py # Environment parsing
│ └── main.py # Entry point
├── tests/ # Test suites
├── docs/ # Workflow guides & test documentation
├── Dockerfile
├── pyproject.toml
└── README.md
Next Steps
- Configuration — Environment variables, Docker setup, multi-backend, silence safety
- Tools — Full reference for all 14 MCP tools
- Resources — 11 MCP resources for discovery and monitoring
- Common Workflows — Step-by-step workflow guides
- Examples — Quick reference and natural language prompts