# alertmanager-mcp-server [Health: Active]

**Category:** 📊 Monitoring  
**Repository:** https://github.com/ntk148v/alertmanager-mcp-server  
**GitHub Stars:** 26  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/alertmanager-mcp-server

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

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/ntk148v/alertmanager-mcp-server), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Add to your MCP client:

```sh
npx -y @smithery/cli install @ntk148v/alertmanager-mcp-server --client claude
```

2. Install:

```sh
git clone https://github.com/ntk148v/alertmanager-mcp-server.git
```

3. Start the server:

```sh
MCP_TRANSPORT=sse MCP_API_KEY=change-me MCP_HOST=0.0.0.0 MCP_PORT=8080 python3 -m src.alertmanager_mcp_server.server
```

4. Start the server:

```sh
python3 -m src.alertmanager_mcp_server.server --transport http --host 127.0.0.1 --port 9000
```

5. Install:

```sh
make install
```

6. Start the server:

```sh
docker run -e ALERTMANAGER_URL=http://your-alertmanager:9093 \
    -e ALERTMANAGER_USERNAME=your_username \
    -e ALERTMANAGER_PASSWORD=your_password \
    -e ALERTMANAGER_TENANT=your_tenant_id \
    -p 8000:8000 ghcr.io/ntk148v/alertmanager-mcp-server
```

## Documentation

## What alertmanager-mcp-server does

alertmanager-mcp-server gives MCP clients an interface to Prometheus Alertmanager. It supports operational queries for Alertmanager status, alerts, silences, receivers, and alert groups. It also supports write operations for silences and alerts, allowing an assistant to create, update, or remove silences and submit new alerts.

The server is suited to monitoring workflows where an AI assistant needs to answer questions about active alerts, inspect alert routing resources, or perform controlled Alertmanager actions. Example tasks include finding alerts related to a condition, reviewing silences, checking configured receivers, and silencing an alert for a defined period.

## How it works

The server communicates with Alertmanager through its API v2 and exposes the resulting operations as MCP tools. It can run over standard input/output, streamable HTTP, or server-sent events. Standard input/output is the default transport; HTTP and SSE use an embedded ASGI server.

Alert, silence, and alert-group list operations support pagination. Callers can provide an offset and page size, and responses include the total number of results, the current offset, the returned count, and whether additional results are available. Default and maximum page sizes are constrained to reduce model context usage: alerts default to 10 items and allow up to 25, silences default to 10 and allow up to 50, and alert groups default to 3 and allow up to 5.

For multi-tenant installations such as Grafana Mimir or Cortex, `ALERTMANAGER_TENANT` fixes the tenant when the process starts. The tenant is not selected from request headers, and caller-provided `X-Scope-OrgId` values are ignored.

## Setup and configuration

Run locally with Python 3.12 or newer and `uv`, or use the published Docker image. The Alertmanager endpoint is configured with `ALERTMANAGER_URL`. Basic authentication can be supplied with `ALERTMANAGER_USERNAME` and `ALERTMANAGER_PASSWORD`.

Transport and network settings can be supplied through environment variables or command-line flags, with flags taking precedence. `MCP_TRANSPORT` accepts `stdio`, `http`, or `sse`; `MCP_HOST` and `MCP_PORT` configure HTTP or SSE binding and default to `127.0.0.1` and `8000`. `MCP_API_KEY` adds bearer-token authentication to HTTP and SSE requests. Network deployments should set this key; without it, web transports are unauthenticated and emit a startup warning.

The project includes a Claude Desktop configuration using `uv`, and it can also be installed through Smithery. Docker can run the server directly or as a Claude Desktop MCP process.

## Tools and capabilities

Available tools include:

- `get_status()` for Alertmanager status information.
- `get_alerts(...)` for filtered alert queries with pagination and active, inhibited, or silenced state filters.
- `get_silences(...)` for paginated silence listings.
- `post_silence(silence_dict)` and `delete_silence(silence_id)` for silence management.
- `get_receivers()` for listing configured receivers.
- `get_alert_groups(...)` for filtered, paginated alert-group queries.

The feature set also includes creating new alerts and managing existing silences through Alertmanager resources.

## Limitations and notes

The server requires network access to the configured Alertmanager instance. HTTP and SSE listeners bind to loopback by default. Exposing them externally requires an appropriate proxy or firewall arrangement, and the API key should be configured for network-accessible deployments. Pagination limits are intentionally small for alert groups because each group contains its associated alerts.

_Full upstream README: https://allmcps.com/mcp/alertmanager-mcp-server/readme_

