VictoriaLogs MCP Server

VictoriaLogs MCP Server

MCP server enabling advanced read-only access and observability for VictoriaLogs

30
Stars
7
Forks
30
Watchers
0
Issues
VictoriaLogs MCP Server implements the Model Context Protocol (MCP) to provide seamless, read-only integration with VictoriaLogs instances. It enables comprehensive access to VictoriaLogs APIs, allowing for log querying, exploration, and advanced observability tasks. The server includes embedded and searchable documentation and supports automation and interaction capabilities via standardized MCP tools. Designed to combine with other MCP servers, it enhances engineering workflows for log analysis and troubleshooting.

Key Features

Model Context Protocol-compliant server implementation
Read-only integration with VictoriaLogs via HTTP API
Log querying and data exploration capabilities
Access to instance parameters and statistics
Lists available streams, fields, and field values
Embeds up-to-date searchable documentation
Works with both single-node and cluster VictoriaLogs setups
Supports combination with other MCP servers
Enables powerful prompts and workflow integration through MCP clients
Publicly available instance for instant trial

Use Cases

Querying and exploring logs for observability tasks
Retrieving logs and metadata for debugging
Automating log analysis and monitoring workflows
Integrating VictoriaLogs with AI-driven analysis tools via MCP
Searching product documentation offline within the MCP server
Combining multiple MCP servers for enhanced troubleshooting
Providing internal log observability interfaces to engineering teams
Centralizing access to log streams and metrics
Supporting incident investigation processes
Testing Model Context Protocol implementations on VictoriaLogs playground

README

VictoriaLogs MCP Server

Latest Release Trust Score smithery badge License Slack X Reddit

The implementation of Model Context Protocol (MCP) server for VictoriaLogs.

This provides access to your VictoriaLogs instance and seamless integration with VictoriaLogs APIs and documentation. It can give you a comprehensive interface for logs, observability, and debugging tasks related to your VictoriaLogs instances, enable advanced automation and interaction capabilities for engineers and tools.

Features

This MCP server allows you to use almost all read-only APIs of VictoriaLogs, i.e. all functions available in Web UI:

  • Querying logs and exploring logs data
  • Showing parameters of your VictoriaLogs instance
  • Listing available streams, fields, field values
  • Query statistics for the logs as metrics

In addition, the MCP server contains embedded up-to-date documentation and is able to search it without online access.

More details about the exact available tools and prompts can be found in the Usage section.

You can combine functionality of tools, docs search in your prompts and invent great usage scenarios for your VictoriaLogs instance. And please note the fact that the quality of the MCP Server and its responses depends very much on the capabilities of your client and the quality of the model you are using.

You can also combine the MCP server with other observability or doc search related MCP Servers and get even more powerful results.

Try without installation

There is a publicly available instance of the VictoriaMetrics MCP Server that you can use to test the features without installing it:

https://play-vmlogs-mcp.victoriametrics.com/mcp

Attention! This URL is not supposed to be opened in a browser, it is intended to be used in MCP clients.

It's available in Streamable HTTP Mode mode and configured to work with Public VictoriaLogs Playground.

Here is example of configuration for Claude Desktop:

image

Requirements

Installation

Go

bash
go install github.com/VictoriaMetrics-Community/mcp-victorialogs/cmd/mcp-victorialogs@latest

Binaries

Just download the latest release from Releases page and put it to your PATH.

Example for Linux x86_64 (note that other architectures and platforms are also available):

