DEV Community

Cover image for Grafana MCP for Claude Code: Query Dashboards, Metrics, and Alerts Directly
quickpromptco
quickpromptco

Posted on Edited on Originally published at quickpromptco.com

Grafana MCP for Claude Code: Query Dashboards, Metrics, and Alerts Directly

When something breaks in production, the usual Claude Code loop is: open Grafana, find the right dashboard, squint at a spike, copy a PromQL query or a chunk of Loki logs, paste it into the terminal, and repeat when Claude asks for a wider time range. You end up as a slow, lossy copy-paste bridge between your metrics and your agent.

Grafana MCP is Grafana Labs’ official MCP server. It lets Claude Code search your dashboards, run PromQL against Prometheus and LogQL against Loki, read alert rules and their firing state, and look up incidents on its own. It works with self-hosted Grafana 9.0+ and Grafana Cloud, and it’s open source (Apache 2.0).

What the full guide covers:

  • What You’ll Need
  • Step-by-Step Setup
  • What Each Piece Does
  • Verify It’s Actually Working

The commands, our own test notes, and the troubleshooting steps are in the full guide, which we keep up to date:

Read the full guide on quickpromptco.com

Top comments (0)