Skip to content
Kitbay
MCP server

grafana-loki-mcp

Runs locallyMITUpdated on Jan 5, 202629GitHub starsNeeds an API key

A Python MCP server built with FastMCP that queries Loki logs through a Grafana instance's API rather than talking to Loki directly.

What it does

A Python MCP server built with FastMCP that queries Loki logs through a Grafana instance's API rather than talking to Loki directly. It is installed from PyPI as grafana-loki-mcp or run with uvx, and takes the Grafana URL and a Grafana API key as arguments or environment variables. It can run log queries, list Loki labels and their values, and return results as text, JSON or Markdown, over stdio or SSE.

Capabilities

  • Query Loki logs through the Grafana API
  • List Loki labels and label values
  • Format results as text, JSON or Markdown