Install
uvx mcp-grafanaWho it's for
For people who already have a Grafana 9.0 or newer instance and want a model to inspect the instance and its surrounding ecosystem (dashboards, datasources). The evidence states: this MCP provides access to a Grafana instance and the ecosystem around it.
You must be able to supply GRAFANA_URL and a service-account token GRAFANA_SERVICE_ACCOUNT_TOKEN. Below 9.0, some features (especially datasource-related) may be unavailable because APIs are missing.
The evidence does not list clients and does not write most tool function names. The first time, do read-only viewing only: do not enable panel query (off by default), and do not use the localhost:3000 example as-is in production.
First try in 3 minutes
Take the uvx main path. In the client configure:
"command": "uvx",
"args": ["mcp-grafana"],
"env": {
"GRAFANA_URL": "http://localhost:3000",
"GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your service account token>"
}
Replace the URL with your instance and the token with a service-account token. Do not write them into the conversation.
Prerequisites: Grafana ≥ 9.0 is reachable; the service account has enough permission to list datasources or read dashboards. This call will hit your Grafana with the token; it is not an offline sandbox.
Where to configure: the client MCP command / args / env.
Low-risk first call: first "list and fetch datasource information" (an evidence capability). Do not first pull an entire large dashboard by UID. Run panel query tools are off by default; do not add runpanelquery to --enabled-tools just for the first try.
Success signal: after the client connects, you can see the configured datasource list. On 401 or no connection, check the URL and token first, and whether the instance is ≥ 9.0.
Use cases
Case 1: See which datasources the instance has. Use "List and fetch datasource information". The evidence states supported types include Prometheus, Loki, ClickHouse, CloudWatch, Elasticsearch, OpenSearch, Snowflake, Athena. It does not give tool function names or filter parameters. So what you can confirm is: you see configured datasources and their details.
Case 2: Fetch full details of one dashboard by UID. The evidence warns: large dashboards consume a lot of context window. Pick a dashboard whose UID you know and that is not huge; if the return is too long, stop at "the evidence already warned about context use" — do not keep pulling the full payload. The evidence does not give locator text for a JSONPath-trimming tool; do not invent a substitute tool name.
Limits
You need Grafana 9.0+, GRAFANA_URL, and a service-account token. runpanelquery is disabled by default and only runs panel query after you enable it. Fetching a whole dashboard by UID can blow the context. Datasource types listed are only those above. The evidence has no undo, no complete tool-name table, and no statement of least privilege for the token. Accessing Grafana and datasources is not zero risk: what the service account can see, the model can see. Do not read "read-only list datasources" as "no network" or "no sensitive metric names".