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_prometheusRun a PromQL query against any Prometheus datasource configured in Grafana.
query_loki_logsExecute LogQL log and metric queries against a Loki datasource.
search_dashboardsFind dashboards by title, tags, or folder.
get_dashboard_summaryCompact overview of a dashboard's panels and queries.
list_datasourcesList every datasource configured in the Grafana instance.
alerting_manage_rulesList, create, update, and delete Grafana alert rules.
list_incidentsList incidents tracked in Grafana Incident.
get_current_oncall_usersReturn the users currently on call across Grafana OnCall schedules.
find_error_pattern_logsDetect elevated error patterns in Loki logs over a time window.
get_panel_imageRender a Grafana panel or dashboard as a PNG image.