MCP server · Grafana Labs
Grafana MCP
Pick it to query dashboards, Prometheus and Loki from the agent; needs a Grafana service account token.
Tools: 79, ~21,140 tokens of tool definitions loaded into the model's context (release binary, default tools; measured 2026-10-28, v2.1.1). Compare all servers →
All 79 tools, by token cost
- alerting_rules_write1,597
- update_dashboard1,187
- get_panel_image840
- query_loki_logs713
- alerting_silences_write678
- alerting_rules_read655
- generate_deeplink551
- query_pyroscope515
- alerting_routing_write445
- query_prometheus399
- alerting_manage_routing385
- list_alert_groups385
- query_loki_stats382
- alerting_silences_read374
- create_incident363
- create_datasource361
- list_prometheus_label_values359
- query_prometheus_histogram356
- list_loki_label_values347
- list_prometheus_label_names347
- diff_tempo_traces343
- analyze_loki_labels339
- update_datasource323
- query_loki_patterns317
- update_incident310
- list_prometheus_metric_names299
- list_pyroscope_label_values288
- list_loki_label_names282
- query_tempo_metrics276
- get_dashboard_property263
- list_pyroscope_label_names262
- get_dashboard_panel_queries258
- get_assertions252
- list_pyroscope_profile_types248
- create_annotation246
- get_dashboard_by_uid231
- grafana_api_request230
- get_annotations221
- list_datasources202
- search_dashboards185
- validate_provisioning_file179
- create_snapshot174
- list_tempo_attribute_values169
- list_prometheus_metric_metadata163
- get_doc159
- list_incidents159
- get_tempo_traceql_docs155
- search_tempo_traces154
- list_oncall_users150
- update_alert_group148
- add_activity_to_incident146
- list_oncall_schedules145
- search_plugin_information142
- suggest_loki_alloy_label_config141
- update_annotation140
- list_dashboard_versions130
- install_plugin127
- list_tempo_attribute_names127
- get_alert_group126
- search_docs125
- get_datasource121
- create_folder110
- get_tempo_trace103
- get_plugin99
- check_datasources_health98
- get_current_oncall_users92
- get_oncall_shift88
- user_info88
- list_incident_custom_fields85
- list_provisioning_repositories85
- get_dashboard_summary83
- list_snapshots79
- get_annotation_tags75
- get_incident75
- list_oncall_teams62
- search_folders61
- delete_annotation57
- get_snapshot56
- delete_snapshot50
Same server, other documented flags (measured 2026-10-28):
--disable-write(read-only): 62 tools, ~14,628 tokens (31% less than the default)--disable-query(no query execution (metadata/discovery only)): 67 tools, ~17,513 tokens (17% less than the default)--disable-write --disable-oncall --disable-incident --disable-asserts --disable-pyroscope --disable-rendering(read-only without OnCall, incidents, Asserts, Pyroscope, rendering): 46 tools, ~10,856 tokens (49% less than the default)--enabled-tools=search,datasource,dashboard,prometheus,loki(search + dashboards + Prometheus + Loki only): 25 tools, ~7,806 tokens (63% less than the default)
Install
Binary, Docker image grafana/mcp-grafana or `uvx` (see README). Official install docs ↗
Credentials: GRAFANA_URL plus a service account token (GRAFANA_SERVICE_ACCOUNT_TOKEN; GRAFANA_API_KEY is deprecated) or basic auth. Sends anonymous usage statistics by default (GRAFANA_USAGE_STATS=disabled to opt out).
What it can access
Reads dashboards, datasources, Prometheus/Loki queries, incidents; some write tools (--disable-write removes them, plus the raw SQL/InfluxDB query tools).
Minimal safe setup
--disable-writegives read-only mode and also removes raw-SQL tools (they can write if the datasource allows it). Measured: 62 tools/~14,628 tokens vs 79/~21,140 default. Adding--disable-oncall --disable-incident --disable-asserts --disable-pyroscope --disable-renderinggets 46 tools/~10,856 tokens. source ↗--disable-querykeeps only metadata/discovery (for accounts withdatasources:readbut notdatasources:query);--enabled-tools=search,datasource,dashboard,prometheus,lokimeasured 25 tools/~7,806 tokens, but still includes dashboard/datasource write tools unless you add--disable-write. source ↗- Use a service account with granular RBAC rather than the Editor role (Editor is convenient but less restrictive). Anonymous usage statistics are on by default; opt out with
--usage-stats=disabledorDO_NOT_TRACK=1. source ↗
Common setup errors
- Datasource tools fail on an older Grafana.
- Grafana 9.0 or later is required for full functionality; some datasource operations use endpoints missing in earlier versions. source ↗
- Tools return permission errors with a service account token.
- Each tool needs specific RBAC actions and scopes (table in the README). OnCall and other plugin tools are authorized by plugin actions such as
grafana-irm-app.schedules:read; incident tools needplugins.app:access. source ↗ - SQL, CloudWatch, Elasticsearch, admin or panel-query tools are missing.
- Those categories are disabled by default; add them to
--enabled-tools(e.g.sql,cloudwatch,elasticsearch,admin,runpanelquery). source ↗ - You need to see what the server sends to Grafana.
- Add
-debugto the args for HTTP request/response logging. source ↗
How it differs from alternatives
- Datadog MCP Server: Hosted by Datadog with OAuth and your Datadog RBAC; nothing to run. Grafana's server runs locally (binary, Docker or uvx) against your own Grafana.
- Sentry MCP Server: Focused on application errors and issues; 9 tools measured vs Grafana's 79. Measured: 9 tools, ~5,492 tokens.
Notes written from the official sources linked above, checked 2026-10-28.
Details
- Type
- MCP server
- Tasks
- Debugging & observability
- Compatible agents
- Claude Desktop, Cursor, VS Code (source: clients with a setup heading or install/config instructions in the official README)
- Maintenance
- Release v2.4.0 on 2026-11-24; last commit 2026-11-25
- License
- Apache-2.0
- Source
- https://github.com/grafana/mcp-grafana
- Verified on
- 2026-11-25
No independent security audit: entries summarize official sources only. Review permissions and code before installing.
Compared in: Best MCP servers for Debugging & observability in Cursor · Best MCP servers for Debugging & observability in VS Code · Best MCP servers for Debugging & observability in Claude Desktop · Best MCP servers for Debugging & observability
Badge for your README (maintainers)
The badge only says it's listed; it is not a security review or an endorsement.