A Model Context Protocol (MCP) server that enables AI assistants to integreate with Prometheus Alertmanager
Prometheus Alertmanager MCP is a Model Context Protocol (MCP) server for Prometheus Alertmanager. It enables AI assistants and tools to query and manage Alertmanager resources programmatically and securely.
To install Prometheus Alertmanager MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @ntk148v/alertmanager-mcp-server --client claude
## Clone the repository
$ git clone https://github.com/ntk148v/alertmanager-mcp-server.git
## Set environment variables (see .env.sample)
ALERTMANAGER_URL=http://your-alertmanager:9093
ALERTMANAGER_USERNAME=your_username # optional
ALERTMANAGER_PASSWORD=your_password # optional
{
"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"
}
}
}
}
$ make install
$ docker run -e ALERTMANAGER_URL=http://your-alertmanager:9093 \
-e ALERTMANAGER_USERNAME=your_username \
-e ALERTMANAGER_PASSWORD=your_password \
-p 8000:8000 ghcr.io/ntk148v/alertmanager-mcp-server
{
"mcpServers": {
"alertmanager": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e", "ALERTMANAGER_URL",
"-e", "ALERTMANAGER_USERNAME",
"-e", "ALERTMANAGER_PASSWORD",
"ghcr.io/ntk148v/alertmanager-mcp-server:latest"
],
"env": {
"ALERTMANAGER_URL": "http://your-alertmanager:9093s",
"ALERTMANAGER_USERNAME": "your_username",
"ALERTMANAGER_PASSWORD": "your_password"
}
}
}
}
This configuration passes the environment variables from Claude Desktop to the Docker container by using the -e
flag with just the variable name, and providing the actual values in the env
object.
The MCP server exposes tools for querying and managing Alertmanager, following its API v2:
get_status()
get_alerts()
get_silences()
post_silence(silence_dict)
delete_silence(silence_id)
get_receivers()
get_alert_groups()
See src/alertmanager_mcp_server/server.py for full API details.
Contributions are welcome! Please open an issue or submit a pull request if you have any suggestions or improvements.
This project uses uv to manage dependencies. Install uv following the instructions for your platform.
## Clone the repository
$ git clone https://github.com/ntk148v/alertmanager-mcp-server.git
$ cd alertmanager-mcp-server
$ make setup
## Run test
$ make test
## Run in development mode
$ mcp dev
$ TRANSPORT_MODE=sse mcp dev
## Install in Claude Desktop
$ make install
A beginner-friendly guide server that helps users understand MCP concepts, provides interactive examples, and demonstrates best practices for building MCP integrations. Features tools for exploring MCP capabilities, resources for learning core concepts, and prompts for guided tutorials.
Salesforce MCP Server
An MCP server that provides LLMs access to other LLMs
A Model Context Protocol server for retrieving and analyzing issues from Sentry.io