Grafana MCP Server

DevOpsstdiossev0.4.2
Репозиторий

MCP server for Grafana's observability platform. Enables AI agents to query metrics from Prometheus, search and analyze logs from Loki, query traces, list and manage dashboards, and investigate incidents. Useful for debugging production issues, building monitoring dashboards, and performing root cause analysis with AI assistance across the full Grafana LGTM stack.

Подключение

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

Подключение:
{
  "mcpServers": {
    "grafana": {
      "command": "go",
      "args": [
        "run",
        "github.com/grafana/mcp-grafana@latest"
      ],
      "env": {
        "GRAFANA_URL": "<YOUR_GRAFANA_URL>",
        "GRAFANA_API_KEY": "<YOUR_GRAFANA_API_KEY>"
      }
    }
  }
}

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

query_prometheus

Execute a PromQL query against Prometheus datasource.

{
  "type": "object",
  "required": [
    "expr"
  ],
  "properties": {
    "end": {
      "type": "string",
      "description": "End time (ISO 8601 or 'now')"
    },
    "expr": {
      "type": "string",
      "description": "PromQL expression to evaluate"
    },
    "step": {
      "type": "string",
      "description": "Query resolution step (e.g., '15s', '1m')"
    },
    "start": {
      "type": "string",
      "description": "Start time (ISO 8601 or relative like 'now-1h')"
    }
  }
}

query_loki

Execute a LogQL query against Loki datasource.

{
  "type": "object",
  "required": [
    "expr"
  ],
  "properties": {
    "end": {
      "type": "string",
      "description": "End time for the query range"
    },
    "expr": {
      "type": "string",
      "description": "LogQL expression to query logs"
    },
    "limit": {
      "type": "integer",
      "description": "Maximum number of log lines to return"
    },
    "start": {
      "type": "string",
      "description": "Start time for the query range"
    }
  }
}

list_dashboards

List all Grafana dashboards with optional search filter.

{
  "type": "object",
  "properties": {
    "tag": {
      "type": "string",
      "description": "Filter by dashboard tag"
    },
    "query": {
      "type": "string",
      "description": "Search query to filter dashboards"
    }
  }
}

list_alerts

List active and pending alert rules.

{
  "type": "object",
  "properties": {
    "state": {
      "enum": [
        "firing",
        "pending",
        "inactive"
      ],
      "type": "string",
      "description": "Filter alerts by state"
    }
  }
}

Ресурсы

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

Промпты

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

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

Автор
Grafana Labs (@grafana)
Репозиторий
https://github.com/grafana/mcp-grafana
Лицензия
Apache-2.0
Версия
0.4.2
Звёзды
2,100
Последнее обновление
26 мая 2026 г.