Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog
Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI β†’ MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE β†— (opens in a new tab)
  • llms.txt β†— (opens in a new tab)
  • Catalog JSON β†— (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • GitHub β†— (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
Β© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. πŸ“Š Monitoring
  3. Loki MCP Server
Loki MCP Server logo
Health: ActiveRecent health check succeeded.Last checked 9/9/2026, 2:20:01 PM

Loki MCP Server

User RatingsBe the first to rate and review this MCP server!
View Repository5 GitHub StarsTotal stargazers on GitHub for the source repository (5 stars).Visit Website
lokilogsmonitoringlogql

Go-based MCP server for discovering and querying Grafana Loki logs with LogQL, without requiring Grafana.

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β€” or use 1-click editor setup below.

One-click editor setup isn’t available for this listing yet β€” we don’t have a confirmed install command, and we’d rather show nothing than point your editor at the wrong package or host. Follow the project’s own setup instructions, linked above.

Manual Client & Custom JSON ConfigExpand JSON β–Ύ
No confirmed setup config for this listing yet. We only publish a config block when the install details come from the project itself β€” its README, its docs, or a verified owner. We haven’t found those for incu6us/loki-mcp-server, and we’d rather show nothing than a guess you’d paste into your client. Follow the project’s own setup instructions for the current steps.
Install Directory Badge Claim listing AlternativesπŸ“Š More in Monitoring

Overview

This server exposes separate tools for discovering Loki labels, label values, and series before running LogQL queries. It supports range queries, instant queries, strict input validation, and optional basic or bearer-token authentication. Use it when an AI agent needs direct access to Loki logs and metadata.

Use cases

β€’Discover available Loki labels and values
β€’Query logs across a specified time range
β€’Evaluate LogQL expressions at a point in time
β€’Find active log stream series
β€’Analyze logs in DevOps workflows

Key features

β€’LogQL range queries with query_range
β€’LogQL instant queries with query
β€’Label name and value discovery
β€’Log stream series discovery
β€’Input validation with query limits and direction checks
β€’Basic auth or bearer-token authentication

Capabilities & Tool Schemas

Inspect callable tools, capabilities, and parameters exposed to AI agents by Loki MCP Server.

Extracted Tool Capabilities
LogQL range queries with query_range
LogQL instant queries with query
Label name and value discovery
Log stream series discovery
Input validation with query limits and direction checks
Basic auth or bearer-token authentication

Documentation Overview

Loki MCP Server

CI Release codecov Go Report Card License: MIT Stars MCP

loki-mcp-server MCP server

Query Grafana Loki logs directly from AI agents using the Model Context Protocol (MCP).

Built in Go. Enables AI-powered log analysis using LogQL.

Supports integration with:

  • Claude Desktop
  • AI agent frameworks
  • automation tools
  • DevOps workflows

Motivation

The official grafana/loki-mcp exposes a single loki_query tool, which means the LLM must already know valid label names and values before it can build a query. This project takes a different approach by providing 5 granular tools β€” labels, label_values, and series let the LLM discover what's available in Loki first, then construct precise query_range or query calls. The result is more accurate log retrieval with fewer wasted round-trips.

Additionally, this server enforces strict input validation (limit caps, direction validation, label name format checks, mutually exclusive auth) to surface errors early instead of forwarding bad requests to Loki.

Features

  • query_range β€” Execute LogQL range queries to fetch logs over a time window
  • query β€” Execute LogQL instant queries for point-in-time evaluation
  • labels β€” List all available label names
  • label_values β€” List values for a specific label
  • series β€” Find active log stream series matching a selector

Installation

Homebrew

bash
brew install incu6us/tap/loki-mcp-server

Go install

bash
go install github.com/incu6us/loki-mcp-server/cmd/loki-mcp-server@latest

Or build from source:

bash
git clone https://github.com/incu6us/loki-mcp-server.git
cd loki-mcp
go build -o loki-mcp-server ./cmd/loki-mcp-server

Configuration

The server is configured entirely via environment variables, injected by the MCP client.

VariableRequiredDefaultDescription
LOKI_URLyesβ€”Base URL of the Loki instance
LOKI_USERNAMEnoβ€”Basic auth username
LOKI_PASSWORDnoβ€”Basic auth password
LOKI_BEARER_TOKENnoβ€”Bearer token authentication
LOKI_TLS_SKIP_VERIFYnofalseSkip TLS certificate verification
LOKI_TENANT_IDnoβ€”X-Scope-OrgID header for multi-tenant deployments
LOKI_HTTP_TIMEOUTno30sHTTP request timeout (Go duration, e.g. 10s, 1m)
MCP_HTTP_ADDRnoβ€”Listen address for the streamable HTTP transport, e.g. :8080. Unset means stdio

Note: Basic auth (LOKI_USERNAME/LOKI_PASSWORD) and bearer token (LOKI_BEARER_TOKEN) are mutually exclusive.

Transports

By default the server speaks MCP over stdio, which is what Claude Code, Claude Desktop and most local clients expect.

Set MCP_HTTP_ADDR to serve the streamable HTTP transport instead, for running the server as a remote endpoint behind a proxy or gateway:

bash
LOKI_URL=http://loki:3100 MCP_HTTP_ADDR=:8080 loki-mcp-server
# MCP endpoint: http://localhost:8080/mcp

The HTTP mode is stateless, so it can run behind a load balancer with several replicas. It carries no authentication of its own β€” put it behind TLS and an authenticating proxy before exposing it, and remember that whoever reaches the endpoint can read every log line the configured LOKI_URL credentials can see.

Usage with Claude Code

Add to your Claude Code MCP configuration (~/.claude.json):

config.json
{
  "mcpServers": {
    "loki-mcp-server": {
      "type": "stdio",
      "command": "/path/to/loki-mcp-server",
      "args": [],
      "env": {
        "LOKI_URL": "http://loki:3100",
        "LOKI_USERNAME": "admin",
        "LOKI_PASSWORD": "secret"
      }
    }
  }
}

Usage with Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

config.json
{
  "mcpServers": {
    "loki-mcp-server": {
      "type": "stdio",
      "command": "/path/to/loki-mcp-server",
      "args": [],
      "env": {
        "LOKI_URL": "http://loki:3100",
        "LOKI_USERNAME": "admin",
        "LOKI_PASSWORD": "secret"
      }
    }
  }
}

Tools

query_range

Execute a LogQL range query against Loki to fetch logs over a time window.

ParameterTypeRequiredDefaultDescription
querystringyesβ€”LogQL query expression
startstringno1 hour agoStart of time range (RFC3339 or Unix nano)
endstringnonowEnd of time range
limitnumberno100Max entries (max 5000)
directionstringnobackwardforward or backward

query

Execute a LogQL instant query for point-in-time evaluation.

ParameterTypeRequiredDefaultDescription
querystringyesβ€”LogQL query expression
limitnumberno100Max entries (max 5000)
timestringnonowEvaluation timestamp
directionstringnobackwardforward or backward

labels

List all available label names in Loki.

ParameterTypeRequiredDefaultDescription
startstringno6 hours agoStart of time range
endstringnonowEnd of time range

label_values

List values for a specific label.

ParameterTypeRequiredDefaultDescription
labelstringyesβ€”Label name
startstringno6 hours agoStart of time range
endstringnonowEnd of time range

series

Find active log stream series matching a selector.

ParameterTypeRequiredDefaultDescription
matchstringyesβ€”Stream selector (e.g. {app="nginx"})
startstringno6 hours agoStart of time range
endstringnonowEnd of time range

Local Development Stack

A Docker Compose setup is included under deploy/ to spin up a full Loki environment for testing:

  • Loki β€” log storage at http://localhost:3100
  • Grafana β€” UI at http://localhost:3000 (anonymous admin, Loki pre-configured as datasource)
  • Promtail β€” collects container logs and ships them to Loki
  • Log generator β€” emits structured JSON logs with randomized apps (nginx, api, gateway, auth, payments), levels, and messages
bash
# Start the stack
docker compose -f deploy/docker-compose.yml up -d

# Use loki-mcp-server against local Loki
LOKI_URL=http://localhost:3100 loki-mcp-server

# Stop the stack
docker compose -f deploy/docker-compose.yml down

Development

bash
# Run tests
go test ./...

# Build
go build -o loki-mcp-server ./cmd/loki-mcp-server

# Vet
go vet ./...

⭐ If this project is useful for you, please star the repository.

Read the full README β†’View source on GitHub β†’

Related MCP Servers

View all in Monitoring View all alternatives
  • Grafana Loki MCP logoGrafana Loki MCP

    An MCP server that allows querying Loki logs through the Grafana API.

    πŸ“Š Monitoring2 views
    Compare vs Grafana Loki MCP β†’
  • Datadog MCP Server logoDatadog MCP Server

    MCP server providing comprehensive Datadog observability access for AI assistants. Features grep-like log search, APM trace filtering with duration/status/error queries, smart sampling modes for token efficiency, and cross-correlation between logs, traces, and metrics.

    πŸ“Š Monitoring2 views
    Compare vs Datadog MCP Server β†’
  • World Monitor logoWorld Monitor

    Live global intelligence: real-time markets, conflicts, country risk, chokepoints, energy. 39 tools.

    πŸ“Š Monitoring5 views
    Compare vs World Monitor β†’
  • MCP Server Logs Sieve logoMCP Server Logs Sieve

    Query, summarize, and trace logs in plain English across GCP Cloud Logging, AWS CloudWatch, Azure Log Analytics, Grafana Loki, and Elasticsearch

    πŸ“Š Monitoring3 views
    Compare vs MCP Server Logs Sieve β†’

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks β€” not a rating.

GitHub stars
5
Stargazers on the source repository.
Last commit
5mo ago
Most recent push to the default branch.
Directory activity
2 views
Config copies, upvotes, and views on AllMCPs.

Reviews

No reviews yet β€” be the first to share how this listing worked for you.

Frequently Asked Questions about Loki MCP Server

No. It queries a Grafana Loki instance directly.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewLoki MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/incu6us-loki-mcp-server?style=directory)](https://allmcps.com/mcp/incu6us-loki-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/incu6us-loki-mcp-server"><img src="https://allmcps.com/api/badge/incu6us-loki-mcp-server?style=directory" alt="Loki MCP Server on AllMCPs" /></a>

Technical Specs & Signals

CategoryπŸ“ŠMonitoring
PricingFree
More technical detailsExpand β–Ύ
AuthNo auth required
LicenseMIT
ClientsClaude Desktop
Last updatedAug 9, 2026
Views2
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
GitHub stars5
GitHub Star CountTotal stargazers on GitHub representing community popularity (5 stars).
Last commit5mo ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Mar 25, 2026
41Quality signal: Fair Β· 41/100How this signal is calculated β–Ύ
Server availabilityNot measured

Not scored for repo-hosted servers β€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership10/20
Documentation & tools19/30
Adoption & activity2/15
Community engagement0/10

A guidance signal from public completeness & health data β€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

β˜… FeaturedMoxie Docs MCP logo

Moxie Docs MCP

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

Explore Server β†’

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to unlock edit access and the Official badge β€” proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it β€” no claim needed. We detect it automatically and keep it verified as long as the badge stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in πŸ“Š Monitoring β†’Best MCP servers for Monitoring & Observability β†’Alternatives to Loki MCP Server β†’Install in Claude DesktopInstall in CursorInstall in VS Code