MCP.so
登录

Prometheus Alertmanager MCP

@ntk148v

关于 Prometheus Alertmanager MCP

A Model Context Protocol (MCP) server that enables AI assistants to integreate with Prometheus Alertmanager

基本信息

分类

开发工具

许可证

Apache-2.0

运行时

python

传输方式

stdio

发布者

ntk148v

提交者

Kien Nguyen-Tuan

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "alertmanager": {
      "command": "uv",
      "args": [
        "--directory",
        "<full path to alertmanager-mcp-server directory>",
        "run",
        "src/alertmanager_mcp_server/server.py"
      ],
      "env": {
        "ALERTMANAGER_URL": "http://your-alertmanager:9093s",
        "ALERTMANAGER_USERNAME": "your_username",
        "ALERTMANAGER_PASSWORD": "your_password"
      }
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Prometheus Alertmanager MCP?

Prometheus Alertmanager MCP is a Model Context Protocol (MCP) server that enables AI assistants to query and manage Prometheus Alertmanager resources programmatically and securely. It exposes tools for interacting with the Alertmanager API v2, including pagination and authentication support.

How to use Prometheus Alertmanager MCP?

Install via Smithery with npx -y @smithery/cli install @ntk148v/alertmanager-mcp-server --client claude, or clone the repository and run locally with uv. Docker images are also available. Configure environment variables for ALERTMANAGER_URL, optional ALERTMANAGER_USERNAME/ALERTMANAGER_PASSWORD, and optional ALERTMANAGER_TENANT. Add the server configuration to your MCP client (e.g., Claude Desktop) and use natural language commands like "Show me current alerts". Supports stdio, http, and sse transports.

Key features of Prometheus Alertmanager MCP

  • Query alertmanager status, alerts, silences, receivers, and alert groups
  • Smart pagination to prevent LLM context window overflow
  • Create, update, and delete silences
  • Create new alerts
  • Authentication support via basic auth environment variables
  • Multi-tenant support via X-Scope-OrgId header (Mimir/Cortex)

Use cases of Prometheus Alertmanager MCP

  • Query current alerts and filter by criteria (silenced, inhibited, active)
  • Create and manage silences for specific alerts
  • List alert groups and receivers for operational overview
  • Handle large numbers of alerts with paginated browsing
  • Integrate alerts into AI-driven incident response workflows

FAQ from Prometheus Alertmanager MCP

What are the prerequisites to run the server?

Python 3.12+ and uv are required. Docker is optional for containerized deployment. The Alertmanager server must be accessible from the MCP server environment.

How do I configure authentication?

Set the ALERTMANAGER_USERNAME and ALERTMANAGER_PASSWORD environment variables. Basic authentication is supported. These are optional; when not set, no credentials are sent.

How does pagination work for alerts, silences, and alert groups?

By default, 10 items per page are returned. The count parameter controls page size (max 25 for alerts, 50 for silences, 5 for alert groups) and offset controls skip. The response includes has_more to indicate additional pages.

What transport options are available and how do I configure them?

Three transports are supported: stdio (default), http (streamable HTTP), and sse. Configure via command‑line flags (--transport, --host, --port) or environment variables (MCP_TRANSPORT, MCP_HOST, MCP_PORT).

How do I set up multi-tenant support?

Set the ALERTMANAGER_TENANT environment variable for a static tenant, or include the X-Scope-OrgId header in requests for per‑request tenant switching. The header takes precedence over the static configuration.

评论

开发工具 分类下的更多 MCP 服务器