# VictoriaLogs MCP Server

> Query VictoriaLogs logs and search its documentation from an MCP client.

- **URL**: https://followmcp.com/en/servers/mcp-victorialogs
- **Category**: Dev Tools
- **Origin**: Official
- **Stars**: 114
- **FMRS Score**: 56/100 (Grade C)
- **Source**: https://github.com/VictoriaMetrics/mcp-victorialogs
- **Transports**: stdio (local process), SSE, Streamable HTTP
- **Runtimes**: Go 1.26+, Prebuilt binary, Docker
- **Auth**: API key / credential required

## Overview
VictoriaLogs MCP Server connects MCP clients to the VictoriaLogs API and documentation. It supports log queries, field and stream exploration, statistics, and offline search of embedded documentation. It also supports VictoriaLogs deployments in VictoriaMetrics Cloud.

## Best for
- Engineers and operators who want to explore VictoriaLogs read-only from an MCP client.
- Users who want to search embedded VictoriaLogs documentation offline.
- Users working with VictoriaLogs deployments in VictoriaMetrics Cloud.

## Not for
- Users who need to write or modify log data; the documented instance API tools are primarily read-only.
- Users without a VictoriaLogs instance or VictoriaMetrics Cloud account and the relevant credentials.
- Users seeking a general-purpose connector for other log platforms or data sources.

## Required permissions
- Requires a VictoriaLogs instance root URL and optionally an API bearer token, or a VictoriaMetrics Cloud API key; these configuration methods are mutually exclusive.
- In Cloud mode, tool calls require a deployment_id, and the server queries the deployment using its access token. The documentation recommends creating a read-only deployment token.
- Tools can be disabled through configuration. The flags tool is unavailable in Cloud mode; rule file tools can read deployment rule contents.

## Risks
- Queries access log data in the configured instance; protect bearer tokens, Cloud API keys, and MCP service credentials.
- In Cloud mode, if no read-only deployment token is available, a read-write token may be used. Avoid granting write credentials to the MCP server.
- MCP server and AI client responses may be inaccurate or incomplete; verify results.
- The embedded documentation vector database uses additional resources; disable the documentation tool to avoid loading it.

## Client config (JSON)
```json
{"mcpServers":{"victorialogs":{"command":"/path/to/mcp-victorialogs","env":{"VL_INSTANCE_ENTRYPOINT":"<YOUR_VL_INSTANCE>","VL_INSTANCE_BEARER_TOKEN":"<YOUR_VL_BEARER_TOKEN>"}}}}
```

## Tools (20)
- `documentation`: Search the embedded VictoriaLogs documentation.
- `facets`: Get the most frequent values for each log field.
- `field_names`: List field names for a query.
- `field_values`: List field values for a query.
- `flags`: View non-default flags of the VictoriaLogs instance.
- `hits`: Count matching log entries grouped into time buckets.
- `query`: Execute LogsQL queries.
- `stats_query`: Query log statistics for a given time.
- `stats_query_range`: Query log statistics over a time range.
- `stream_field_names`: List stream fields for a query.
- `stream_field_values`: List stream field values for a query.
- `stream_ids`: List stream IDs for a query.
- `streams`: List streams for a query.
- `deployments`: List VictoriaLogs deployments.
- `access_tokens`: List access tokens for a deployment.
- `tiers`: List VictoriaLogs deployment tiers.
- `regions`: List regions.
- `cloud_providers`: List cloud providers.
- `rule_filenames`: List alerting and recording rule files for a deployment.
- `rule_file`: Read the contents of an alerting or recording rule file for a deployment.
