MCP Servers · Publisher repository

Grafana MCP server

An official Grafana MCP server that lets compatible AI clients discover dashboards and data sources, query Prometheus metrics and Loki logs, and work with alerts, incidents, and OnCall flows within existing Grafana permissions, with read-only, query-free, and network-hardening controls.

3.4k StarsApache-2.0GoUpdated today
01

Project overview

Grafana MCP server is the Grafana Labs-maintained Model Context Protocol bridge for dashboards, data sources, metrics, logs, alerts, incidents, and related observability objects. It can help developers diagnose production issues and platform teams inspect dashboards or coordinate response workflows. The real security boundary remains Grafana RBAC, the service-account credential, and the deployment network: begin with a least-privilege identity and a read-only or query-free tool set instead of granting a broad Editor role.

02

Core capabilities

01

Dashboard discovery and focused updates

Search dashboards, read summaries or JSONPath-selected properties, inspect panel queries, and create, update, or patch dashboards. Summary and property tools avoid loading full JSON every time.

02

Metrics, logs, and data-source queries

Query and discover Prometheus and Loki data, with opt-in families for CloudWatch, ClickHouse, Athena, InfluxDB, Elasticsearch, and others.

03

Alerting and response workflows

Read or manage Grafana Alerting, incidents, OnCall, annotations, and snapshots, with writes governed by Grafana RBAC and --disable-write.

04

Multi-organization and dynamic discovery

v1.3.0 adds optional per-call orgId and user_info, plus cross-organization discovery for proxied data-source tools when dynamic multi-org is enabled.

05

Security and runtime controls

Offers read-only and query-free modes, tool-category filtering, caller authentication, TLS, host/origin controls, health checks, and OpenTelemetry options.

03

Setup and connection

Prefer the README's uvx and STDIO path. Create a narrowly scoped Grafana service-account token first, then place GRAFANA_URL and the token in the client's environment configuration. Start with --disable-write and add --disable-query or category filters when the initial workflow needs even less access.

AI AGENT INSTALL

Let an AI Agent install it

Send this prompt to Codex, Claude Code, or another AI agent that can work with your local environment.

Help me connect Grafana MCP server safely. Project: https://github.com/grafana/mcp-grafana. First read README.md, CHANGELOG.md, LICENSE, Grafana's organization SECURITY.md, server.json, and the latest v1.3.0 release, then confirm the target is Grafana 9.0+. Prefer the README's uvx + STDIO configuration. Do not overwrite existing MCP settings or put credentials in chat, logs, or version control. Ask me for the target GRAFANA_URL and guide me to create a purpose-specific, least-privilege Grafana service-account token. Start with --disable-write and add --disable-query when metadata discovery is enough. Ask before downloading dependencies, making external requests, expanding Grafana RBAC, enabling write or query tools, forwarding headers, exposing SSE/HTTP listeners, weakening TLS, or enabling detailed debug logs. Verify the handshake, tool list, and user_info first, then read only a test dashboard summary; do not perform the first write against production objects.
01Before you start
  • Grafana 9.0 or later, or an accessible Grafana Cloud instance
  • uv installed with uvx visible to the MCP client's process PATH
  • A Grafana service-account token restricted by folder, data-source, and operation scope
  • An MCP client that can launch local STDIO servers
02Copy the install command or configuration
{
  "mcpServers": {
    "grafana": {
      "command": "uvx",
      "args": ["mcp-grafana"],
      "env": {
        "GRAFANA_URL": "http://localhost:3000",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your service account token>"
      }
    }
  }
}
03Complete the setup steps
  1. 1
    Define the data and action boundary

    List the organizations, folders, data sources, and actions the agent needs. If it only discovers and diagnoses, begin with --disable-write and consider --disable-query as well.

  2. 2
    Create a least-privilege service account

    Create a dedicated Grafana service account for this workflow and grant only required dashboard-read, data-source-query, or alert permissions; do not reuse a personal administrator token.

  3. 3
    Add the uvx STDIO configuration

    Set command to `uvx`, args to `["mcp-grafana"]`, and provide GRAFANA_URL plus the service-account token through env. Confirm the edit preserves other MCP server entries.

  4. 4
    Run a minimal read-only verification

    Restart the client, inspect the tool list, and call user_info, search_dashboards, and get_dashboard_summary. Confirm the instance and organization before gradually enabling query or write categories.

