Mcp Alertmanager

io.github.jeanlopezxyzPublished by GitHub account jeanlopezxyzv2.1.1Updated Oct 24, 2026

A Model Context Protocol (MCP) server for Prometheus Alertmanager

Overview

AI-generated overview

An MCP server for Prometheus Alertmanager that lets an assistant read alerts, inspect silences and receivers, and create or delete silences.

What you can do
Query alerts, including grouped, critical-only and summary views with severity counts and namespaces.List and manage silences: view by state, create a silence for an alert, or delete one by ID. Check Alertmanager status, version, cluster info and configured notification receivers. Investigate a specific alert, review alert history and find correlated alerts by shared labels.
When to use it
Useful when you run Prometheus Alertmanager, directly or in OpenShift/Kubernetes, and want an assistant to triage firing alerts, summarize alerting state, or set and clear silences during an incident.
Requirements
A local runtime for the npm package (run via npx) or the Go binary. Access to an Alertmanager endpoint, either through the ALERTMANAGER_URL environment variable or the --url flag, or Kubernetes auto-connect using a kubeconfig or in-cluster config with access to the alertmanager service.
Before you install
Creating and deleting silences changes live alerting behavior and can suppress notifications; confirm before letting an assistant do it. Kubernetes auto-connect uses your kubeconfig or in-cluster credentials, so the server acts with those permissions. The default connection is over https to the cluster service.

Installation

In SourceWeft

  1. Open Mcp Alertmanager in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

Alertmanager MCP Server (Go)

[License: MIT] [npm version] [Go] [GitHub release]

A Model Context Protocol (MCP) server for Prometheus Alertmanager integration. Native Go binary with built-in Kubernetes connectivity via client-go.

Installation

npx

bash
npx -y mcp-alertmanager@latest

MCP Client Configuration

Add to your MCP client configuration (VS Code, Cursor, Windsurf, etc.):

json
{  "mcpServers": {    "alertmanager": {      "command": "npx",      "args": ["-y", "mcp-alertmanager@latest"],      "env": {        "ALERTMANAGER_URL": "http://localhost:9093"      }    }  }}

VS Code

shell
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

json
{  "mcpServers": {    "alertmanager": {      "command": "npx",      "args": ["-y", "mcp-alertmanager@latest"]    }  }}

Binary

Download from GitHub Releases or build from source:

bash
make build./mcp-alertmanager

Configuration

Environment Variables

VariableDescription
ALERTMANAGER_URLDirect Alertmanager API URL (overrides K8S auto-connect)

CLI Flags

FlagDescriptionDefault
--urlDirect Alertmanager URL-
--namespaceKubernetes namespaceopenshift-monitoring
--serviceKubernetes service namealertmanager-operated
--service-portKubernetes service port9093
--service-schemeService scheme (http/https)https
--kubeconfigPath to kubeconfig fileauto-detect

Precedence: --url / ALERTMANAGER_URL > K8S auto-connect

Connection strategy:

  1. Direct URL (if --url or ALERTMANAGER_URL is set)
  2. K8S API proxy (auto-detect kubeconfig or in-cluster config)

Tools (12)

Alerts

ToolDescription
getAlertsGet alerts with optional filters
getAlertGroupsGet alerts grouped by routing labels
getCriticalAlertsGet critical severity alerts only
getAlertingSummarySummary: counts by severity, top alerts, namespaces

Silences

ToolDescription
getSilencesList silences by state
createSilenceCreate a silence for an alert
deleteSilenceDelete a silence by ID

Status

ToolDescription
getAlertmanagerStatusServer status, version, cluster info
getReceiversList notification receivers

Troubleshooting

ToolDescription
investigateAlertDeep investigation of a specific alert
getAlertHistoryAlert history and analysis guidance
correlateAlertsFind 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

bash
make build              # Build for current platformmake build-all-platforms # Cross-compile for all platforms

Container

bash
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:latest

Helm Chart

Deploy using the included Helm chart:

bash
# Add the chart repository (or use local chart)helm upgrade --install mcp-alertmanager ./charts/mcp-alertmanager \  --namespace mcp-servers \  --create-namespace \  --set openshift=true
Helm Values
ParameterDescriptionDefault
image.registryContainer registryghcr.io
image.repositoryImage repositoryjeanlopezxyz/mcp-alertmanager
image.versionImage taglatest
openshiftEnable OpenShift Routesfalse
service.portService port8080
alertmanager.namespaceAlertmanager namespaceopenshift-monitoring
alertmanager.serviceAlertmanager service namealertmanager-operated
rbac.useClusterReaderUse cluster-reader roletrue
Example with custom Alertmanager
bash
helm upgrade --install mcp-alertmanager ./charts/mcp-alertmanager \  --namespace mcp-servers \  --set openshift=true \  --set alertmanager.url=http://alertmanager.monitoring:9093

License

MIT

Source: README.md at commit 649cf0d

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v2.1.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts