Labsco
MCP SERVER

Simple Loki MCP Server

by ghrud92

Query a Loki server for logs across a time window from the client, and list the labels and label values available to filter on before you write the query.

Observability, Monitoring & Incident ResponseVerified
Summary
The whole surface is one query and the two lookups that make the query writable.

query_loki carries the arguments a log search needs in one call — from and to for the window, limit for the ceiling, forward for the direction, batch for how much comes back at a time, plus output and quiet for the shape of the result. get_labels and get_label_values are what you reach for when you do not yet know the label set, which is the usual state when the instance is not yours.

What it is

A Loki query client covering 3 tools: one query call plus the two label lookups that tell you what to filter on.

What you get
  • Log queries with their own window: query_loki takes a query with from and to bounds, a limit, forward for ordering, batch for page size, output for the result format and quiet.
  • The label names the instance carries, through get_labels.
  • The values recorded for one of those labels, through get_label_values.
Requirements

A Loki instance you can reach and its address in LOKI_ADDR.

Setup effort

One command — npx -y @smithery/cli install @ghrud92/simple-loki-mcp --client claude