How to verify the setup

After restarting the MCP client, confirm the server handshake and Grafana tool list. Call user_info or the read-only search_dashboards tool to check the target instance and identity, then request get_dashboard_summary for a disposable test dashboard. In read-only mode, confirm create and update tools are absent. Do not use production alerts, incidents, or writes for the first test.

Before using it
  • GRAFANA_SERVICE_ACCOUNT_TOKEN takes precedence over GRAFANA_SERVICE_ACCOUNT_TOKEN_FILE; the file form is reread per request to support rotation
  • GRAFANA_API_KEY is deprecated; use a service-account token
  • The Docker image defaults to SSE, so local clients require both -i and an explicit -t stdio
  • SSE or Streamable HTTP on a non-loopback address should use MCP_GRAFANA_SERVER_TOKEN together with TLS and host/origin restrictions
04

Use cases

SCENARIO 01

Incident diagnosis and log correlation

Let an agent inspect dashboard summaries and panel queries, then query Prometheus and Loki over constrained time ranges to assemble traceable diagnostic evidence.

SCENARIO 02

Dashboard inspection and maintenance

Find team dashboards, inspect panels and variables, and apply a small patch after approval without moving the full dashboard JSON through the model.

SCENARIO 03

Alert and incident response

Summarize alerts, incidents, and OnCall information within existing Grafana permissions while retaining human approval for acknowledgements, silences, and updates.

05

Assessment

Grafana MCP server stands out not merely for breadth but because Grafana maintains it and places dashboards, metrics, logs, and response workflows behind one MCP boundary. The README gives actionable guidance for installation, RBAC, read-only mode, query isolation, and network transport security, while recent releases continue to improve multi-org support, query controls, and security. Adoption should start with a least-privilege service account and reduced tool set. This assessment is based on public evidence rather than a live deployment test.

Why it may be useful

  • Official publisher repository with clear Apache-2.0 licensing, formal releases, and multi-platform binaries
  • Combines dashboards, metrics, logs, alerting, and response workflows without requiring several MCP servers
  • Documents RBAC, read-only and query-free modes, caller authentication, and TLS deployment controls
  • Includes unit, integration, end-to-end, and cloud test areas and remained actively released and fixed in August 2026

What to know first

  • Its broad surface requires deliberate tool filtering, Grafana RBAC, and network hardening
  • Logs, metrics, and full dashboards may expose sensitive data and consume significant context
  • Some data-source and advanced product families are disabled by default or depend on target Grafana plugins and versions
  • No live installation, authentication, query, or write test was performed for this review
06

README

Grafana MCP server


Overview

An official Grafana MCP server that lets compatible AI clients discover dashboards and data sources, query Prometheus metrics and Loki logs, and work with alerts, incidents, and OnCall flows within existing Grafana permissions, with read-only, query-free, and network-hardening controls. An official MCP server that gives compatible clients access to Grafana dashboards, data, and the surrounding observability ecosystem.

Getting started

  • Prefer the README's uvx and STDIO path. Create a narrowly scoped Grafana service-account token first, then place GRAFANA_URL and the token in the client's environment configuration. Start with --disable-write and add --disable-query or category filters when the initial workflow needs even less access.
  • Runs over STDIO by default and also supports SSE and Streamable HTTP; the README covers uvx, Docker, release binaries, Go installation, and Helm deployment.
  • Includes dashboards, data sources, Prometheus, Loki, alerting, incidents, OnCall, annotations, snapshots, rendering, and deep links, while many advanced categories remain opt-in.
  • After restarting the MCP client, confirm the server handshake and Grafana tool list. Call user_info or the read-only search_dashboards tool to check the target instance and identity, then request get_dashboard_summary for a disposable test dashboard. In read-only mode, confirm create and update tools are absent. Do not use production alerts, incidents, or writes for the first test.

Configuration

{
  "mcpServers": {
    "grafana": {
      "command": "uvx",
      "args": ["mcp-grafana"],
      "env": {
        "GRAFANA_URL": "http://localhost:3000",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your service account token>"
      }
    }
  }
}
Read the complete README on GitHub