VictoriaLogs API Integration and Debugging for MCP Server
Integrate VictoriaLogs APIs with your MCP server to manage logs, troubleshoot issues, and streamline debugging workflows.
npx -y @VictoriaMetrics-Community/mcp-victorialogsOverview
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:
Download a prebuilt binary (example Linux x86_64):
latest=
Docker (recommended quick start):
Build from source:
# result: ./bin/mcp-victorialogs (or see build output)
Common environment variables
| Variable | Purpose | Example |
|---|---|---|
| VL_INSTANCE_ENTRYPOINT | Base URL of your VictoriaLogs instance | https://play-vmlogs.victoriametrics.com |
| MCP_SERVER_MODE | Server mode: “http” (streamable HTTP) or “stdio” | http |
| MCP_LISTEN_ADDR | Address to listen on for MCP clients (HTTP mode) | :8081 |
| LOG_LEVEL | Diagnostic 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