Skip to content
Grafana

Grafana

Apache-2.0
grafanaobservabilitymonitoringprometheuslokidashboardsalerting

Summary

Official Grafana MCP server: search and edit dashboards, query Prometheus, Loki and Pyroscope, and work with alerts, incidents and on-call from an agent.

Features

  • Search dashboards and fetch compact summaries instead of full JSON
  • Extract dashboard properties by JSONPath; patch without the whole document
  • List datasources and run Prometheus, Loki and Pyroscope queries
  • Read and manage alert rules, contact points, incidents and on-call
  • Run Sift investigations against your telemetry
  • Opt-in panel-query execution with custom time ranges and variables
  • Per-tool enablement, so read-only agent access is straightforward

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it, filling in the environment variables with your own values.
  3. Restart the agent — the "Grafana" tools will be available.
{
  "mcpServers": {
    "grafana": {
      "command": "uvx",
      "args": [
        "mcp-grafana"
      ],
      "env": {
        "GRAFANA_URL": "http://localhost:3000",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your service account token>"
      }
    }
  }
}

Description

The official MCP server from Grafana Labs, exposing a Grafana instance and the observability stack around it as tools an agent can call. It is written in Go, ships as a uvx package, a binary, a Docker image, and a Helm chart, and works against both self-hosted Grafana and Grafana Cloud.

Dashboards, without burning the context window

Dashboard JSON is enormous, and naively handing it to a model wastes most of a context window on panel definitions nobody asked about. This server is unusually deliberate about that. Beyond the obvious search and fetch-by-UID, it offers a dashboard summary (title, panel count, panel types, variables, and metadata with no JSON), property extraction via JSONPath so you can ask for $.panels[*].title and get only that, and patch operations that apply targeted changes without round-tripping the full document. Panel queries and their datasource UIDs can be pulled out on their own.

That design detail is the difference between an agent that can work on a large dashboard and one that runs out of room reading it.

Beyond dashboards

The server reaches the wider ecosystem: datasource discovery and querying, Prometheus and Loki queries including label and metric metadata, Pyroscope profiles, Grafana Alerting rules and contact points, incident and on-call data, and Sift investigations. Running a dashboard panel's query with custom time ranges and variable overrides is supported but disabled by default — you opt in by adding runpanelquery to --enabled-tools, which is the right default for a tool that executes queries against production.

Requirements and access

Grafana 9.0 or later is required for full functionality; earlier versions lack API endpoints that several datasource operations depend on. Authentication is a service account token, with basic auth and custom HTTP headers supported for multi-tenant setups. Because tools are individually enableable, you can hand an agent read-only observability access without also handing it the ability to rewrite dashboards.

Related MCP Servers

MCP: Netlify

by Netlify

New

Netlify's official MCP server, wrapping the Netlify API and CLI so agents can create projects, deploy, manage secrets, extensions and access controls.

Cloud & Infrastructure

MCP: Terraform

by HashiCorp

New

HashiCorp's official MCP server for the Terraform Registry, HCP Terraform and Terraform Enterprise — providers, modules, policies and workspace operations.

Cloud & Infrastructure

MCP: DigitalOcean

by DigitalOcean

New

DigitalOcean's official MCP server — deploy apps and manage Droplets, databases, and storage conversationally.

Cloud & Infrastructure

MCP: Heroku

by Heroku

New

Heroku's official MCP server — manage apps, dynos, add-ons, config, and logs from an AI client.

Cloud & Infrastructure
Browse all MCP servers →