grafana/mcp-grafana

MCP server for Grafana

What it solves

This project provides a Model Context Protocol (MCP) server that allows AI models (like Claude or Cursor) to interact directly with a Grafana instance. It solves the problem of AI assistants lacking real-time access to observability data, dashboard configurations, and system monitoring tools, enabling them to help users manage their monitoring stack and query data across various datasources.

How it works

The server acts as a bridge between an MCP-compatible AI client and the Grafana API. It exposes a wide array of tools that the AI can call to perform actions in Grafana, such as searching for dashboards, executing queries against Prometheus or Loki, and managing alerts. It includes specific strategies to manage the AI's context window, such as providing summary views of dashboards instead of full JSON payloads.

Who it’s for

SREs, DevOps engineers, and platform engineers who use Grafana for observability and want to integrate their monitoring data and dashboard management into their AI-driven workflows.

Highlights

  • Multi-Datasource Querying: Supports querying a vast range of datasources including Prometheus, Loki, InfluxDB, SQL (ClickHouse, Snowflake, Athena, etc.), CloudWatch, Google Cloud Logging, Graphite, Elasticsearch, and Quickwit.
  • Dashboard Management: Tools to search, create, update, and patch dashboards, with optimized tools to reduce context window usage.
  • Observability Ecosystem Integration: Integration with Grafana Incident, Alerting, OnCall, and the Grafana Assistant plugin.
  • Agent Observability: Specialized tools for monitoring and evaluating LLM conversations, prompts, and evaluation scores in Grafana Cloud.
  • Resource Rendering: Ability to render dashboard panels or full dashboards as PNG images via the Grafana Image Renderer.
  • Deep-linking: Generates accurate URLs to specific Grafana resources to avoid AI "hallucinations" regarding links.
  • Provisioning Validation: Ability to dry-run and validate provisioning files from git-sync repositories.

Related

  • Project
  • Project
  • Project
  • Project
  • Project