loki-mcp-server MCP Server

Query Grafana Loki logs directly from AI agents using the Model Context Protocol (MCP).

Local serverstdio

What is the loki-mcp-server MCP Server?

loki-mcp-server source profile. From the maintainer documentation: “Query Grafana Loki logs directly from AI agents using the Model Context Protocol (MCP).”

Local setup

The project provides a local client configuration using /path/to/loki-mcp-server. Follow the repository’s build and installation steps before copying it, and replace example paths with the paths on your own computer.

Configuration values

The example declares LOKI_URL, LOKI_USERNAME, LOKI_PASSWORD. 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.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
query_range
label_values

How to install the loki-mcp-server MCP Server

{
  "mcpServers": {
    "loki-mcp-server": {
      "type": "stdio",
      "command": "/path/to/loki-mcp-server",
      "args": [],
      "env": {
        "LOKI_URL": "http://loki:3100",
        "LOKI_USERNAME": "admin",
        "LOKI_PASSWORD": "YOUR_LOKI_PASSWORD"
      }
    }
  }
}

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

Configuration

VariableDescriptionRequired
LOKI_URLDeclared in the maintainer’s client configuration.Yes
LOKI_USERNAMEDeclared in the maintainer’s client configuration.Optional
LOKI_PASSWORDDeclared in the maintainer’s client configuration.Optional