AUTOMATIONSWITCH

Grafana MCP Server

by Grafana Labs

Vendor-official Grafana MCP server from Grafana Labs. Covers dashboards (search, get, summary, JSONPath extraction, patch), datasources (Prometheus, Loki, ClickHouse, CloudWatch, Elasticsearch), and direct query execution (PromQL, LogQL, InfluxQL/Flux, ClickHouse SQL).

2,929·8 tools·Released FEB 2025·Apache-2.0
uvx mcp-grafana
Share:

Grafana's MCP server is the observability hub for AI agents. The first wave of capabilities centres on dashboards: search, get full or summary views, extract specific dashboard properties via JSONPath, patch dashboards while keeping the full JSON out of the response. The second wave covers datasource operations across the major Grafana datasource types (Prometheus, Loki, ClickHouse, CloudWatch, Elasticsearch). The third wave runs queries directly: PromQL against Prometheus including histogram percentile calculations, LogQL against Loki with pattern detection, InfluxDB queries (InfluxQL or Flux), ClickHouse SQL. The architectural decision worth understanding: context-window management is treated as a first-class concern, with `get_dashboard_summary` and `get_dashboard_property` providing scoped access to large dashboards while keeping the full JSON out of the agent's context. This is the kind of detail that signals vendor maturity. Grafana version 9.0+ is required for full functionality; older instances may miss specific datasource API endpoints. For teams running Grafana, this is the observability MCP to install.

Reviewed by M. Nouriel · APR 2026

INSTALL THIS SERVER

Requires authenticationGrafana Service Account Token via GRAFANA_SERVICE_ACCOUNT_TOKEN env var.
{ "mcpServers": { "grafana": { "command": "uvx", "args": [ "mcp-grafana" ], "env": { "GRAFANA_URL": "http://localhost:3000", "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your service account token>" } } } }
PrereqRequires uv (install via Homebrew or Astral installer) and Grafana 9.0+. Create a Service Account in Grafana, generate a token, and set GRAFANA_SERVICE_ACCOUNT_TOKEN. For Grafana Cloud, replace GRAFANA_URL with your instance URL. Path: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS).
{ "mcpServers": { "grafana": { "command": "uvx", "args": [ "mcp-grafana" ], "env": { "GRAFANA_URL": "http://localhost:3000", "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your service account token>" } } } }
{ "mcpServers": { "grafana": { "command": "uvx", "args": [ "mcp-grafana" ], "env": { "GRAFANA_URL": "http://localhost:3000", "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your service account token>" } } } }
{ "mcpServers": { "grafana": { "command": "uvx", "args": [ "mcp-grafana" ], "env": { "GRAFANA_URL": "http://localhost:3000", "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your service account token>" } } } }
{ "mcpServers": { "grafana": { "command": "uvx", "args": [ "mcp-grafana" ], "env": { "GRAFANA_URL": "http://localhost:3000", "GRAFANA_SERVICE_ACCOUNT_TOKEN": "<your service account token>" } } } }

8 TOOLS AVAILABLE

search_dashboards
Search Grafana dashboards by title or metadata
Read
get_dashboard_summary
Compact dashboard overview without full JSON for context-window efficiency
Read
get_dashboard_property
Extract specific dashboard parts via JSONPath expressions
Read
patch_dashboard
Apply targeted dashboard changes without sending full JSON
Write
list_datasources
List configured Grafana datasources
Read
query_prometheus
Execute PromQL queries (instant + range) including histogram percentile calculations
Read

OUR ASSESSMENT

Strengths
  • Vendor-official from Grafana Labs; same team builds Grafana and the MCP server.
  • Context-window-aware tool design: `get_dashboard_summary` and `get_dashboard_property` provide scoped dashboard access for large dashboards.
  • Multi-datasource query coverage: PromQL, LogQL, InfluxQL/Flux, ClickHouse SQL all supported through dedicated tools.
  • Optional toolset gating (`runpanelquery`, `examples`, `influxdb`, `clickhouse`) keeps the default tool surface minimal until explicitly enabled.
Weaknesses
  • Requires Grafana 9.0 or later; older instances miss specific datasource API endpoints and some features fail silently.
  • Context window management is operator's responsibility for large dashboards; the README warns explicitly against `get_dashboard_by_uid` for big dashboards.
  • Service Account Token authentication scope determines what the agent can read; misconfigured scopes expose sensitive datasources.
Security Notes

Authentication uses Grafana Service Account Tokens via `GRAFANA_SERVICE_ACCOUNT_TOKEN`. The token's role and folder permissions bound the agent's blast radius, so least-privilege scoping at the Grafana identity layer is the security boundary. For Grafana Cloud, replace `GRAFANA_URL` with the team's instance URL. The MCP server runs locally and reads dashboards, datasources, and query results based on the token's scope; no destructive operations exist outside dashboard create/update which the agent's role determines. For multi-team Grafana instances, scope tokens to specific folders to restrict cross-team visibility.

Best For

Teams running Grafana 9.0+ who want an agent that can search dashboards, query datasources, and extract observability data through natural language.

TECHNICAL DETAILS

Language
go
Transport
stdiosse
Clients
Claude DesktopClaude CodeCursorVS CodeWindsurf
License
Apache-2.0
GitHub
grafana/mcp-grafana · ★ 2,929
npm
mcp-grafana
Last Release
v0.12.1APR 28, 2026
First Released
FEB 19, 2025

ADOPTION METRICS

// GitHub Stars
2,929

// Reading this2.9k stars in fourteen months reflect Grafana Labs' vendor-stewardship and observability community adoption. Star traction tracks alongside Grafana Cloud expansion.

// Popularity Rank
#9
Globally · #1 in Monitoring

// Reading thisTop-ranked monitoring MCP and the only vendor-official observability server in the directory. The context-window-aware tool design signals editorial maturity.

SOURCES & VERIFICATION

We don't take any single directory's word for it. Before scoring, we cross-reference 5 public MCP sources, install the server ourselves against the clients we cover, and record when we last re-verified.

01
Discovered
Manual submission
First indexed APR 28, 2026
02
Cross-referenced
5 directories
PulseMCP, Official MCP Registry, Awesome MCP Servers, Smithery, MCP.so
03
Verified against
Claude Desktop, Cursor, VS Code, Windsurf
Installed and tested across clients
04
Last re-checked
APR 28, 2026
Weekly re-verification
// How other directories see it

The same server, 5 different lenses. We reconcile these signals into our editorial score, which is why our number sometimes diverges from a directory-aggregate star count.

SourceTheir ratingTheir star countTheir downloadsLast synced
AutomationSwitch This page4.5editorial2,929APR 28, 2026
PulseMCP— unratedunavailableunavailableAPR 28, 2026
Official MCP Registry— unratedunavailableunavailableAPR 28, 2026
Awesome MCP Servers— unratedunavailableunavailableAPR 28, 2026
Smithery— unratedunavailableunavailableAPR 28, 2026
MCP.so— unratedunavailableunavailableAPR 28, 2026

// Counts are directory-reported; we don't adjust them. Discrepancies usually come from different snapshot times or star-caching.

// Get in touch

DISCUSS YOUR
MCP REQUIREMENTS.

Evaluating a server, scoping an internal deployment, or working out whether MCP is the right fit at all. Start the conversation and we will point you at the right piece of the ecosystem.

Discuss Your MCP Requirements →