Skip to content
Skillpedia
βœ“ Official Β· Grafana Labs● Free and open sourceπŸ’»β˜οΈ Local / RemoteπŸ”‘ Needs an API keyCloud and servers

Grafana

Lets your AI agent search Grafana dashboards, query Prometheus and Loki data and update dashboards.

3.6k stars on GitHubby Grafana LabsLicense Apache-2.0Updated 18 days ago

How to install

This MCP has two ways to run: local or remote.

Pick one below. Local runs on your computer; remote runs in the cloud and needs nothing installed.

Paste in the terminal:

claude mcp add grafana -e GRAFANA_URL="<your value>" -- docker run -i --rm -e GRAFANA_URL -e GRAFANA_SERVICE_ACCOUNT_TOKEN -e GRAFANA_USERNAME -e GRAFANA_PASSWORD -e GRAFANA_ORG_ID -e GRAFANA_EXTRA_HEADERS -e GRAFANA_FORWARD_HEADERS docker.io/grafana/mcp-grafana:2.2.0

What to fill in

NameWhat it isRequired
GRAFANA_URLURL to your Grafana instanceYes
GRAFANA_SERVICE_ACCOUNT_TOKENService account token used to authenticate with your Grafana instanceNo
GRAFANA_USERNAMEUsername to authenticate with your Grafana instanceNo
GRAFANA_PASSWORDPassword to authenticate with your Grafana instanceNo
GRAFANA_ORG_IDOrganization ID for multi-org support. Can also be set via X-Grafana-Org-Id header in SSE/streamable HTTP transports.No
GRAFANA_EXTRA_HEADERSJSON object of additional HTTP headers to send with all Grafana API requestsNo
GRAFANA_FORWARD_HEADERSComma-separated list of HTTP header names to forward from the incoming request to Grafana (SSE/streamable-http only). Example: Cookie,X-Session-IdNo

Ready! Now test it

Restart the app and paste one of these requests in the chat:

Find the dashboards about checkout latency.
Give me a summary of the Kubernetes overview dashboard.

What it is

This server connects your agent to your Grafana instance and the data sources behind it. The agent can find and summarize dashboards, run queries on metrics and logs, and change dashboards. Many extra tool groups, such as SQL, CloudWatch and InfluxDB, are off by default and turned on with a flag.

What it can do

  • Search dashboards by title, folder, tag or starred status
  • Get a dashboard summary or a single part of it using JSONPath
  • Update or patch a dashboard
  • List data sources and read their details
  • Query Prometheus with PromQL
  • Query Loki logs and metrics with LogQL
  • Run a dashboard panel's query (off by default)
  • Optional SQL, CloudWatch, Graphite and Elasticsearch tools

When to use

  • β€ΊWhen you want to ask what a dashboard shows without opening it.
  • β€ΊWhen you are investigating an incident and need metrics or logs.
  • β€ΊWhen you want your agent to make a small change to a dashboard.

What you need

uv (to run it with uvx) and a Grafana instance, version 9.0 or later. You also need a Grafana service account token and your Grafana URL.

Skills that pair well

⭐ Skillpedia MCP Β· freeYour agent finds the right skill on its ownInstall our MCP and your agent searches 15,000+ skills whenever it needs one.Install for free β†’

Frequently asked questions

Is it official?

Yes. It is the Grafana MCP server from the grafana organization.

What does it need?

A Grafana URL and a service account token. Grafana Cloud URLs work too.

Which Grafana version works?

Version 9.0 or later is needed for full functionality.

Why do some tools not appear?

Several groups, such as SQL, CloudWatch, InfluxDB and run panel query, are disabled by default. Add them to the --enabled-tools flag.

Can big dashboards use up my context?

They can. The readme suggests the summary and property tools instead of getting the full dashboard JSON.

Are database credentials shared with the server?

For SQL tools, queries go through Grafana's data source plugins, so the MCP server never sees credentials.

If it does not work

  • β€ΊCheck GRAFANA_URL and GRAFANA_SERVICE_ACCOUNT_TOKEN in the config env block.
  • β€ΊIf a tool is missing, enable its group with --enabled-tools.
  • β€ΊInstall uv if uvx is not found.

5 new skills a week. 1 minute to read.