Back to Home
grafana icon

loki-mcp

Verified Safe

by grafana

Overview

A Go-based server implementation for the Model Context Protocol (MCP) enabling AI agents to query Grafana Loki log data.

Installation

Run Command
docker run -p 8080:8080 --rm -i -e LOKI_URL=http://host.docker.internal:3100 loki-mcp-server:latest

Environment Variables

  • LOKI_URL
  • PORT
  • LOKI_ORG_ID
  • LOKI_USERNAME
  • LOKI_PASSWORD
  • LOKI_TOKEN

Security Notes

The server correctly retrieves sensitive authentication details (URL, Org ID, Username, Password, Token) from environment variables or tool arguments, rather than hardcoding. It uses standard HTTP headers for authentication (Bearer token or Basic Auth). The `README` includes a critical security note advising caution against exposing credentials in logs or config files. All URL construction uses `url.PathEscape` to prevent injection. No 'eval' or malicious patterns were found. The primary security consideration for operators is the secure management of the environment variables used to pass credentials.

Similar Servers

Stats

Interest Score47
Security Score9
Cost ClassLow
Avg Tokens5000
Stars60
Forks11
Last Update2025-12-04

Tags

LokiGrafanaLogsMCPGo