mcp-loki

lexfrei/mcp-loki
★ 3 stars Go AI/LLM Updated today
MCP server for querying Grafana Loki logs
View on GitHub → Try with Claude — $10 free →

Quick Install

Copy the config for your editor. Some servers may need additional setup — check the README.

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "mcp-loki": {
      "command": "go",
      "args": [
        "run",
        "github.com/lexfrei/mcp-loki@latest"
      ]
    }
  }
}

README Excerpt

MCP server for querying Grafana Loki logs. Enables LLMs to search and analyze logs via the Model Context Protocol. - **LogQL Queries** — Execute range queries with flexible time ranges - **Label Discovery** — List labels and their values for query building - **Series Exploration** — Find log streams matching label selectors

Tools (16)

LOKI_ORG_IDLOKI_PASSWORDLOKI_TOKENLOKI_URLLOKI_USERNAMEMCP_HTTP_PORTappdirectionendintervallabellimitmatchqueryselectortimerange