mcp-victorialogs
The implementation of Model Context Protocol (MCP) server for VictoriaLogs.
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):
- Ensure Docker is running.
- 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
mcp-language
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnostics.
mcp-victoriametrics
The implementation of Model Context Protocol (MCP) server for VictoriaMetrics
kodit
👩💻 MCP server to index external repositories
mcp-difyworkflow
mcp-difyworkflow-server is an mcp server Tools application that implements the query and invocation of Dify workflows, supporting the on-demand operation of multiple custom Dify workflows.
last9
Last9 MCP Server
mcp
✨ MCP Server for Effortless Dependency Updates