bash
latest=$(curl -s https://api.github.com/repos/VictoriaMetrics-Community/mcp-victorialogs/releases/latest | grep 'tag_name' | cut -d\" -f4)
wget https://github.com/VictoriaMetrics-Community/mcp-victorialogs/releases/download/$latest/mcp-victorialogs_Linux_x86_64.tar.gz
tar axvf mcp-victorialogs_Linux_x86_64.tar.gz

Docker

You can run VictoriaLogs MCP Server using Docker.

This is the easiest way to get started without needing to install Go or build from source.

bash
docker run -d --name mcp-victorialogs \
  -e VL_INSTANCE_ENTRYPOINT=https://play-vmlogs.victoriametrics.com \
  -e MCP_SERVER_MODE=http \
  -e MCP_LISTEN_ADDR=:8081 \
  -p 8081:8081 \
  ghcr.io/victoriametrics-community/mcp-victorialogs

You should replace environment variables with your own parameters.

Note that the MCP_SERVER_MODE=http flag is used to enable Streamable HTTP mode. More details about server modes can be found in the Configuration section.

See available docker images in github registry.

Also see Using Docker instead of binary section for more details about using Docker with MCP server with clients in stdio mode.

Source Code

For building binary from source code you can use the following approach:

  • Clone repo:

    bash
    git clone https://github.com/VictoriaMetrics-Community/mcp-victorialogs.git
    cd mcp-victorialogs
    
  • Build binary from cloned source code:

    bash
    make build
    # after that you can find binary mcp-victorialogs and copy this file to your PATH or run inplace
    
  • Build image from cloned source code:

    bash
    docker build -t mcp-victorialogs .
    # after that you can use docker image mcp-victorialogs for running or pushing
    

Smithery

To install VictoriaLogs MCP Server for your client automatically via Smithery, yo can use the following commands:

bash
# Get the list of supported MCP clients
npx -y @smithery/cli list clients
#Available clients:
#  claude
#  cline
#  windsurf
#  roocode
#  witsy
#  enconvo
#  cursor
#  vscode
#  vscode-insiders
#  boltai
#  amazon-bedrock

# Install VictoriaLogs MCP server for your client
npx -y @smithery/cli install @VictoriaMetrics-Community/mcp-victorialogs --client <YOUR-CLIENT-NAME>
# and follow the instructions

Configuration

MCP Server for VictoriaLogs is configured via environment variables:

Variable Description Required Default Allowed values
VL_INSTANCE_ENTRYPOINT URL to VictoriaLogs instance Yes - -
VL_INSTANCE_BEARER_TOKEN Authentication token for VictoriaLogs API No - -
VL_INSTANCE_HEADERS Custom HTTP headers to send with requests (comma-separated key=value pairs) No - -
MCP_SERVER_MODE Server operation mode. See Modes for details. No stdio stdio, sse, http
MCP_LISTEN_ADDR Address for SSE or HTTP server to listen on No localhost:8081 -
MCP_DISABLED_TOOLS Comma-separated list of tools to disable No - -
MCP_HEARTBEAT_INTERVAL Defines the heartbeat interval for the streamable-http protocol. It means the MCP server will send a heartbeat to the client through the GET connection, to keep the connection alive from being closed by the network infrastructure (e.g. gateways) No 30s -

Modes

MCP Server supports the following modes of operation (transports):

  • stdio - Standard input/output mode, where the server reads commands from standard input and writes responses to standard output. This is the default mode and is suitable for local servers.
  • sse - Server-Sent Events. Server will expose the /sse and /message endpoints for SSE connections.
  • http - Streamable HTTP. Server will expose the /mcp endpoint for HTTP connections.

More info about traqnsports you can find in MCP docs:

Сonfiguration examples

bash
# For a public playground
export VL_INSTANCE_ENTRYPOINT="https://play-vmlogs.victoriametrics.com"

# Custom headers for authentication (e.g., behind a reverse proxy)
# Expected syntax is key=value separated by commas
export VL_INSTANCE_HEADERS="<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"

# Server mode
export MCP_SERVER_MODE="sse"
export MCP_SSE_ADDR="0.0.0.0:8081"
export MCP_DISABLED_TOOLS="hits,facets"

Endpoints

In SSE and HTTP modes the MCP server provides the following endpoints:

Endpoint Description
/sse + /message Endpoints for messages in SSE mode (for MCP clients that support SSE)
/mcp HTTP endpoint for streaming messages in HTTP mode (for MCP clients that support Streamable HTTP)
/metrics Metrics in Prometheus format for monitoring the MCP server
/health/liveness Liveness check endpoint to ensure the server is running
/health/readiness Readiness check endpoint to ensure the server is ready to accept requests

Setup in clients

Cursor

Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server and paste the following configuration into your Cursor ~/.cursor/mcp.json file:

json
{
  "mcpServers": {
    "victorialogs": {
      "command": "/path/to/mcp-victorialogs",
      "env": {
        "VL_INSTANCE_ENTRYPOINT": "<YOUR_VL_INSTANCE>",
        "VL_INSTANCE_BEARER_TOKEN": "<YOUR_VL_BEARER_TOKEN>",
        "VL_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
      }
    }
  }
}

See Cursor MCP docs for more info.

Claude Desktop

Add this to your Claude Desktop claude_desktop_config.json file (you can find it if open Settings -> Developer -> Edit config):

json
{
  "mcpServers": {
    "victorialogs": {
      "command": "/path/to/mcp-victorialogs",
      "env": {
        "VL_INSTANCE_ENTRYPOINT": "<YOUR_VL_INSTANCE>",
        "VL_INSTANCE_BEARER_TOKEN": "<YOUR_VL_BEARER_TOKEN>",
        "VL_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
      }
    }
  }
}

See Claude Desktop MCP docs for more info.

Claude Code

Run the command:

sh
claude mcp add victorialogs -- /path/to/mcp-victorialogs \
  -e VL_INSTANCE_ENTRYPOINT=<YOUR_VL_INSTANCE> \
  -e VL_INSTANCE_BEARER_TOKEN=<YOUR_VL_BEARER_TOKEN> \
  -e VL_INSTANCE_HEADERS="<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"

See Claude Code MCP docs for more info.

Visual Studio Code

Add this to your VS Code MCP config file:

json
{
  "servers": {
    "victorialogs": {
      "type": "stdio",
      "command": "/path/to/mcp-victorialogs",
      "env": {
        "VL_INSTANCE_ENTRYPOINT": "<YOUR_VL_INSTANCE>",
        "VL_INSTANCE_BEARER_TOKEN": "<YOUR_VL_BEARER_TOKEN>",
        "VL_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
      }
    }
  }
}

See VS Code MCP docs for more info.

Zed

Add the following to your Zed config file:

json
  "context_servers": {
    "victorialogs": {
      "command": {
        "path": "/path/to/mcp-victorialogs",
        "args": [],
        "env": {
                  "VL_INSTANCE_ENTRYPOINT": "<YOUR_VL_INSTANCE>",
        "VL_INSTANCE_BEARER_TOKEN": "<YOUR_VL_BEARER_TOKEN>",
        "VL_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
      }
      },
      "settings": {}
    }
  }
}

