This project implements a Model Context Protocol (MCP) server that integrates with Prometheus Alertmanager. It serves as a bridge between Claude AI and Alertmanager, allowing Claude to interact with and manage alerts through a standardized interface.
Alert Retrieval: Fetches and formats current alerts from Alertmanager with optional filtering capabilities.
Alert Details: Provides detailed information about specific alerts when referenced by their fingerprint.
Silence Management: Offers tools to create, list, and delete silences that suppress notifications for specific alerts.
Alert Grouping: Retrieves alert groups as organized by Alertmanager.
The package is available on npm and can be used directly with npx:
npx alertmanager-mcp
For global installation:
npm install -g alertmanager-mcp
alertmanager-mcp
{
"mcpServers": {
"alertmanager": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--network=host",
"-e", "ALERTMANAGER_URL=http://your-alertmanager-url:9093",
"ghcr.io/kaznak/alertmanager-mcp:latest"
],
"env": {}
}
}
}
Restart Claude for Desktop to load the new configuration.
You can now ask Claude to interact with Alertmanager using natural language:
Retrieves a list of alerts with optional filtering.
Parameters:
filter
: (optional) Filtering query (e.g., alertname=~'.*CPU.*'
)silenced
: (optional) Include silenced alertsinhibited
: (optional) Include inhibited alertsactive
: (optional) Include active alerts (default: true)Gets detailed information about a specific alert.
Parameters:
fingerprint
: Alert fingerprintCreates a silence for alerts matching specified criteria.
Parameters:
matchers
: List of matchers for alertsstartsAt
: (optional) Silence start time (ISO8601 format, default is current time)endsAt
: Silence end time (ISO8601 format)createdBy
: Username who created the silencecomment
: Reason or explanation for the silenceRetrieves a list of silences with optional filtering.
Parameters:
filter
: (optional) Filtering query (e.g., createdBy=~'.*admin.*'
)Deletes a silence by ID.
Parameters:
silenceId
: ID of the silence to deleteGets alert groups with optional filtering.
Parameters:
active
: (optional) Include active alerts (default: true)silenced
: (optional) Include silenced alertsinhibited
: (optional) Include inhibited alertsThis MCP server can be extended with additional features such as:
{
"mcpServers": {
"alertmanager": {
"env": {},
"args": [
"run",
"--rm",
"-i",
"--network=host",
"-e",
"ALERTMANAGER_URL=http://your-alertmanager-url:9093",
"ghcr.io/kaznak/alertmanager-mcp:latest"
],
"command": "docker"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.