loki-mcp MCP Server

Loki MCP Server is a Model Context Protocol (MCP) interface for querying Grafana Loki logs using logcli. The server enables AI assistants to access and analyze log data from Loki directly.

Local serverstdioMIT

What is the loki-mcp Server?

loki-mcp source profile. From the maintainer documentation: “Loki MCP Server is a Model Context Protocol (MCP) interface for querying Grafana Loki logs using logcli. The server enables AI assistants to access and analyze log data from Loki directly.”

Installation

The documented npm package is simple-loki-mcp. The configuration below comes from the maintainer’s example; adapt its paths and account values to your environment.

Configuration values

The example declares LOKI_ADDR. Secret-looking values have been replaced with placeholders. Required and optional labels are shown only when the documentation states them.

Source

Project documentation · Repository · Discovery listing. This profile records the public documentation checked on 2026-10-08.

How to install the loki-mcp Server

{
  "mcpServers": {
    "simple-loki": {
      "command": "npx",
      "args": [
        "-y",
        "simple-loki-mcp"
      ],
      "env": {
        "LOKI_ADDR": "https://loki.sup.band"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

VariableDescriptionRequired
LOKI_ADDRDeclared in the maintainer’s client configuration.Check documentation