Grafana MCP Server

DevOpsstdiossev0.4.2
Repository

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.

Bağlan

Bu yapılandırmayı şuraya ekleyin: .claude/mcp.json

Taşıma:
{
  "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>"
      }
    }
  }
}

Araçlar (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"
    }
  }
}

Kaynaklar

Bu sunucu herhangi bir kaynak sunmuyor.

Prompt'lar

Bu sunucu herhangi bir prompt sunmuyor.

Sunucu bilgileri

Yazar
Grafana Labs (@grafana)
Repository
https://github.com/grafana/mcp-grafana
Lisans
Apache-2.0
Sürüm
0.4.2
Yıldızlar
2,100
Son güncelleme
26 Mayıs 2026