Grafana MCP server
Run PromQL and LogQL queries, manage alerts, and read on-call from Grafana.
About
Connect Tracecat to Grafana to drive the same observability investigations a human would for SRE and SOC teams that live in Prometheus, Loki, and Grafana OnCall. You can run a PromQL query to confirm a spike from a workflow when an alert fires. From there, pivot to LogQL for the matching log lines, page the current on-call responder, and manage alert rules with the connection scoped to a service account token under your control.
Setup
- 1
Create an access token
The Grafana MCP server authenticates with a Grafana service account token. Username and password still work as a legacy option, and the deprecated `GRAFANA_API_KEY` variable is also accepted with a warning.
- 2
Select the
Grafanatile in the Tracecat MCP catalogOpen the
MCP catalogin your workspace, select theGrafanatile, and paste your access token. - 3
Enable
Grafanain your agentIn your
ai.agentaction orAgents→toolstab, selectGrafanafrom theMCP integrationsdropdown.
Tools
query_prometheus | Run a PromQL query against any Prometheus datasource configured in Grafana. |
query_loki_logs | Execute LogQL log and metric queries against a Loki datasource. |
search_dashboards | Find dashboards by title, tags, or folder. |
get_dashboard_summary | Compact overview of a dashboard's panels and queries. |
list_datasources | List every datasource configured in the Grafana instance. |
alerting_manage_rules | List, create, update, and delete Grafana alert rules. |
list_incidents | List incidents tracked in Grafana Incident. |
get_current_oncall_users | Return the users currently on call across Grafana OnCall schedules. |
find_error_pattern_logs | Detect elevated error patterns in Loki logs over a time window. |
get_panel_image | Render a Grafana panel or dashboard as a PNG image. |