mcp-server-prometheus

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Allows to interact with Prometheus metrics and data, including listing and accessing metric schema, metadata, and statistical information (count, min, max values)

mcp-server-prometheus

Prometheus メトリックおよびデータと対話するための MCP サーバー。

これは、Prometheus APIインターフェースを実装したTypeScriptベースのMCPサーバーです。モデルコンテキストプロトコル(MCP)を介して、ClaudeとPrometheusサーバー間のブリッジを提供します。

デモ

特徴

リソース

  • Prometheus メトリック スキーマの一覧表示とアクセス
  • 各メトリック リソースは以下を提供します。
    • メトリック名と説明
    • Prometheusからの詳細なメタデータ
    • 統計情報(カウント、最小値、最大値)
  • 構造化データアクセス用の JSON MIME タイプ

現在の機能

  • 利用可能なすべての Prometheus メトリックを説明とともに一覧表示します
  • 以下の詳細なメトリック情報を読み取ります。
    • メタデータとヘルプテキスト
    • 現在の統計データ(カウント、最小値、最大値)
  • セキュアな Prometheus インスタンスの基本認証サポート

構成

サーバーには次の環境変数が必要です。

  • PROMETHEUS_URL : PrometheusインスタンスのベースURL

オプションの認証構成:

  • PROMETHEUS_USERNAME : 基本認証のユーザー名(必要な場合)
  • PROMETHEUS_PASSWORD : 基本認証のパスワード(必要な場合)

発達

依存関係をインストールします:

npm install

サーバーを構築します。

npm run build

自動リビルドを使用した開発の場合:

npm run watch

インストール

Claude Desktop で使用するには、サーバー設定を追加します。

MacOS の場合: ~/Library/Application Support/Claude/claude_desktop_config.json Windows の場合: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "mcp-server-prometheus": { "command": "/path/to/mcp-server-prometheus/build/index.js", "env": { "PROMETHEUS_URL": "http://your-prometheus-instance:9090" } } } }

デバッグ

MCPサーバーはstdio経由で通信するため、デバッグが困難になる場合があります。MCP Inspectorの使用をお勧めします。

npm run inspector

インスペクターは、ブラウザでデバッグ ツールにアクセスするための URL を提供します。

API構造

サーバーは、次の URI 構造を通じて Prometheus メトリックを公開します。

  • ベースURI: http://your-prometheus-instance:9090
  • メトリック URI: http://your-prometheus-instance:9090/metrics/{metric_name}

各メトリック リソースは、次の内容を含む JSON データを返します。

  • メトリック名
  • メタデータ(ヘルプテキスト、タイプ)
  • 現在の統計(カウント、最小、最大)
-
security - not tested
A
license - permissive license
-
quality - not tested

Prometheus メトリックおよびデータと対話するための MCP サーバー。

  1. Demo
    1. Features
      1. Resources
      2. Current Capabilities
    2. Configuration
      1. Development
        1. Installation
          1. Debugging
        2. API Structure
          ID: y7b3qba8jy