Get the FREE Ultimate OpenClaw Setup Guide →

mcp-victorialogs

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

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio victoriametrics-mcp-victorialogs docker run -d --name mcp-victorialogs -e VL_INSTANCE_ENTRYPOINT= -e VL_INSTANCE_BEARER_TOKEN= -e VL_INSTANCE_HEADERS= -e MCP_SERVER_MODE= -e MCP_LISTEN_ADDR= -p 8081:8081 ghcr.io/victoriametrics-community/mcp-victorialogs \
  --env MCP_LISTEN_ADDR="Address to listen on (default :8081)" \
  --env MCP_SERVER_MODE="Server operation mode (e.g., http or streamable/http, see documentation)" \
  --env VL_INSTANCE_HEADERS="Custom HTTP headers to send with requests (optional, comma-separated key=value pairs)" \
  --env VL_INSTANCE_ENTRYPOINT="URL to VictoriaLogs instance or placeholder" \
  --env VL_INSTANCE_BEARER_TOKEN="Authentication token (optional)"

How to use

This MCP server exposes VictoriaLogs read-only capabilities via the Model Context Protocol. It gives you access to logs querying, exploring streams and fields, viewing parameters of your VictoriaLogs instance, and retrieving log-related statistics as metrics. It also ships with embedded up-to-date documentation and can perform self-documentation searches without internet access. You can use it standalone or combine it with other MCP servers to build powerful observability automation workflows. To interact with it, point your MCP client to the server URL and use the available tools and prompts described in the Usage section of the repository documentation.

How to install

Prerequisites:

  • Docker installed and running on the host (recommended) or a compatible container runtime.
  • Access to a VictoriaLogs instance (VL_INSTANCE_ENTRYPOINT) you want to connect to.

Install via Docker (quickstart):

  1. Ensure Docker is running.
  2. Run the MCP server container (adjust environment values as needed):
docker run -d --name mcp-victorialogs 
  -e VL_INSTANCE_ENTRYPOINT=https://your-victorialogs.example.com 
  -e MCP_SERVER_MODE=http 
  -e MCP_LISTEN_ADDR=:8081 
  -p 8081:8081 
  ghcr.io/victoriametrics-community/mcp-victorialogs

Optional: Build from source (Go) and run locally (if you prefer building):

go install github.com/VictoriaMetrics-Community/mcp-victorialogs/cmd/mcp-victorialogs@latest
./mcp-victorialogs - VL_INSTANCE_ENTRYPOINT=https://your-victorialogs.example.com

If you want to run without Docker, you can also build and run the binary directly after cloning the repo and following the Build/Install steps in the repository.

Additional notes

Tips and notes:

  • Make sure VL_INSTANCE_ENTRYPOINT points to a reachable VictoriaLogs instance. Without it, the MCP server cannot query logs.
  • If your VictoriaLogs instance requires authentication, supply VL_INSTANCE_BEARER_TOKEN or VL_INSTANCE_HEADERS as needed.
  • MCP_SERVER_MODE should be set to http or streamable/http according to whether you want standard or streamable HTTP mode.
  • The server exposes 8081 by default; adjust MCP_LISTEN_ADDR and port mappings if you need a different port.
  • When using Smithery or client libraries, you can install the MCP server for your client with the provided commands, then follow prompts to complete configuration.
  • For production deployments, consider using Docker in swarm/kubernetes and securely managing environment variables and tokens.

Related MCP Servers

Sponsor this space

Reach thousands of developers