The Grafana MCP connection covers Prometheus and Loki datasource queries. You do not need to connect Prometheus or Loki separately if they are already configured as Grafana datasources. However, if you use Tempo for distributed tracing, connect Tempo separately — the Grafana MCP does not expose Tempo’s full TraceQL surface.
What this integration enables
- Metric queries — agents run PromQL against your Prometheus datasource via Grafana
- Log search — agents run LogQL against your Loki datasource via Grafana
- Unified alert state — agents can read Grafana-managed alert rules and their current state
- Dashboard context — agents can reference your dashboards during diagnosis and in RCA documents
Prerequisites
- A running Grafana instance (self-hosted or Grafana Cloud)
- Admin access to Grafana to create a service account
- The
grafana-mcpserver running and reachable from sureops (see step 2 below)
Setup
1
Generate a Service Account Token
In Grafana, go to Administration → Service accounts.Create a new service account with the Viewer role — read-only access is sufficient for sureops. Then click Add token to generate a service account token for that account.Copy the token; you’ll need it in step 3. Grafana only shows it once.
2
Stand up grafana-mcp
Run
grafana-mcp pointed at your Grafana instance. If you’re using the sureops demo environment, grafana-mcp is already provisioned in-cluster — you can skip this step.For your own environment, deploy grafana-mcp with your Grafana URL and the service account token from step 1. The sureops MCP setup guide has Helm and Docker Compose examples.3
Enter MCP endpoint and credentials
In sureops, go to Settings → Integrations and click Connect next to Grafana.Fill in:
- Service Account Token — from step 1
- Grafana URL — the base URL of your Grafana instance (e.g.
https://grafana.example.com) - Grafana MCP Endpoint — the URL of your running
grafana-mcpserver - MCP Connection Token — only required if your
grafana-mcpdeployment uses bearer auth; leave blank otherwise - Grafana Org ID — defaults to
1for single-org Grafana installs