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. 前提条件
- Python 3.12以上
- uv (高速な依存関係管理用)。
- Docker (オプション、コンテナ化されたデプロイメント用)。
- この MCP サーバーを実行する環境から Prometheus Alertmanager サーバーにアクセスできることを確認します。
3.2. ローカル実行
- リポジトリをクローンします。
- .env ファイルまたはシステム環境変数を使用して、Prometheus サーバーの環境変数を構成します。
- サーバー設定をクライアント設定ファイルに追加します。例えば、Claude Desktopの場合は以下のようになります。
3.3. Docker 実行
- 事前にビルドされたイメージで実行します (または自分でビルドすることもできます)。
- Claude Desktop で Docker を実行する:
この構成では、変数名のみを指定した-e
フラグを使用し、 env
オブジェクトに実際の値を指定して、Claude Desktop から Docker コンテナーに環境変数を渡します。
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をインストールしてください。
6. ライセンス
You must be authenticated.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
アラートマネージャーMCPサーバー
Related MCP Servers
- AsecurityAlicenseAqualityA simple MCP server that can send notifications on mac devices.Last updated -598TypeScriptMIT License
- -securityAlicense-qualityThe MCP server that keeps you informed by sending the notification on phone using ntfy.shLast updated -186JavaScriptApache 2.0
- Python
- PythonMIT License