Back to directory
grafana/loki-mcp

grafana/loki-mcp

@grafana

A Go-based MCP server for querying Grafana Loki logs with support for stdin/stdout and SSE communication.

grafanalokimcplogsquerymonitoringobservabilitygotool

Installation & Configuration

{
  "mcpServers": {
    "loki-mcp": {
      "command": "go",
      "args": [
        "run",
        "./cmd/server"
      ],
      "env": {
        "LOKI_URL": "http://localhost:3100",
        "LOKI_ORG_ID": "your-default-org-id",
        "LOKI_USERNAME": "your-username",
        "LOKI_PASSWORD": "your-password",
        "LOKI_TOKEN": "your-bearer-token"
      },
      "disabled": false,
      "autoApprove": [
        "loki_query"
      ]
    }
  }
}

Information

Transport
stdiosse
Language
Go
Created
2026/6/12
Updated
2026/6/13