See Zed MCP docs for more info.

JetBrains IDEs

  • Open Settings -> Tools -> AI Assistant -> Model Context Protocol (MCP).
  • Click Add (+)
  • Select As JSON
  • Put the following to the input field:
json
{
  "mcpServers": {
    "victorialogs": {
      "command": "/path/to/mcp-victorialogs",
      "env": {
        "VL_INSTANCE_ENTRYPOINT": "<YOUR_VL_INSTANCE>",
        "VL_INSTANCE_BEARER_TOKEN": "<YOUR_VL_BEARER_TOKEN>",
        "VL_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
      }
    }
  }
}

Windsurf

Add the following to your Windsurf MCP config file.

json
{
  "mcpServers": {
    "victorialogs": {
      "command": "/path/to/mcp-victorialogs",
      "env": {
        "VL_INSTANCE_ENTRYPOINT": "<YOUR_VL_INSTANCE>",
        "VL_INSTANCE_BEARER_TOKEN": "<YOUR_VL_BEARER_TOKEN>",
        "VL_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
      }
    }
  }
}

See Windsurf MCP docs for more info.

Using Docker instead of binary

You can run VictoriaLogs MCP Server using Docker instead of local binary.

You should replace run command in configuration examples above in the following way:

{
  "mcpServers": {
    "victorialogs": {
      "command": "docker",
        "args": [
          "run",
          "-i", "--rm",
          "-e", "VL_INSTANCE_ENTRYPOINT",
          "-e", "VL_INSTANCE_BEARER_TOKEN",
          "-e", "VL_INSTANCE_HEADERS",
          "ghcr.io/victoriametrics-community/mcp-victorialogs",
        ],
      "env": {
        "VL_INSTANCE_ENTRYPOINT": "<YOUR_VL_INSTANCE>",
        "VL_INSTANCE_BEARER_TOKEN": "<YOUR_VL_BEARER_TOKEN>",
        "VL_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
      }
    }
  }
}

Usage

After installing and configuring the MCP server, you can start using it with your favorite MCP client.

You can start dialog with AI assistant from the phrase:

Use MCP VictoriaLogs in the following answers

But it's not required, you can just start asking questions and the assistant will automatically use the tools and documentation to provide you with the best answers.

Toolset

MCP VictoriaLogs provides numerous tools for interacting with your VictoriaLogs instance.

Here's a list of available tools:

Tool Description
documentation Search in embedded VictoriaLogs documentation
facets Most frequent values per each log field
field_names List of field names for the query
field_values List of field values for the query
flags View non-default flags of the VictoriaLogs instance
hits The number of matching log entries grouped by buckets
query Execute LogsQL queries
stats_query Querying log stats for the given time
stats_query_range Querying log stats on the given time range
stream_field_names List of stream fields for the query
stream_field_values List of stream field values for the query
stream_ids List of stream IDs for the query
streams List of streams for the query

Prompts

The server includes pre-defined prompts for common tasks.

These are just examples at the moment, the prompt library will be added to in the future:

Prompt Description
documentation Search VictoriaLogs documentation for specific topics

