# Loki MCP Server

A Go-based Model Context Protocol server that lets MCP clients such as Claude Desktop query Grafana Loki log data using the LogQL query language.

Loki MCP Server implements the Model Context Protocol over stdin/stdout and SSE, exposing a single query tool that runs a LogQL query against a Grafana Loki instance and returns matching log entries.

The tool accepts a time range, a result limit and an organization ID, with defaults configurable through environment variables such as the Loki server URL and credentials for basic or bearer-token authentication. It builds and runs as a Go binary, can be built and run inside Docker, and ships with a small test client for exercising the server directly.

It is written in Go.

Website: https://github.com/grafana/loki-mcp
