Simple Loki MCP Server

AI Logs Observability MCP

Contact us to host your MCP Server in FlowHunt

FlowHunt provides an additional security layer between your internal systems and AI tools, giving you granular control over which tools are accessible from your MCP servers. MCP servers hosted in our infrastructure can be seamlessly integrated with FlowHunt's chatbot as well as popular AI platforms like ChatGPT, Claude, and various AI editors.

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.

Logo

Ready to grow your business?

Start your free trial today and see results within days.

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

  1. Ensure Node.js v16+ is installed.
  2. Edit your Windsurf configuration file (e.g., settings.json).
  3. 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"
          }
        }
      }
    }
    
  4. Save and restart Windsurf.
  5. Verify the server is running by checking for log querying capabilities.

Claude

  1. Install Node.js v16+.
  2. Use Smithery to install the server:
    npx -y @smithery/cli install @ghrud92/simple-loki-mcp --client claude
    
  3. Add/update your Claude configuration as follows:
    {
      "mcpServers": {
        "simple-loki": {
          "command": "npx",
          "args": ["-y", "simple-loki-mcp"],
          "env": {
            "LOKI_ADDR": "https://loki.sup.band"
          }
        }
      }
    }
    
  4. Save and restart Claude.
  5. Confirm Loki log querying is available.

Cursor

  1. Confirm Node.js v16+ is installed.
  2. Open Cursor’s configuration file.
  3. Insert the following under mcpServers:
    {
      "mcpServers": {
        "simple-loki": {
          "command": "npx",
          "args": ["-y", "simple-loki-mcp"],
          "env": {
            "LOKI_ADDR": "https://loki.sup.band"
          }
        }
      }
    }
    
  4. Save changes and restart Cursor.
  5. Test log querying functionality.

Cline

  1. Make sure Node.js v16+ is available.
  2. Locate and open Cline’s configuration file.
  3. Add Simple Loki MCP entry:
    {
      "mcpServers": {
        "simple-loki": {
          "command": "npx",
          "args": ["-y", "simple-loki-mcp"],
          "env": {
            "LOKI_ADDR": "https://loki.sup.band"
          }
        }
      }
    }
    
  4. Save and restart Cline.
  5. 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:

FlowHunt MCP flow

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

SectionAvailabilityDetails/Notes
OverviewDescribes Loki log querying via MCP
List of PromptsNone provided
List of ResourcesNone specified
List of Toolsquery-loki tool described
Securing API KeysMentioned 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 LICENSEYes (MIT)
Has at least one toolYes
Number of Forks3
Number of Stars2

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

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.

Learn more

Loki MCP Server
Loki MCP Server

Loki MCP Server

The Loki MCP Server connects AI assistants with Grafana Loki, allowing seamless querying and analysis of log data via the Model Context Protocol. It empowers LL...

4 min read
AI MCP +6
Loki MCP
Loki MCP

Loki MCP

Integrate FlowHunt with Loki MCP Server to enable AI-driven, secure, and scalable log querying in Grafana Loki. Automate log analysis, real-time monitoring, and...

4 min read
AI Loki MCP +5
Simple Loki MCP Integration
Simple Loki MCP Integration

Simple Loki MCP Integration

Integrate FlowHunt with Simple Loki MCP Server to empower your AI agent with seamless access to Grafana Loki log data. Automate log querying, label and metadata...

4 min read
AI Grafana Loki +4