Back to Blog
Guide
4 min read
April 15, 2026

How to Use Grafana MCP with Claude Code

Query dashboards, inspect panels, search annotations, and interact with Grafana datasources from Claude Code to accelerate incident response and observability workflows.

grafanaobservabilitymonitoringmetricsclaude-code

What is the Grafana MCP?

The Grafana MCP connects Claude Code to your Grafana instance, giving it access to dashboards, panels, datasource queries, and annotations. Claude can correlate metrics with recent deployments, summarize dashboard state during an incident, and help you build or refine Prometheus or Loki queries.

Installation

mcpizy install grafana

Generate a Grafana Service Account token with Viewer role (or Editor if you want Claude to create annotations). Provide the Grafana instance URL and token during setup.

Key Capabilities

  • List and search dashboards — find dashboards by name, folder, or tag.
  • Query datasources — execute PromQL, LogQL, or SQL queries against connected datasources.
  • Read panel data — extract current metric values from specific dashboard panels.
  • Manage annotations — add deployment markers or incident annotations programmatically.
  • Search alerts — list firing alerts and their current state.

Example Usage

During an incident, ask Claude to summarize the current system state:

// Claude will:
// 1. Query the "API Latency" panel for the last 15 minutes
// 2. Query the "Error Rate" panel
// 3. Check for any firing alerts
// 4. Correlate with recent deployment annotations
// 5. Produce a concise incident summary

Tips and Best Practices

  • Use Viewer-only tokens for read-only incident analysis to prevent accidental dashboard modifications.
  • Ask Claude to write PromQL queries from plain English — e.g., "p99 latency for the auth service over the last hour".
  • Combine with Sentry MCP to correlate error spikes in Sentry with metric anomalies in Grafana.
  • Use annotations to mark when Claude-assisted changes were deployed for future correlation.

View on MCPizy Marketplace

Found this useful? Share it.

MCP Servers Mentioned

GrafanaSentryElasticsearch
All ArticlesBrowse Marketplace