mcp-alertmanager
Automatically connects to Alertmanager running in a Kubernetes cluster via the Kubernetes API proxy, enabling seamless integration without manual URL configuration.
Provides tools for querying and managing Prometheus Alertmanager, including retrieving alerts, creating silences, investigating alert history, and correlating alerts.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-alertmanagerWhat alerts are currently firing?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Alertmanager MCP Server (Go)
A Model Context Protocol (MCP) server for Prometheus Alertmanager integration. Native Go binary with built-in Kubernetes connectivity via client-go.
Installation
npx
npx -y mcp-alertmanager@latestMCP Client Configuration
Add to your MCP client configuration (VS Code, Cursor, Windsurf, etc.):
{
"mcpServers": {
"alertmanager": {
"command": "npx",
"args": ["-y", "mcp-alertmanager@latest"],
"env": {
"ALERTMANAGER_URL": "http://localhost:9093"
}
}
}
}VS Code
code --add-mcp '{"name":"alertmanager","command":"npx","args":["-y","mcp-alertmanager@latest"],"env":{"ALERTMANAGER_URL":"http://localhost:9093"}}'Kubernetes Auto-Connect
Automatically connects to Alertmanager running in OpenShift/Kubernetes via the K8S API service proxy. Uses native kubeconfig/in-cluster config via client-go. No kubectl or port-forwarding required.
Default: openshift-monitoring/alertmanager-operated:9093
{
"mcpServers": {
"alertmanager": {
"command": "npx",
"args": ["-y", "mcp-alertmanager@latest"]
}
}
}Binary
Download from GitHub Releases or build from source:
make build
./mcp-alertmanagerRelated MCP server: Opsgenie MCP Server
Configuration
Environment Variables
Variable | Description |
| Direct Alertmanager API URL (overrides K8S auto-connect) |
CLI Flags
Flag | Description | Default |
| Direct Alertmanager URL | - |
| Kubernetes namespace |
|
| Kubernetes service name |
|
| Kubernetes service port |
|
| Service scheme (http/https) |
|
| Path to kubeconfig file | auto-detect |
Precedence: --url / ALERTMANAGER_URL > K8S auto-connect
Connection strategy:
Direct URL (if
--urlorALERTMANAGER_URLis set)K8S API proxy (auto-detect kubeconfig or in-cluster config)
Tools (12)
Alerts
Tool | Description |
| Get alerts with optional filters |
| Get alerts grouped by routing labels |
| Get critical severity alerts only |
| Summary: counts by severity, top alerts, namespaces |
Silences
Tool | Description |
| List silences by state |
| Create a silence for an alert |
| Delete a silence by ID |
Status
Tool | Description |
| Server status, version, cluster info |
| List notification receivers |
Troubleshooting
Tool | Description |
| Deep investigation of a specific alert |
| Alert history and analysis guidance |
| Find correlated alerts by shared labels |
Example Prompts
"What alerts are currently firing?"
"Are there any critical alerts?"
"Give me a summary of the alerting status"
"Investigate the HighMemoryUsage alert"
"Create a 2-hour silence for PodCrashLooping"
"What receivers are configured?"
"Find correlated alerts to identify the root cause"
"Show me alert history for KubeNodeNotReady"Development
Build
make build # Build for current platform
make build-all-platforms # Cross-compile for all platformsContainer
podman build -f Containerfile -t mcp-alertmanager .Kubernetes / OpenShift Deployment
Container Image
The container image is available on GitHub Container Registry:
ghcr.io/jeanlopezxyz/mcp-alertmanager:latestHelm Chart
Deploy using the included Helm chart:
# Add the chart repository (or use local chart)
helm upgrade --install mcp-alertmanager ./charts/mcp-alertmanager \
--namespace mcp-servers \
--create-namespace \
--set openshift=trueHelm Values
Parameter | Description | Default |
| Container registry |
|
| Image repository |
|
| Image tag |
|
| Enable OpenShift Routes |
|
| Service port |
|
| Alertmanager namespace |
|
| Alertmanager service name |
|
| Use cluster-reader role |
|
Example with custom Alertmanager
helm upgrade --install mcp-alertmanager ./charts/mcp-alertmanager \
--namespace mcp-servers \
--set openshift=true \
--set alertmanager.url=http://alertmanager.monitoring:9093License
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage incident alerts, events, and workflows with custom automations
Manage incidents and on-call: list/create/update incidents, who is on call, on-call overrides.
Read Spike.sh incidents, on-call, escalations and services; acknowledge, resolve, set priority.
Read incidents, services, teams, on-call schedules; acknowledge, resolve and note incidents.
Related MCP Servers
- AlicenseBqualityCmaintenanceA Model Context Protocol (MCP) server that enables AI assistants to integreate with Prometheus Alertmanager924Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables comprehensive Opsgenie alert management including listing, creating, acknowledging, and closing alerts, as well as managing alert notes, logs, and custom properties through natural language.157 npmMIT
- AlicenseCqualityDmaintenanceEnables interaction with Prometheus Alertmanager to retrieve, filter, and manage alerts and silences through natural language commands in Claude AI.610 npmMIT
- FlicenseAqualityDmaintenanceEnables AI agents to query Prometheus metrics and Loki logs for intelligent alert investigation and troubleshooting. Provides service discovery, metric querying, log searching, and correlation tools to help identify root causes of issues.9-