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 "Install 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: Prometheus Alertmanager 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 installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jeanlopezxyz/mcp-alertmanager'
If you have feedback or need assistance with the MCP directory API, please join our Discord server