Simple Loki MCP Server
Seamlessly connect your AI agents to Grafana Loki for advanced log analysis and monitoring with the Simple Loki MCP Server.

What does “Simple Loki” MCP Server do?
The Simple Loki MCP Server is a Model Context Protocol (MCP) interface that enables AI assistants to directly query and analyze logs from a Grafana Loki instance. By using tools like logcli
or falling back to the Loki HTTP API, this server allows seamless integration of log data into development workflows. It supports full LogQL querying, label value retrieval, and provides formatted results in several output options (default, raw, JSON lines). With its flexible authentication and configuration via environment variables or config files, Simple Loki MCP Server is ideal for enhancing observability, troubleshooting, and monitoring tasks within AI-powered applications or automation flows.
List of Prompts
No explicit prompt templates are mentioned in the repository or documentation.
List of Resources
No explicit MCP resources are listed in the repository or documentation.
List of Tools
- query-loki
Query logs from Loki with filtering options. This tool allows users to submit LogQL queries and retrieve log entries, supporting various output formats and label metadata access.
Use Cases of this MCP Server
- Log Analysis and Troubleshooting
Developers can use Simple Loki MCP Server to analyze and filter log data from Grafana Loki, making it easier to debug applications and investigate issues. - Automated Incident Response
AI assistants can automatically fetch and summarize relevant logs during incident workflows, improving response time and accuracy. - Observability Dashboards
Integrate log querying capabilities into custom dashboards, enabling real-time log insights directly within development or monitoring tools. - Security Monitoring
Use AI agents to monitor logs for suspicious patterns or activities, triggering alerts or automated actions when anomalies are detected. - Performance Optimization
Analyze historical log data to identify bottlenecks, errors, or trends that impact system performance, assisting in proactive optimization.
How to set it up
Windsurf
- Ensure Node.js v16+ is installed.
- Edit your Windsurf configuration file (e.g.,
settings.json
). - Add the Simple Loki MCP Server to the
mcpServers
section:{ "mcpServers": { "simple-loki": { "command": "npx", "args": ["-y", "simple-loki-mcp"], "env": { "LOKI_ADDR": "https://loki.sup.band" } } } }
- Save and restart Windsurf.
- Verify the server is running by checking for log querying capabilities.
Claude
- Install Node.js v16+.
- Use Smithery to install the server:
npx -y @smithery/cli install @ghrud92/simple-loki-mcp --client claude
- Add/update your Claude configuration as follows:
{ "mcpServers": { "simple-loki": { "command": "npx", "args": ["-y", "simple-loki-mcp"], "env": { "LOKI_ADDR": "https://loki.sup.band" } } } }
- Save and restart Claude.
- Confirm Loki log querying is available.
Cursor
- Confirm Node.js v16+ is installed.
- Open Cursor’s configuration file.
- Insert the following under
mcpServers
:{ "mcpServers": { "simple-loki": { "command": "npx", "args": ["-y", "simple-loki-mcp"], "env": { "LOKI_ADDR": "https://loki.sup.band" } } } }
- Save changes and restart Cursor.
- Test log querying functionality.
Cline
- Make sure Node.js v16+ is available.
- Locate and open Cline’s configuration file.
- Add Simple Loki MCP entry:
{ "mcpServers": { "simple-loki": { "command": "npx", "args": ["-y", "simple-loki-mcp"], "env": { "LOKI_ADDR": "https://loki.sup.band" } } } }
- Save and restart Cline.
- Check for successful log query integration.
Securing API Keys
Store sensitive credentials (like LOKI_ADDR or tokens) in environment variables for security. Example:
{
"mcpServers": {
"simple-loki": {
"command": "npx",
"args": ["-y", "simple-loki-mcp"],
"env": {
"LOKI_ADDR": "${LOKI_ADDR_ENV}",
"LOKI_TOKEN": "${LOKI_TOKEN_ENV}"
},
"inputs": {
"query": "${YOUR_LOGQL_QUERY}"
}
}
}
}
How to use this MCP inside flows
Using MCP in FlowHunt
To integrate MCP servers into your FlowHunt workflow, start by adding the MCP component to your flow and connecting it to your AI agent:

Click on the MCP component to open the configuration panel. In the system MCP configuration section, insert your MCP server details using this JSON format:
{
"simple-loki": {
"transport": "streamable_http",
"url": "https://yourmcpserver.example/pathtothemcp/url"
}
}
Once configured, the AI agent is now able to use this MCP as a tool with access to all its functions and capabilities. Remember to change “simple-loki” to whatever the actual name of your MCP server is and replace the URL with your own MCP server URL.
Overview
Section | Availability | Details/Notes |
---|---|---|
Overview | ✅ | Describes Loki log querying via MCP |
List of Prompts | ⛔ | None provided |
List of Resources | ⛔ | None specified |
List of Tools | ✅ | query-loki tool described |
Securing API Keys | ✅ | Mentioned in setup instructions |
Sampling Support (less important in evaluation) | ⛔ | Not mentioned |
Based on the above tables, the Simple Loki MCP Server is focused and functional but lacks breadth in prompt and resource support. It is easy to set up and has clear documentation for integration and API key security. Overall, it is practical for log querying but limited in advanced MCP capabilities.
MCP Score
Has a LICENSE | Yes (MIT) |
---|---|
Has at least one tool | Yes |
Number of Forks | 3 |
Number of Stars | 2 |
Rating:
I would rate this MCP server 6/10. It is solid for its purpose and easy to integrate, but lacks multi-tool variety, prompt templates, and explicit resource definitions which are essential for broader MCP use. It does not mention Roots or Sampling support.
Frequently asked questions
- What does the Simple Loki MCP Server do?
It provides an MCP interface for querying and analyzing logs from Grafana Loki within AI-powered workflows, supporting LogQL queries, label retrieval, and multiple output formats.
- What are the main use cases?
Log analysis, automated incident response, observability dashboards, security monitoring, and performance optimization for systems using Grafana Loki.
- How do I secure my credentials?
Store sensitive information such as LOKI_ADDR or authentication tokens in environment variables. Example: 'env': { 'LOKI_ADDR': '${LOKI_ADDR_ENV}', 'LOKI_TOKEN': '${LOKI_TOKEN_ENV}' }.
- Does it support prompt templates or resources?
No explicit prompt templates or resource definitions are included; its main focus is on log querying via the 'query-loki' tool.
- How do I integrate it with FlowHunt?
Add the MCP component to your flow, configure the MCP server in the system MCP configuration with the appropriate transport and URL, then connect it to your AI agent for log querying features.
Integrate Simple Loki MCP Server with FlowHunt
Supercharge your AI workflows by enabling direct log analysis and monitoring through the Simple Loki MCP Server. Effortless integration with FlowHunt and popular AI platforms.