loki-mcp
Verified Safeby grafana
Overview
A Go-based server implementation for the Model Context Protocol (MCP) enabling AI agents to query Grafana Loki log data.
Installation
docker run -p 8080:8080 --rm -i -e LOKI_URL=http://host.docker.internal:3100 loki-mcp-server:latestEnvironment 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
mcp-k8s-go
An MCP server enabling AI assistants and users to interact with and manage Kubernetes clusters by listing, getting, applying, and executing commands on Kubernetes resources.
mkp
MKP is a Model Context Protocol (MCP) server for Kubernetes that enables LLM-powered applications to interact with Kubernetes clusters.
mcp-sdk-go
A Go SDK for implementing and interacting with the Model Context Protocol (MCP), enabling Go applications to seamlessly integrate with and manage large language models, their tools, resources, and context.
mcp-cli
Manages and deploys Model Context Protocol (MCP) server configurations (local, container, remote) to various AI tools, simplifying their setup and profile switching.