VI

VictoriaLogs API Integration and Debugging for MCP Server

Integrate VictoriaLogs APIs with your MCP server to manage logs, troubleshoot issues, and streamline debugging workflows.

Quick Install
npx -y @VictoriaMetrics-Community/mcp-victorialogs

Overview

VictoriaLogs MCP Server implements the Model Context Protocol (MCP) adapter for VictoriaLogs, exposing read-only VictoriaLogs functionality to MCP-enabled clients and LLM workflows. It surfs your VictoriaLogs instance (single-node or cluster), wraps common log/query operations and embedded documentation, and makes them available as “tools” for models and developer tools that speak MCP.

This is useful when you want to:

  • Give LLMs or automation systems controlled programmatic access to logs without exposing credentials directly to the model.
  • Combine log queries, metadata inspection, and embedded docs search into reproducible debugging/playbook flows.
  • Integrate VictoriaLogs into observability-oriented assistant workflows, incident runbooks, or automated root-cause pipelines.

Features

  • Read-only access to VictoriaLogs HTTP APIs (the same operations available in the VictoriaLogs Web UI).
  • Query logs and explore streams, fields and field values.
  • Fetch instance parameters and query statistics for log-based metrics.
  • Embedded, offline-searchable VictoriaLogs documentation to assist queries without external network access.
  • Streamable HTTP mode for MCP clients that support streaming; stdio mode for local CLI integrations.
  • Designed to be combined with other MCP servers (doc-search, metrics, traces) for richer observability workflows.

Installation / Configuration

Prerequisites:

  • A running VictoriaLogs instance (single-node or cluster).
  • Go 1.24+ if building from source.

Go install:

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

Download a prebuilt binary (example Linux x86_64):

latest=$(curl -s https://api.github.com/repos/VictoriaMetrics-Community/mcp-victorialogs/releases/latest | jq -r .tag_name)
wget "https://github.com/VictoriaMetrics-Community/mcp-victorialogs/releases/download/${latest}/mcp-victorialogs_Linux_x86_64.tar.gz"
tar xvf mcp-victorialogs_Linux_x86_64.tar.gz
./mcp-victorialogs --help

Docker (recommended quick start):

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

Build from source:

git clone https://github.com/VictoriaMetrics-Community/mcp-victorialogs.git
cd mcp-victorialogs
make build
# result: ./bin/mcp-victorialogs (or see build output)

Common environment variables

VariablePurposeExample
VL_INSTANCE_ENTRYPOINTBase URL of your VictoriaLogs instancehttps://play-vmlogs.victoriametrics.com
MCP_SERVER_MODEServer mode: “http” (streamable HTTP) or “stdio”http
MCP_LISTEN_ADDRAddress to listen on for MCP clients (HTTP mode):8081
LOG_LEVELDiagnostic log level (info / debug)debug

Try without installing:

  • Public test MCP server: https://play-vmlogs-mcp.victoriametrics.com/mcp
    • Note: This endpoint is intended for MCP clients (Streamable HTTP), not a human web browser.

Available Tools / Resources

The MCP server exposes tools that map to VictoriaLogs read-only APIs and documentation:

  • Query logs (range and instant queries, filtering by stream and labels)
  • Explore streams (list streams and metadata)
  • List fields and field values for streams
  • Instance parameters (configuration and status)
  • Query statistics and aggregation-as-metrics endpoints
  • Embedded documentation search (offline copy of VictoriaLogs docs)
  • Combining multiple tools into a single MCP prompt (e.g., run a query + fetch docs