Skip to main content
The Loki integration gives sureops agents access to your Loki instance for LogQL log queries — used during diagnosis to surface relevant log lines, error patterns, and stack traces correlated with an incident’s time window and affected services.
If your Loki is already configured as a Grafana datasource, you likely do not need this integration — the Grafana integration covers Loki log queries through a single MCP server. Connect Loki directly only if you run Loki standalone without Grafana, or if your Loki is not accessible through your Grafana instance.

What this integration enables

  • LogQL queries — agents search log streams for error messages, exception traces, and service-level events during diagnosis
  • Time-window correlation — agents narrow log searches to the incident time window and affected services automatically
  • Multi-tenant support — if you run a multi-tenant Loki, configure the Tenant ID to scope queries to the correct org

Prerequisites

  • A running Loki instance reachable from your network
  • The loki-mcp server running and reachable from sureops

Setup

1

Stand up loki-mcp

Deploy loki-mcp pointed at your Loki instance. If you’re using the sureops demo environment, loki-mcp is already provisioned in-cluster — you can skip this step.For your own environment, deploy loki-mcp with your Loki base URL. The sureops MCP setup guide has Helm and Docker Compose examples.
2

Enter MCP endpoint and token

In sureops, go to Settings → Integrations and click Connect next to Loki.Fill in:
  • Loki MCP Endpoint — the URL of your running loki-mcp server (e.g. https://loki-mcp.internal.company.com/mcp)
  • MCP Connection Token — the bearer token used to authenticate sureops to your loki-mcp deployment
  • Tenant ID — optional; only required for multi-tenant Loki deployments. Uses the X-Scope-OrgID header. Defaults to fake for single-tenant deployments.
Click Verify connection to confirm sureops can reach the MCP server.

Required credentials


Common errors


Official documentation