AgentTask Atlas

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
  1. alerting_rules_write1,597
  2. update_dashboard1,187
  3. get_panel_image840
  4. query_loki_logs713
  5. alerting_silences_write678
  6. alerting_rules_read655
  7. generate_deeplink551
  8. query_pyroscope515
  9. alerting_routing_write445
  10. query_prometheus399
  11. alerting_manage_routing385
  12. list_alert_groups385
  13. query_loki_stats382
  14. alerting_silences_read374
  15. create_incident363
  16. create_datasource361
  17. list_prometheus_label_values359
  18. query_prometheus_histogram356
  19. list_loki_label_values347
  20. list_prometheus_label_names347
  21. diff_tempo_traces343
  22. analyze_loki_labels339
  23. update_datasource323
  24. query_loki_patterns317
  25. update_incident310
  26. list_prometheus_metric_names299
  27. list_pyroscope_label_values288
  28. list_loki_label_names282
  29. query_tempo_metrics276
  30. get_dashboard_property263
  31. list_pyroscope_label_names262
  32. get_dashboard_panel_queries258
  33. get_assertions252
  34. list_pyroscope_profile_types248
  35. create_annotation246
  36. get_dashboard_by_uid231
  37. grafana_api_request230
  38. get_annotations221
  39. list_datasources202
  40. search_dashboards185
  41. validate_provisioning_file179
  42. create_snapshot174
  43. list_tempo_attribute_values169
  44. list_prometheus_metric_metadata163
  45. get_doc159
  46. list_incidents159
  47. get_tempo_traceql_docs155
  48. search_tempo_traces154
  49. list_oncall_users150
  50. update_alert_group148
  51. add_activity_to_incident146
  52. list_oncall_schedules145
  53. search_plugin_information142
  54. suggest_loki_alloy_label_config141
  55. update_annotation140
  56. list_dashboard_versions130
  57. install_plugin127
  58. list_tempo_attribute_names127
  59. get_alert_group126
  60. search_docs125
  61. get_datasource121
  62. create_folder110
  63. get_tempo_trace103
  64. get_plugin99
  65. check_datasources_health98
  66. get_current_oncall_users92
  67. get_oncall_shift88
  68. user_info88
  69. list_incident_custom_fields85
  70. list_provisioning_repositories85
  71. get_dashboard_summary83
  72. list_snapshots79
  73. get_annotation_tags75
  74. get_incident75
  75. list_oncall_teams62
  76. search_folders61
  77. delete_annotation57
  78. get_snapshot56
  79. 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-write gives 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-rendering gets 46 tools/~10,856 tokens. source ↗
  • --disable-query keeps only metadata/discovery (for accounts with datasources:read but not datasources:query); --enabled-tools=search,datasource,dashboard,prometheus,loki measured 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=disabled or DO_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 need plugins.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 -debug to 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.

Listed on AgentTask Atlas

← All MCP servers and skills