MCP Catalogs
Home

loki-mcp

by grafana·141·Score 51

A production-ready MCP server for querying Grafana Loki logs with comprehensive documentation and multiple deployment options.

monitoringdeveloper-toolsops-infra
29
Forks
26
Open issues
this month
Last commit
2d ago
Indexed

Overview

The Loki MCP Server is a robust Go-based implementation that provides seamless integration between AI assistants and Grafana Loki log data. It exposes a single powerful `loki_query` tool with comprehensive parameters for time ranges, limits, and multi-tenant support. The implementation demonstrates production-ready quality with support for both stdin/stdout and HTTP SSE communication modes, allowing integration with various clients including Claude Desktop and n8n workflows.

Try asking AI

After installing, here are 3 things you can ask your AI assistant:

you:Enable AI assistants to query logs across systems during debugging sessions
you:Integrate log querying capabilities into AI-powered monitoring workflows
you:Provide natural language access to Loki logs for non-technical team members

When to choose this

Choose this server when you need to query Grafana Loki logs through natural language interfaces and already have a Loki deployment.

When NOT to choose this

Don't choose this if you need to query other logging systems besides Grafana Loki, or if you require advanced log processing capabilities beyond simple LogQL queries.

Tools this server exposes

1 tool extracted from the README
  • loki_query

    Query Grafana Loki log data with LogQL

Comparable tools

prometheus-mcpelasticsearch-mcplogstash-mcpraw loki cli

Installation

Installation

Building from Source

go build -o loki-mcp-server ./cmd/server
./loki-mcp-server

Using Docker

docker build -t loki-mcp-server .
docker run --rm -i loki-mcp-server

Claude Desktop Configuration

{
  "mcpServers": {
    "lokiserver": {
      "command": "/path/to/loki-mcp-server",
      "env": {
        "LOKI_URL": "http://localhost:3100",
        "LOKI_ORG_ID": "your-org-id"
      },
      "autoApprove": ["loki_query"]
    }
  }
}

Compare loki-mcp with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.