VictoriaLogs MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
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
- UI with setup instructions and tools inspection on the root endpoint (only in Streamable HTTP mode)
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:
**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:
Requirements
- VictoriaLogs instance: (single-node or cluster)
- Go 1.26 or higher (if you want to build from source)
Installation
Go
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):
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.
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:
- Build binary from cloned source code:
- Build image from cloned source code:
Helm
Check out VictoriaLogs MCP Server Helm chart documentation for more details about installation using Helm.
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 | - | - |