{
  "markdown": "# Alertmanager MCP Server (Go)\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![npm version](https://img.shields.io/npm/v/mcp-alertmanager)](https://www.npmjs.com/package/mcp-alertmanager)\n[![Go](https://img.shields.io/badge/Go-1.25-00ADD8?logo=go)](https://go.dev/)\n[![GitHub release](https://img.shields.io/github/v/release/jeanlopezxyz/mcp-alertmanager?sort=semver)](https://github.com/jeanlopezxyz/mcp-alertmanager/releases/latest)\n\nA [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for Prometheus Alertmanager integration. Native Go binary with built-in Kubernetes connectivity via client-go.\n\n## Installation\n\n### npx\n\n```bash\nnpx -y mcp-alertmanager@latest\n```\n\n### MCP Client Configuration\n\nAdd to your MCP client configuration (VS Code, Cursor, Windsurf, etc.):\n\n```json\n{\n  \"mcpServers\": {\n    \"alertmanager\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-alertmanager@latest\"],\n      \"env\": {\n        \"ALERTMANAGER_URL\": \"http://localhost:9093\"\n      }\n    }\n  }\n}\n```\n\n### VS Code\n\n```shell\ncode --add-mcp '{\"name\":\"alertmanager\",\"command\":\"npx\",\"args\":[\"-y\",\"mcp-alertmanager@latest\"],\"env\":{\"ALERTMANAGER_URL\":\"http://localhost:9093\"}}'\n```\n\n### Kubernetes Auto-Connect\n\nAutomatically 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.\n\nDefault: `openshift-monitoring/alertmanager-operated:9093`\n\n```json\n{\n  \"mcpServers\": {\n    \"alertmanager\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-alertmanager@latest\"]\n    }\n  }\n}\n```\n\n### Binary\n\nDownload from [GitHub Releases](https://github.com/jeanlopezxyz/mcp-alertmanager/releases) or build from source:\n\n```bash\nmake build\n./mcp-alertmanager\n```\n\n---\n\n## Configuration\n\n### Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `ALERTMANAGER_URL` | Direct Alertmanager API URL (overrides K8S auto-connect) |\n\n### CLI Flags\n\n| Flag | Description | Default |\n|------|-------------|---------|\n| `--url` | Direct Alertmanager URL | - |\n| `--namespace` | Kubernetes namespace | `openshift-monitoring` |\n| `--service` | Kubernetes service name | `alertmanager-operated` |\n| `--service-port` | Kubernetes service port | `9093` |\n| `--service-scheme` | Service scheme (http/https) | `https` |\n| `--kubeconfig` | Path to kubeconfig file | auto-detect |\n\n**Precedence:** `--url` / `ALERTMANAGER_URL` > K8S auto-connect\n\n**Connection strategy:**\n1. Direct URL (if `--url` or `ALERTMANAGER_URL` is set)\n2. K8S API proxy (auto-detect kubeconfig or in-cluster config)\n\n---\n\n## Tools (12)\n\n### Alerts\n\n| Tool | Description |\n|------|-------------|\n| `getAlerts` | Get alerts with optional filters |\n| `getAlertGroups` | Get alerts grouped by routing labels |\n| `getCriticalAlerts` | Get critical severity alerts only |\n| `getAlertingSummary` | Summary: counts by severity, top alerts, namespaces |\n\n### Silences\n\n| Tool | Description |\n|------|-------------|\n| `getSilences` | List silences by state |\n| `createSilence` | Create a silence for an alert |\n| `deleteSilence` | Delete a silence by ID |\n\n### Status\n\n| Tool | Description |\n|------|-------------|\n| `getAlertmanagerStatus` | Server status, version, cluster info |\n| `getReceivers` | List notification receivers |\n\n### Troubleshooting\n\n| Tool | Description |\n|------|-------------|\n| `investigateAlert` | Deep investigation of a specific alert |\n| `getAlertHistory` | Alert history and analysis guidance |\n| `correlateAlerts` | Find correlated alerts by shared labels |\n\n---\n\n## Example Prompts\n\n```\n\"What alerts are currently firing?\"\n\"Are there any critical alerts?\"\n\"Give me a summary of the alerting status\"\n\"Investigate the HighMemoryUsage alert\"\n\"Create a 2-hour silence for PodCrashLooping\"\n\"What receivers are configured?\"\n\"Find correlated alerts to identify the root cause\"\n\"Show me alert history for KubeNodeNotReady\"\n```\n\n---\n\n## Development\n\n### Build\n\n```bash\nmake build              # Build for current platform\nmake build-all-platforms # Cross-compile for all platforms\n```\n\n### Container\n\n```bash\npodman build -f Containerfile -t mcp-alertmanager .\n```\n\n---\n\n## Kubernetes / OpenShift Deployment\n\n### Container Image\n\nThe container image is available on GitHub Container Registry:\n\n```\nghcr.io/jeanlopezxyz/mcp-alertmanager:latest\n```\n\n### Helm Chart\n\nDeploy using the included Helm chart:\n\n```bash\n# Add the chart repository (or use local chart)\nhelm upgrade --install mcp-alertmanager ./charts/mcp-alertmanager \\\n  --namespace mcp-servers \\\n  --create-namespace \\\n  --set openshift=true\n```\n\n#### Helm Values\n\n| Parameter | Description | Default |\n|-----------|-------------|---------|\n| `image.registry` | Container registry | `ghcr.io` |\n| `image.repository` | Image repository | `jeanlopezxyz/mcp-alertmanager` |\n| `image.version` | Image tag | `latest` |\n| `openshift` | Enable OpenShift Routes | `false` |\n| `service.port` | Service port | `8080` |\n| `alertmanager.namespace` | Alertmanager namespace | `openshift-monitoring` |\n| `alertmanager.service` | Alertmanager service name | `alertmanager-operated` |\n| `rbac.useClusterReader` | Use cluster-reader role | `true` |\n\n#### Example with custom Alertmanager\n\n```bash\nhelm upgrade --install mcp-alertmanager ./charts/mcp-alertmanager \\\n  --namespace mcp-servers \\\n  --set openshift=true \\\n  --set alertmanager.url=http://alertmanager.monitoring:9093\n```\n\n---\n\n## License\n\n[MIT](LICENSE)\n",
  "bytes": 5532,
  "sha": "f56591952077e4923b9a74f7095f5dc958b0b97be851f77b54ac0c96c8ed363b",
  "repo_slug": "jeanlopezxyz/mcp-alertmanager",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_jeanlopezxyz_mcp_alertmanager_e32bc05a/readme"
}