Loki MCP Server

Stableanalytics
55 starsTypeScriptcommunity
GitHub
About

Overview

The Loki MCP Server enables AI agents to query logs stored in Grafana Loki. It provides tools for executing LogQL queries, streaming logs, listing labels, and exploring log patterns.
Capabilities

Tools & Capabilities

query

Execute a LogQL query

query_range

Execute a range LogQL query

list_labels

List available log labels

get_label_values

Get values for a specific label

Setup

Installation

bash
Install
npx -y mcp-server-loki
Examples

Example Usage

javascript
Usage
{
  "mcpServers": {
    "loki": {
      "command": "npx",
      "args": ["-y", "mcp-server-loki"],
      "env": { "LOKI_URL": "http://localhost:3100" }
    }
  }
}

Quick Info

Authorcommunity
LanguageTypeScript
StatusStable
Stars 55
Last UpdatedFeb 12, 2026

Need a Custom MCP Server?

Our team builds custom MCP servers tailored to your workflow.

Get in Touch

Need a Custom MCP Server?

Our team builds custom MCP servers tailored to your workflow. From proprietary data sources to internal tools, we have you covered.

Contact Us
CortexAgent Customer Service

Want to skip the form?

Our team is available to help you get started with CortexAgent.

This chat may be recorded for quality assurance. You can view our Privacy Policy.