alertmanager-mcp-server

Apache 2.0
  • Linux
  • Apple

Integrations

  • Supports containerized deployment of the MCP server through Docker, with configuration via environment variables for connecting to Alertmanager instances.

  • Enables querying and managing Prometheus Alertmanager resources including status, alerts, silences, receivers, and alert groups. Supports creating new alerts, managing silences (create, update, delete), and retrieving alert information through the Alertmanager API v2.

목차

1. 서론

Prometheus Alertmanager MCP는 Prometheus Alertmanager용 모델 컨텍스트 프로토콜 (MCP) 서버입니다. AI 어시스턴트와 도구가 Alertmanager 리소스를 프로그래밍 방식으로 안전하게 쿼리하고 관리할 수 있도록 지원합니다.

2. 특징

  • [x] Alertmanager 상태, 경고, 무음, 수신자 및 경고 그룹 쿼리
  • [x] 침묵 생성, 업데이트 및 삭제
  • [x] 새 알림 만들기
  • [x] 인증 지원(환경 변수를 통한 기본 인증)
  • [x] Docker 컨테이너화 지원

3. 빠른 시작

3.1. 전제 조건

  • 파이썬 3.12+
  • uv (빠른 종속성 관리를 위해).
  • Docker(컨테이너화된 배포의 경우 선택 사항).
  • 이 MCP 서버를 실행할 환경에서 Prometheus Alertmanager 서버에 액세스할 수 있는지 확인하세요.

3.2. 로컬 실행

  • 저장소를 복제합니다.

지엑스피1

  • .env 파일이나 시스템 환경 변수를 통해 Prometheus 서버의 환경 변수를 구성합니다.
# Set environment variables (see .env.sample) ALERTMANAGER_URL=http://your-alertmanager:9093 ALERTMANAGER_USERNAME=your_username # optional ALERTMANAGER_PASSWORD=your_password # optional
  • 클라이언트 설정 파일에 서버 설정을 추가하세요. 예를 들어, Claude Desktop의 경우:
{ "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" } } } }

3.3. 도커 런

  • 미리 빌드된 이미지로 실행하세요(또는 직접 빌드할 수도 있습니다):
$ 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
  • Claude Desktop에서 Docker로 실행:
{ "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" } } } }

이 구성은 -e 플래그와 변수 이름만 사용하여 Claude Desktop에서 Docker 컨테이너로 환경 변수를 전달하고, env 객체에 실제 값을 제공합니다.

4. 도구

MCP 서버는 API v2 에 따라 Alertmanager를 쿼리하고 관리하기 위한 도구를 제공합니다.

  • 상태 가져오기: get_status()
  • 알림 목록: get_alerts()
  • 침묵 목록: get_silences()
  • 침묵 생성: post_silence(silence_dict)
  • 침묵 삭제: delete_silence(silence_id)
  • 수신기 목록: get_receivers()
  • 알림 그룹 나열: get_alert_groups()

전체 API 세부 정보는 src/alertmanager_mcp_server/server.py를 참조하세요.

5. 개발

기여를 환영합니다! 제안이나 개선 사항이 있으시면 이슈를 개설하거나 풀 리퀘스트를 제출해 주세요.

이 프로젝트에서는 uv를 사용하여 종속성을 관리합니다. 플랫폼별 지침에 따라 uv를 설치하세요.

# Clone the repository $ git clone https://github.com/ntk148v/alertmanager-mcp-server.git $ uv venv $ source .venv/bin/activate # On Unix/macOS $ .venv\Scripts\activate # On Windows $ uv pip install -e . # run test $ pytest

6. 라이센스

아파치 2.0


You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

alertmanager-mcp-server

  1. 서론
    1. 특징
      1. 빠른 시작
        1. 3.1. 전제 조건
        2. 3.2. 로컬 실행
        3. 3.3. 도커 런
      2. 도구
        1. 개발
          1. 라이센스

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A simple MCP server that can send notifications on mac devices.
              Last updated -
              5
              9
              8
              TypeScript
              MIT License
              • Apple
            • -
              security
              A
              license
              -
              quality
              The MCP server that keeps you informed by sending the notification on phone using ntfy.sh
              Last updated -
              18
              6
              JavaScript
              Apache 2.0
              • Linux
              • Apple

            View all related MCP servers

            ID: oblhy82ylg