Grafana MCP Server

Grafana MCP server

Grafana's official MCP server: dashboards, Prometheus and Loki queries, alerts and incidents straight from the agent

  • 3,626 ★ on the repository
  • Last commit
  • Apache-2.0
MCP serverOfficialEditors’ pick

Broad access

Why this level

  • Can change dashboards, alerts and incidents in production Grafana
  • Holds a token with access to metrics and logs
All reasons and checks

grafana/mcp-grafana

Install

Manual install

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

Requires uv. For Grafana Cloud use your instance URL

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • Can change dashboards, alerts and incidents in production Grafana
  • Holds a token with access to metrics and logs

This is third-party code. Review the repository files before installing.

What it does

The server connects the agent to your Grafana or Grafana Cloud using a service account token. The agent searches and reads dashboards, gets compact summaries without the full JSON, and edits panels with targeted patches. It runs PromQL and LogQL queries, reaches ClickHouse, CloudWatch, Elasticsearch and other datasources, and works with alerting, OnCall, incidents and annotations. The --disable-write flag makes the server read-only, and there are guardrails on Loki query cost.

Who it is for. For SREs, DevOps engineers and developers who investigate metrics and logs in Grafana.

Good fit when

  • You need to find the cause of an error spike across metrics and logs
  • You need to create or edit a dashboard without hand-editing JSON
  • You want alerts, on-call and incidents in one conversation

Not a fit when

  • Your monitoring is not built on Grafana
  • You cannot issue a service account token

Example request

Why did the 5xx rate for the checkout service rise in the last hour? Check metrics and Loki logs

MCP

Transport
stdio, sse, http
Authentication
API key

Environment variables

GRAFANA_URL required
Grafana or Grafana Cloud URL
GRAFANA_SERVICE_ACCOUNT_TOKEN required, secret
Grafana service account token
GRAFANA_ORG_ID
Organization ID for multi-org setups
MCP_GRAFANA_SERVER_TOKEN secret
Bearer token callers must send in network modes

Limitations

Requires Grafana 9.0 or later and a service account token with suitable permissions. Full dashboards consume a lot of context, so prefer summaries and JSONPath. Some tools are off by default, and Grafana Assistant tools need a separate plugin. In network modes without --server-auth-token callers are not authenticated.

How to disable. Remove the grafana block from the MCP client config.

FAQ

How do I stop the agent from changing dashboards?

Start the server with --disable-write so write tools are not registered.

Is there an option without Python?

Yes, the grafana/mcp-grafana Docker image, a go install binary and a Helm chart.

How is Grafana MCP Server different from third-party Grafana servers?

It is the official Grafana server. It connects to Grafana or Grafana Cloud with a service account token: searches and reads dashboards, gives a short summary without full JSON, patches panels, queries Prometheus and Loki and works with alerts and incidents.

How do I connect Grafana MCP and limit writes?

Add the grafana server with the uvx command and a service account token to the client config, as in the install block. For safe use give the token a read-only role. It works in Claude Code, Claude Desktop, Cursor, VS Code and Gemini CLI.

Discussion

No questions or reviews yet.

An MCP server for Prometheus: the agent runs PromQL queries, discovers metrics and checks scrape targets

MCP serverExtended access521Repository stars
Official

Datadog's official managed MCP server: logs, metrics, traces and incidents right in your agent

MCP serverExtended access47Repository stars
Official

Official Cloudflare MCP server: the agent drives the whole Cloudflare API by searching the spec and running code

MCP serverBroad access1KRepository stars

A self-hosted gateway that merges several MCP servers into one endpoint with auth and tool selection

MCP serverBroad access2.7KRepository stars
Official

Official Render MCP server: services, deploys, logs, metrics and Postgres databases on Render

MCP serverBroad access183Repository stars

Zabbix MCP Server

zabbix-mcp-server

An MCP server for the whole Zabbix API: 237 tools, several Zabbix servers, scoped tokens and a read-only mode

MCP serverBroad access245Repository stars

README in short

The README opens with a uvx config and lists tools by area: dashboards, datasources, queries to many backends, alerting, OnCall, incidents, Sift, annotations, snapshots and rendering. It documents CLI flags, read-only and query-free modes and Loki guardrails in detail. Docker, binary and Helm installs, TLS, multi-org, custom headers and observability are covered. Apache-2.0 licensed.

README badge

Report a problem

Foxx AIGrafana MCP Server
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.