Back to Home
grafana icon

loki-mcp

Verified Safe

by grafana

Overview

A Go-based server that implements the Model Context Protocol (MCP) to integrate Grafana Loki log querying capabilities with AI agents like Claude Desktop or n8n.

Installation

Run Command
docker run --rm -i loki-mcp-server

Environment Variables

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

Security Notes

The server uses standard Go libraries for HTTP requests and URL parsing, which correctly handles parameter escaping and mitigates common injection vulnerabilities. It retrieves sensitive credentials (Loki URL, authentication details, organization ID) from environment variables or request parameters, adhering to best practices for secret management. The README explicitly warns users about securing these credentials. No 'eval' or other dangerous dynamic code execution patterns were found. The primary security consideration for users is the safe handling of their `LOKI_USERNAME`, `LOKI_PASSWORD`, or `LOKI_TOKEN` environment variables outside of the application.

Similar Servers

Stats

Interest Score49
Security Score8
Cost ClassMedium
Avg Tokens5000
Stars76
Forks18
Last Update2026-01-19

Tags

GoGrafana LokiMCPAI AgentLog Management