loki-mcp MCP Server

A Go-based server implementation for the Model Context Protocol (MCP) with Grafana Loki integration.

Local serverstdio

What is the loki-mcp Server?

loki-mcp source profile. From the maintainer documentation: “A Go-based server implementation for the Model Context Protocol (MCP) with Grafana Loki integration.”

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_ORG_ID, LOKI_USERNAME, LOKI_PASSWORD, LOKI_TOKEN. 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": {
    "lokiserver": {
      "command": "path/to/loki-mcp-server",
      "args": [],
      "env": {
        "LOKI_URL": "http://localhost:3100",
        "LOKI_ORG_ID": "your-default-org-id",
        "LOKI_USERNAME": "your-username",
        "LOKI_PASSWORD": "YOUR_LOKI_PASSWORD",
        "LOKI_TOKEN": "YOUR_LOKI_TOKEN"
      },
      "disabled": false,
      "autoApprove": [
        "loki_query"
      ]
    }
  }
}

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

Configuration

VariableDescriptionRequired
LOKI_URLDeclared in the maintainer’s client configuration.Check documentation
LOKI_ORG_IDDeclared in the maintainer’s client configuration.Check documentation
LOKI_USERNAMEDeclared in the maintainer’s client configuration.Check documentation
LOKI_PASSWORDDeclared in the maintainer’s client configuration.Check documentation
LOKI_TOKENDeclared in the maintainer’s client configuration.Check documentation