Repolode
grafana

grafana/mcp-grafana

An MCP server that gives AI assistants access to Grafana dashboards, datasources, alerts, incidents and more.

Stars
3,591
Forks
473
Open issues
84
Last commit
2 hours ago

What is it?

mcp-grafana is a Model Context Protocol server written in Go that connects MCP-compatible clients such as Claude Desktop and Cursor to a Grafana instance. Once configured with a Grafana URL and a service account token, an assistant can search and read dashboards, run panel queries, and query connected datasources such as Prometheus, Loki, ClickHouse, Elasticsearch and CloudWatch.

Beyond dashboards and metrics, the server exposes tools for alerting rules and contact points, Grafana OnCall schedules and alert groups, Grafana Incident, annotations, snapshots, deeplink generation and dashboard image rendering. Tool categories can be enabled or disabled with flags, and tools that touch sensitive areas such as admin, SQL or InfluxDB are off by default. Access is governed by the Grafana RBAC permissions granted to the service account.

The server runs through uvx, Docker, a standalone binary or a Helm chart, and requires Grafana 9.0 or later for full functionality.

Key features

  • 01Search, read and update Grafana dashboards, including JSONPath property extraction and patching.
  • 02Query Prometheus, Loki, InfluxDB, Elasticsearch, CloudWatch and SQL datasources through MCP tools.
  • 03Manage alert rules, notification policies and contact points.
  • 04Read and manage Grafana OnCall schedules and alert groups.
  • 05Render dashboard panels as PNG images via the Grafana Image Renderer.
  • 06Enable or disable tool categories with command-line flags.

Use cases

  • Letting an AI assistant investigate a production incident by querying metrics and logs in Grafana.
  • Generating or editing dashboards from natural-language requests while keeping context usage small.
  • Auditing alert rules and on-call schedules through a chat interface.
  • Producing dashboard images for reports or chat notifications.

Quick start

  1. 1

    Install uv (required for uvx)

  2. 2

    Add the Grafana MCP server to your MCP client configuration with your GRAFANA_URL and service account token

  3. 3

    Run the server with uvx

    uvx mcp-grafana

Things to know

  • Full functionality requires Grafana 9.0 or later, and some datasource features may fail on older versions.
  • Many tools, such as run panel query, SQL, CloudWatch and InfluxDB, are disabled by default and must be enabled with --enabled-tools.

Topics

FAQ

What is mcp-grafana?
An MCP server that gives AI assistants access to Grafana dashboards, datasources, alerts, incidents and more. mcp-grafana is a Model Context Protocol server written in Go that connects MCP-compatible clients such as Claude Desktop and Cursor to a Grafana instance. Once configured with a Grafana URL and a service account token, an assistant can search and read dashboards, run panel queries, and query connected datasources such as Prometheus, Loki, ClickHouse, Elasticsearch and CloudWatch.
Is mcp-grafana free to use? What license does it have?
mcp-grafana is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is mcp-grafana still maintained?
Actively maintained. The last commit to mcp-grafana was on Oct 22, 2026.
What can I use mcp-grafana for?
Letting an AI assistant investigate a production incident by querying metrics and logs in Grafana. Generating or editing dashboards from natural-language requests while keeping context usage small. Auditing alert rules and on-call schedules through a chat interface. Producing dashboard images for reports or chat notifications.
How do I install mcp-grafana?
Install uv (required for uvx) Add the Grafana MCP server to your MCP client configuration with your GRAFANA_URL and service account token Run the server with uvx: uvx mcp-grafana
Where can I get mcp-grafana?
The source code and installation instructions are on GitHub: https://github.com/grafana/mcp-grafana

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects