Sign inSign up

talkopsai/alertmanager-mcp-server

By talkopsai

•Updated 4 months ago

MCP server for AI-driven Alertmanager — alert triage, silences, routing, and governance

Image
Machine learning & AI
Developer tools
Monitoring & observability
0

275

talkopsai/alertmanager-mcp-server repository overview

⁠Alertmanager MCP Server

A comprehensive Model Context Protocol (MCP) server that gives AI assistants the power to triage alerts, manage silences, inspect routing, and govern Alertmanager operations — from on-call summarization to notification pipeline testing.

⁠✨ Features

  • On-Call Triage: 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 type detection (Slack, PagerDuty, email, webhook), and audit default-route alerts.
  • 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_id on every call — no hidden defaults.
  • Integration Testing: Push test alerts to verify notification pipelines end-to-end.

⁠🚀 How to Use This Image

This Docker image runs an MCP server that connects to your Alertmanager instance(s). AI assistants (Claude, Cline, Cursor, or any MCP client) connect to the server over HTTP, SSE, or stdio.

⁠Running Standalone (HTTP Transport)
docker run --rm -it \
  -p 8769:8769 \
  -e ALERTMANAGER_BASE_URL=http://host.docker.internal:9093 \
  -e MCP_TRANSPORT=http \
  talkopsai/alertmanager-mcp-server:latest

The server is now listening on http://localhost:8769/mcp.

Then configure your MCP client to connect:

{
  "mcpServers": {
    "alertmanager": {
      "url": "http://localhost:8769/mcp",
      "description": "MCP Server for Alertmanager alert triage, silence management, and routing"
    }
  }
}
⁠Multi-Backend Setup

Connect to multiple Alertmanager backends simultaneously:

docker run --rm -it \
  -p 8769:8769 \
  -e MCP_TRANSPORT=http \
  -e ALERTMANAGER_BACKENDS='[
    {"id": "prod", "base_url": "https://alertmanager-prod.example.com"},
    {"id": "staging", "base_url": "https://alertmanager-staging.example.com"}
  ]' \
  talkopsai/alertmanager-mcp-server:latest

⁠🛠️ Configuration (Claude Desktop — Stdio)

To use this image over stdio transport directly inside Claude Desktop:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "alertmanager-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e", "ALERTMANAGER_BASE_URL=http://host.docker.internal:9093",
        "-e", "MCP_TRANSPORT=stdio",
        "-e", "MCP_LOG_LEVEL=INFO",
        "talkopsai/alertmanager-mcp-server:latest"
      ]
    }
  }
}

⁠⚙️ Environment Variables

⁠Server Configuration
VariableDefaultDescription
MCP_TRANSPORThttpTransport protocol: http, sse, streamable-http, or stdio
MCP_HOST0.0.0.0Host interface to bind to
MCP_PORT8769Port for HTTP server
MCP_PATH/mcpMCP endpoint path
MCP_LOG_LEVELINFOLog level: DEBUG, INFO, WARNING, ERROR
MCP_LOG_FORMATjsonLog format: json or text
⁠Alertmanager Backend
VariableDefaultDescription
ALERTMANAGER_BASE_URLhttp://localhost:9093Alertmanager HTTP API base URL
ALERTMANAGER_BACKEND_IDdefaultBackend identifier used in tool calls
ALERTMANAGER_DISPLAY_NAME(empty)Human-readable backend name
ALERTMANAGER_AUTH_HEADER(empty)Authorization header (e.g. Bearer <token>)
ALERTMANAGER_VERIFY_SSLtrueVerify SSL certificates
ALERTMANAGER_TIMEOUT30HTTP timeout for Alertmanager API calls (seconds)
ALERTMANAGER_BACKENDS(empty)JSON array for multi-backend config (overrides single-backend vars)
⁠Silence Safety
VariableDefaultDescription
AM_MAX_SILENCE_MINUTES1440Maximum silence duration in minutes (24h default)
AM_SILENCE_WARNING_THRESHOLD50Warn if a silence would affect ≥ N alerts

⁠🏷️ Supported Tags

  • latest — Latest stable release
  • 0.1.0 — Initial release

⁠🔧 Available Tools (14 Total)

⁠Alert Triage
ToolDescription
am_list_alertsList alerts with label/state filters and pagination
am_list_alert_groupsList alert groups as computed by Alertmanager
am_push_test_alertFire a synthetic test alert to verify notification integrations
⁠Silence Lifecycle
ToolDescription
am_list_silencesList silences with optional state filter and pagination
am_create_silenceCreate a silence with duplicate detection
am_update_silenceUpdate an existing silence (extend duration or modify end time)
am_expire_silenceExpire a silence to reactivate alert notifications
⁠Silence Helpers
ToolDescription
am_preview_silencePreview blast radius of a silence before creating it
am_silence_alertCreate a narrowly-scoped silence for a specific alert
⁠Routing & Notifications
ToolDescription
am_explain_routingSimulate routing for a label set with human-readable explanation
am_audit_default_routeShow alerts hitting the default route (misconfigurations)
⁠Governance & Audit
ToolDescription
am_list_recent_changesList recent silence changes within a time window
am_validate_silence_policyValidate a proposed silence against organizational policy
⁠On-Call Triage
ToolDescription
am_summarize_oncallGenerate a human-readable on-call summary of active alerts

⁠📖 Available Resources (11 URIs)

ResourceDescription
am://system/backendsAll backends with health status — start here
am://system/statusVersion, uptime, cluster info, and config summary
am://system/receiversConfigured receivers (Slack, PagerDuty, email, webhook)
am://system/configRouting tree and inhibition rules (secrets redacted)
am://system/audit-logRecent MCP-initiated operations
am://alerts/activeSnapshot of active alerts
am://alerts/groupsAlert groups as computed by Alertmanager
am://silences/activeSnapshot of active silences
am://best-practicesAlerting best practices
am://onboarding-guideAlert onboarding guide

⁠🔐 Security Best Practices

  1. Never expose the MCP server to the public internet without proper authentication.
  2. Silences affect real alert notifications — always use am_preview_silence before creating silences in production.
  3. Test alerts fire real notifications — am_push_test_alert will trigger downstream integrations (Slack, PagerDuty, email).
  4. Configuration export may contain sensitive routing rules — treat exported configs as confidential.
  5. Silence duration caps — the default 24h cap prevents forgotten silences from masking incidents.

⁠🐳 Docker Compose Example

services:
  alertmanager-mcp-server:
    image: talkopsai/alertmanager-mcp-server:latest
    ports:
      - "8769:8769"
    environment:
      - ALERTMANAGER_BASE_URL=http://alertmanager:9093
      - MCP_TRANSPORT=http
      - MCP_LOG_LEVEL=INFO
    depends_on:
      - alertmanager

  alertmanager:
    image: prom/alertmanager:latest
    ports:
      - "9093:9093"
    volumes:
      - ./alertmanager.yml:/etc/alertmanager/alertmanager.yml

If you find this MCP server useful, consider leaving a ⭐ on the GitHub repository⁠!

Tag summary

Content type

Image

Digest

sha256:1de1c8576…

Size

72.2 MB

Last updated

4 months ago

docker pull talkopsai/alertmanager-mcp-server