Skip to main content
Glama
mvs5465-test

Loki MCP Server

by mvs5465-test

Loki MCP Server

An MCP (Model Context Protocol) server for semantic log querying via Loki. Designed to help AI models answer natural language questions about your cluster logs.

Features

  • Error Summary: Aggregate errors across your cluster with breakdowns by type

  • Pod Restart Detection: Find crashing/restarting pods

  • Log Search: Regex-based log search across your cluster

  • Namespace/Pod Discovery: List available namespaces and query specific pods

  • Semantic Tool Design: Tool names and parameters match natural language questions

Related MCP server: OpenTelemetry MCP Server

Tools

get_error_summary

Get a summary of errors happening in your cluster.

  • namespace: Filter to specific namespace (empty = all)

  • hours: Look back this many hours (default: 1)

find_pod_restarts

Find pods that have restarted or crashed recently.

  • namespace: Filter to specific namespace (empty = all)

  • hours: Look back this many hours (default: 1)

search_logs

Search logs with a regex pattern.

  • query: Regex pattern to search for

  • namespace: Filter to specific namespace (empty = all)

  • hours: Look back this many hours (default: 1)

  • limit: Maximum log lines to return (default: 100)

list_namespaces

List all namespaces that have logs in Loki.

get_pod_logs

Get logs for a specific pod.

  • pod_name: Pod name (supports wildcards like ollama*)

  • namespace: Namespace of the pod (empty = search all)

  • hours: Look back this many hours (default: 1)

  • limit: Maximum log lines to return (default: 100)

Development

# Install dependencies
uv sync

# Run the server
uv run server.py

The server exposes FastMCP over streamable HTTP at /mcp (default port 8000).

Deployment (In-Cluster)

Add to your local-k8s-apps Helm values with:

  • Deployment with the MCP server

  • Exposed via HTTP on port 8000

  • Environment variable: LOKI_URL pointing to Loki service

The Ollama MCP bridge will load this server's tools and expose them to the model.

F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    Enables AI assistants to interact with Google Cloud Platform services for log analysis and root cause investigation. Provides tools to query Cloud Logging, detect error patterns, and perform real-time log streaming across multiple GCP projects.
    Last updated
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Enables AI agents to query Prometheus metrics and Loki logs for intelligent alert investigation and troubleshooting. Provides service discovery, metric querying, log searching, and correlation tools to help identify root causes of issues.
    Last updated
    9
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to automatically inspect and analyze application runtime log files for debugging and troubleshooting. Supports monitoring multiple log directories simultaneously with tools for listing, reading, searching, and paginating through log files.
    Last updated
    8
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    Enables querying and formatting Loki logs from Grafana via the Model Context Protocol. It supports LogQL queries, label retrieval, and provides results in text, JSON, or markdown formats.
    Last updated
    29
    MIT

View all related MCP servers

Related MCP Connectors

  • Read-only access to Auralogs production logs: search logs, inspect errors, review AI analyses.

  • Provide real-time data querying and visualization by integrating Tako with your agents. Generate o…

  • Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mvs5465-test/loki-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server