G

grafana-loki-mcpGrafana Loki MCP Repository

(0)
Daniel NikulshynReviewed by Daniel Nikulshyn·Updated July 2026

Overview

The Grafana-Loki MCP Server is a FastMCP server that allows querying Loki logs from Grafana. It enables users to query Loki logs, retrieve Loki labels and label values, and format query results in various formats. The server supports both stdio and SSE transport protocols. It is designed for users who need to integrate Loki log querying into their workflows, particularly those already using Grafana. The tool is built using Python 3.10+ and relies on FastMCP and Requests libraries. While it offers flexible querying and formatting options, its functionality is somewhat limited to Grafana and Loki integrations, and users need to have appropriate Grafana API keys for access.

Key features

  • Query Loki logs through Grafana API
  • Get Loki labels and label values
  • Format query results in different formats (text, JSON, markdown)
  • Support for stdio and SSE transport protocols

Pricing

Model
Free
Category
MCP Servers
Rating
No reviews yet

Use cases

Log Analysis

Use Grafana-Loki MCP Server to query and analyze logs from a Grafana instance, filtering and formatting results as needed.

Integration with Grafana

Integrate the MCP Server with existing Grafana setups to enable log querying and analysis directly within Grafana workflows.

Pros & Cons

Pros

  • Enables querying Loki logs directly through Grafana API
  • Supports multiple output formats (text, JSON, markdown)
  • Offers flexibility with stdio and SSE transport protocols
  • Simple to install and set up using pip

Cons

  • Limited to Grafana and Loki integrations
  • Requires Grafana API key with appropriate permissions
  • Dependent on Python 3.10+ environment

Reviews

Sign in to leave a review.

No reviews yet. Be the first!

Q&A

Can this tool be used with non‑Grafana log sources?

No, its functionality is limited to querying Loki logs through the Grafana API; it does not support other log systems or direct Loki endpoints.

Asked by Elias Hedström · Dec 27, 2025

Which output formats and transport protocols are supported?

Results can be formatted as plain text, JSON, or Markdown, and you can choose between stdio (default) or Server‑Sent Events (SSE) transport via the `transport` option.

Asked by Ines Zeković · Dec 21, 2025

How do I authenticate the server to query Loki logs?

You must provide a Grafana API key with appropriate permissions, either by setting the GRAFANA_API_KEY environment variable or passing it with the `k` command‑line argument.

Asked by Rania Nasser · Dec 8, 2025

What runtime environment does Grafana Loki MCP require?

It requires Python 3.10 or newer and the FastMCP and Requests libraries, which are installed automatically via pip.

Asked by Ingrid Bauer · Sep 9, 2025

Ask a question

MCP Servers alternatives