Prometheus MCP Server

DevOpsstdio
Репозиторий

MCP server that lets AI assistants query and analyze Prometheus metrics through standardized interfaces. Exposes instant and range PromQL queries, metric and label discovery, and target/health inspection, allowing agents to investigate system performance and troubleshoot incidents using natural language instead of hand-writing PromQL.

Подключение

Добавьте эту конфигурацию в .claude/mcp.json

{
  "mcpServers": {
    "prometheus": {
      "command": "uvx",
      "args": [
        "prometheus-mcp-server"
      ],
      "env": {
        "PROMETHEUS_URL": "<YOUR_PROMETHEUS_URL>",
        "PROMETHEUS_USERNAME": "<YOUR_PROMETHEUS_USERNAME>",
        "PROMETHEUS_PASSWORD": "<YOUR_PROMETHEUS_PASSWORD>"
      }
    }
  }
}

Инструменты (3)

execute_query

Execute an instant PromQL query at a single point in time.

{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "time": {
      "type": "string",
      "description": "Optional RFC3339 or Unix timestamp for the evaluation"
    },
    "query": {
      "type": "string",
      "description": "PromQL expression to evaluate"
    }
  }
}

execute_range_query

Execute a PromQL query over a time range with a fixed step.

{
  "type": "object",
  "required": [
    "query",
    "start",
    "end",
    "step"
  ],
  "properties": {
    "end": {
      "type": "string",
      "description": "End timestamp (RFC3339 or Unix)"
    },
    "step": {
      "type": "string",
      "description": "Query resolution step (e.g. 15s, 1m)"
    },
    "query": {
      "type": "string",
      "description": "PromQL expression to evaluate"
    },
    "start": {
      "type": "string",
      "description": "Start timestamp (RFC3339 or Unix)"
    }
  }
}

list_metrics

List available metric names exposed by the Prometheus server.

{
  "type": "object",
  "properties": {}
}

Ресурсы

Этот сервер не предоставляет ресурсы.

Промпты

Этот сервер не предоставляет промпты.

Сведения о сервере

Автор
Pavel Shklovsky (@pab1it0)
Репозиторий
https://github.com/pab1it0/prometheus-mcp-server
Звёзды
0
Последнее обновление
12 июля 2026 г.