Loki

•
6
•

Queries Grafana Loki logs using the Model Context Protocol.

Loki is a Go-based Model Context Protocol (MCP) server that enables querying of Grafana Loki logs. It provides a `loki_query` tool that allows users to execute LogQL queries against a specified Loki instance. The server communicates via stdin/stdout, making it compatible with MCP clients such as Claude Desktop and Cursor, enabling seamless integration of Loki log data into agentic workflows. Docker support simplifies deployment and local testing with a complete Docker Compose setup including Loki, Grafana, and a log generator.

主要功能

01Implements the Model Context Protocol (MCP)
02Offers flexible configuration via parameters and environment variables
03Supports querying Grafana Loki log data using LogQL
040 GitHub stars
05Includes a Loki query tool (`loki_query`)
06Provides Docker and Docker Compose support for easy deployment and testing

使用案例

01Querying logs directly within Claude Desktop or Cursor
02Integrating Loki log queries into agentic workflows
03Automating log analysis tasks using the MCP interface