L

Loki MCP Server

A server for querying Grafana Loki logs via the MCP protocol, supporting LogQL queries and multiple output formats
2 points
13

What is the Simple Loki MCP Server?

The Simple Loki MCP Server is a tool based on the Model Context Protocol (MCP) for directly retrieving log data from Grafana Loki. It allows users to perform flexible log queries using LogQL syntax and supports multiple output formats.

How to use the Simple Loki MCP Server?

Simply install and configure the server, and then you can start querying logs. You can use LogQL syntax to filter and analyze log data.

Applicable Scenarios

Suitable for developers and technical teams who need to monitor, debug, and analyze application logs in real-time.

Main Features

LogQL SupportFully supports LogQL syntax for complex log queries.
Multiple Output FormatsProvides multiple output formats such as default, raw, and JSON Lines.
Automatic Fallback MechanismAutomatically switches to HTTP API mode when the logcli is missing in the environment.

Advantages and Limitations

Advantages
Supports the powerful query capabilities of LogQL
Multiple output formats meet different needs
Automatic fallback mechanism ensures compatibility
Limitations
Requires Node.js environment support
Some advanced features depend on the logcli tool

How to Use

Install Dependencies
Ensure that Node.js v16 or higher is installed and clone the project code.
Start the Server
Run npm start to start the service.
Execute Queries
Use the query-loki command to execute log queries.

Usage Examples

Query Nginx Service LogsFilter log records of the Nginx service using LogQL syntax.
Get All Available LabelsList all label names defined in Loki.

Frequently Asked Questions

How to set the Loki address?
What if the logcli is unavailable?

Related Resources

Official Documentation
Project source code and detailed instructions.
LogQL Syntax Reference
Understand the basic usage of LogQL.
Loki Tool logcli
Detailed introduction to the logcli tool.
Installation
Copy the following command to your Client for configuration
{
  "mcpServers": {
    "simple-loki": {
      "command": "npx",
      "args": ["-y", "simple-loki-mcp"],
      "env": {
        "LOKI_ADDR": "https://loki.sup.band"
      }
    }
  }
}
Note: Your key is sensitive information, do not share it with anyone.
Featured MCP Services
G
Gitlab MCP Server
Certified
The GitLab MCP server is a project based on the Model Context Protocol that provides a comprehensive toolset for interacting with GitLab accounts, including code review, merge request management, CI/CD configuration, and other functions.
TypeScript
97
4.3 points
M
Markdownify MCP
Markdownify is a multi-functional file conversion service that supports converting multiple formats such as PDFs, images, audio, and web page content into Markdown format.
TypeScript
1.7K
5 points
N
Notion Api MCP
Certified
A Python-based MCP Server that provides advanced to-do list management and content organization functions through the Notion API, enabling seamless integration between AI models and Notion.
Python
150
4.5 points
D
Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
838
4.3 points
F
Figma Context MCP
Framelink Figma MCP Server is a server that provides access to Figma design data for AI programming tools (such as Cursor). By simplifying the Figma API response, it helps AI more accurately achieve one - click conversion from design to code.
TypeScript
6.7K
4.5 points
U
Unity
Certified
UnityMCP is a Unity editor plugin that implements the Model Context Protocol (MCP), providing seamless integration between Unity and AI assistants, including real - time state monitoring, remote command execution, and log functions.
C#
573
5 points
C
Context7
Context7 MCP is a service that provides real-time, version-specific documentation and code examples for AI programming assistants. It is directly integrated into prompts through the Model Context Protocol to solve the problem of LLMs using outdated information.
TypeScript
5.2K
4.7 points
G
Gmail MCP Server
A Gmail automatic authentication MCP server designed for Claude Desktop, supporting Gmail management through natural language interaction, including complete functions such as sending emails, label management, and batch operations.
TypeScript
289
4.5 points
AIbase
Zhiqi Future, Your AI Solution Think Tank
© 2025AIbase