Roadmap

  • Support "Explain query" tool
  • Support optional integration with VictoriaMetrics Cloud
  • Add some extra knowledge to server in addition to current documentation tool:
  • Implement multitenant version of MCP (that will support several deployments)
  • Add flags/configs validation tool
  • Enabling/disabling tools via configuration

Disclaimer

AI services and agents along with MCP servers like this cannot guarantee the accuracy, completeness and reliability of results. You should double check the results obtained with AI.

The quality of the MCP Server and its responses depends very much on the capabilities of your client and the quality of the model you are using.

Contributing

Contributions to the MCP VictoriaLogs project are welcome!

Please feel free to submit issues, feature requests, or pull requests.

Star History

Star History Chart

Repository Owner

Repository Details

Language Go
Default Branch main
Size 5,281 KB
Contributors 6
License Apache License 2.0
MCP Verified Nov 12, 2025

Programming Languages

Go
94.61%
Shell
2.2%
Smarty
2.01%
Dockerfile
0.78%
Makefile
0.4%

Tags

Topics

ai logging logs mcp mcp-server observability victorialogs victoriametrics

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • VictoriaMetrics MCP Server

    VictoriaMetrics MCP Server

    Model Context Protocol server enabling advanced monitoring and observability for VictoriaMetrics.

    VictoriaMetrics MCP Server implements the Model Context Protocol (MCP) to provide seamless integration with VictoriaMetrics, allowing advanced monitoring, data exploration, and observability. It offers access to almost all read-only APIs, as well as embedded documentation for offline usage. The server facilitates comprehensive metric querying, cardinality analysis, alert and rule testing, and automation capabilities for engineers and tools.

    • 87
    • MCP
    • VictoriaMetrics-Community/mcp-victoriametrics
  • VictoriaMetrics MCP Server

    VictoriaMetrics MCP Server

    Model Context Protocol server interface for VictoriaMetrics time-series database.

    VictoriaMetrics MCP Server provides a Model Context Protocol (MCP) compliant interface to interact with VictoriaMetrics. It enables structured data writing, Prometheus format imports, and advanced querying capabilities within the VictoriaMetrics platform. The tool supports installation via Smithery and CLI, facilitating flexible integration. It offers endpoints for writing metrics, querying time series, retrieving labels, and label values.

    • 7
    • MCP
    • yincongcyincong/VictoriaMetrics-mcp-server
  • Last9 MCP Server

    Last9 MCP Server

    Enables AI agents to access real-time production observability data for automated code fixes.

    Last9 MCP Server is an implementation of the Model Context Protocol (MCP) designed to provide seamless integration between AI agents and production observability data. It allows tools and agents to fetch live logs, metrics, traces, events, and alerts from Last9 systems, supporting a range of development environments and IDEs. This enables faster debugging, automated code fixes, and insightful context directly within local development workflows.

    • 46
    • MCP
    • last9/last9-mcp-server
  • OpsLevel MCP Server

    OpsLevel MCP Server

    Read-only MCP server for integrating OpsLevel data with AI tools.

    OpsLevel MCP Server implements the Model Context Protocol to provide AI tools with a secure way to access and interact with OpsLevel account data. It supports read-only operations for a wide range of OpsLevel resources such as actions, campaigns, checks, components, documentation, domains, and more. The tool is compatible with popular environments including Claude Desktop and VS Code, enabling easy integration via configuration and API tokens. Installation options include Homebrew, Docker, and standalone binaries.

    • 8
    • MCP
    • OpsLevel/opslevel-mcp
  • metoro-mcp-server

    metoro-mcp-server

    Bridge Kubernetes observability data to LLMs via the Model Context Protocol.

    Metoro MCP Server is an implementation of the Model Context Protocol (MCP) that enables seamless integration between Kubernetes observability data and large language models. It connects Metoro’s eBPF-based telemetry APIs to LLM applications such as the Claude Desktop App, allowing AI systems to query and analyze Kubernetes clusters. This solution supports both authenticated and demo modes for accessing real-time cluster insights.

    • 45
    • MCP
    • metoro-io/metoro-mcp-server
  • Edge Delta MCP Server

    Edge Delta MCP Server

    Seamlessly integrate Edge Delta APIs into the Model Context Protocol ecosystem.

    Edge Delta MCP Server is a Model Context Protocol server enabling advanced integration with Edge Delta APIs. It allows developers and tools to extract, analyze, and automate observability data from Edge Delta through standardized MCP interfaces. The server supports AI-powered applications and automations, and can be deployed via Docker for straightforward operation. The Go API is available for experimental programmatic access.

    • 5
    • MCP
    • edgedelta/edgedelta-mcp-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results