Grafana MCP Server: Dashboards, Metrics and Logs in Claude
Grafana's official MCP server lets Claude search dashboards, run PromQL and LogQL, and read alerts and incidents. Setup with uvx or Docker, read-only mode.
By Claudekit Team Published 2 min read
- Type
- MCP Server
- Pricing
- Open Source
- Repository
- github.com
- GitHub stars
- 3,598
- Website
- github.com
The Grafana MCP server (mcp-grafana) is Grafana Labs’ official Model Context Protocol server. It lets Claude search and summarize dashboards, run Prometheus and Loki queries, read alert rules, and work with Grafana Incident and OnCall. You get answers from your real metrics and logs instead of pasting screenshots into the chat.
Who it is for
SREs and developers who use Grafana, self-hosted or Grafana Cloud, and want Claude Code to investigate an alert or a slow service with real telemetry.
Install
Create a Grafana service account token first. The README’s quick start uses uvx, which needs uv installed:
{
"mcpServers": {
"grafana": {
"command": "uvx",
"args": ["mcp-grafana"],
"env": {
"GRAFANA_URL": "http://localhost:3000",
"GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your service account token>"
}
}
}
}
You can put this in a project .mcp.json for Claude Code. The README also documents Docker:
docker run --rm -i -e GRAFANA_URL=http://localhost:3000 -e GRAFANA_SERVICE_ACCOUNT_TOKEN=<your service account token> grafana/mcp-grafana -t stdio
Do not commit the token. The server can also read it from a file with GRAFANA_SERVICE_ACCOUNT_TOKEN_FILE, which picks up rotated tokens without a restart.
Use cases
- Incident triage: “Which alerts are firing right now, and what do the Loki logs show for that service?”
- Metrics questions: Claude writes and runs PromQL, including histogram percentiles.
- Dashboard work: summarize a dashboard, or patch one panel without loading the full JSON.
- On-call: see who is on call and list open alert groups.
Pros
- Official, Apache-2.0 licensed and widely used.
- Broad coverage: dashboards, Prometheus, Loki, alerting, incidents, OnCall and more data sources.
- Read-only mode with
--disable-write. - Context-aware tools, such as dashboard summaries and JSONPath property lookups.
Cons and caveats
- Full dashboard JSON can fill your context window. Prefer the summary and property tools.
- Raw-SQL tools run whatever query they get. A
DROP TABLEworks if the data source credentials allow it. - Several tool groups, such as admin and run panel query, are off by default and need
--enabled-tools. - Give the service account only the permissions Claude needs.
Links
- Repo: grafana/mcp-grafana
- Related: Sentry MCP, Cloudflare MCP server, best MCP servers
Checked 24 Oct 2026 against the vendor repo and the MCP registry.
Frequently asked questions
Does it work with Grafana Cloud?
Yes. Set GRAFANA_URL to your instance URL, such as https://myinstance.grafana.net, instead of a localhost address.
How do I make it read-only?
Start it with --disable-write. Write tools such as dashboard updates are removed, and raw-SQL query tools are removed too unless you add --enable-query.
Which Grafana version does it need?
The README says Grafana 9.0 or later is required for full functionality.
What license is it under?
The repository is Apache-2.0 licensed.