Skip to content
AI Dev Toolkit.
Esc
  • Loading…

MCP server · Data and analytics

Grafana MCP server

The Grafana MCP server is Grafana Labs’ official MCP server. It lets an assistant search dashboards, query Prometheus, Loki and other data sources, and work with alerts and incidents. It runs locally with uvx mcp-grafana or Docker and needs a Grafana service account token; it can do whatever that account can.

Maintainer
Grafana Labs (official)
Licence
Apache-2.0
Runs
Locally (uvx)
Sign-in
A token or API key
Registry version
v2.4.0 (updated 2026-11-24)
Last activity
2026-10-13

Overview

What can the Grafana MCP server do?

Grafana Labs’ MCP server gives an assistant access to a Grafana instance and the services around it. The quick start runs the mcp-grafana Python package with uvx, pointed at your Grafana URL with a service account token. It also ships as a Docker image (grafana/mcp-grafana), a binary and a Helm chart, and supports stdio, SSE and Streamable HTTP transports. It works with self-hosted Grafana 9.0 or later and with Grafana Cloud.

Use it when you want an assistant to help during an incident: find the right dashboard, run a PromQL or LogQL query, check alert rules or see who is on call. Beyond Prometheus and Loki, tools for InfluxDB, SQL data sources, CloudWatch, Google Cloud Logging, Graphite, Elasticsearch, OpenSearch and Quickwit are off by default; turn them on with --enabled-tools. It also covers incidents, Grafana OnCall, annotations, snapshots, panel rendering and provisioning. A --disable-write flag runs it in read-only mode, and multi-organisation setups are supported.

Tools

Tools it gives the assistant

  • Search, read and update dashboards and run panel queries
  • Query Prometheus and Loki; InfluxDB, SQL, CloudWatch, Elasticsearch and other data sources are opt-in (--enabled-tools)
  • Read and manage alert rules
  • Work with incidents and Grafana OnCall schedules
  • Create annotations and snapshots, and render panels
  • Generate deep links to dashboards and Explore

Install

How do I install Grafana MCP in Claude Code, Cursor or VS Code?

You need:

  • uv (for uvx), or Docker
  • Grafana 9.0 or later, or a Grafana Cloud instance (set GRAFANA_URL to its address)
  • A Grafana service account token

Run in your project. --scope local keeps the servers private to you in this project; use user for every project.

Terminal
claude mcp add --env GRAFANA_URL=http://localhost:3000 --env GRAFANA_SERVICE_ACCOUNT_TOKEN="${GRAFANA_SERVICE_ACCOUNT_TOKEN}" --scope local grafana -- uvx mcp-grafana
Native Windows (PowerShell)
claude mcp add --env GRAFANA_URL=http://localhost:3000 --env GRAFANA_SERVICE_ACCOUNT_TOKEN="$env:GRAFANA_SERVICE_ACCOUNT_TOKEN" --scope local grafana -- uvx mcp-grafana
  • Set GRAFANA_SERVICE_ACCOUNT_TOKEN first, e.g. export GRAFANA_SERVICE_ACCOUNT_TOKEN=… in your shell. The command saves the value, not the variable.

Need another app? Open Grafana MCP server in the MCP config generator for a shared project .mcp.json, Devin, or several servers at once; it writes one file per app. The snippets follow the setup in the server’s README, checked on 2026-10-14.

Is the Grafana MCP server safe? Check before you install

  • The server can do whatever the service account can. The README notes the Editor role is simpler but grants broad read and write access; fine-grained RBAC scopes are the least-privilege option.
  • Run with --disable-write to block write operations such as updating dashboards and creating folders.
  • Queries return raw metrics and log lines to the assistant, so anything sensitive in your logs can end up in the conversation.
  • A local MCP server runs with your user account’s permissions. Install it only from the source linked above. See how to choose a safe server.

FAQ

Grafana MCP questions

Is the Grafana MCP server official?

Yes. Grafana Labs publishes and maintains it, under the Apache-2.0 licence. Install it only from the source linked on this page, not from a copy in another directory.

Is Grafana MCP server remote or local?

Local. Your MCP app starts it on your machine with uvx, and it runs with your user account’s permissions.

Does Grafana MCP server need an API key or account?

Yes. It needs an API key or token from the service, which you pass as an environment variable or header rather than writing it into the config file. You also need: uv (for uvx), or Docker; Grafana 9.0 or later, or a Grafana Cloud instance (set GRAFANA_URL to its address); A Grafana service account token.

Why it’s listed

Why we list it

The vendor’s own server for a common observability stack, covering many data sources with a documented read-only mode.

Related

All MCP serversMCP config generatorGuide: MCP servers in Claude CodeGuide: what is MCP?

Keep exploring