VictoriaLogs

VictoriaLogs

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.

11 Tools

Requires Configuration
Requires Secrets
Add to Docker Desktop

Version 4.43 or later needs to be installed to add the server automatically

Use cases

About

VictoriaLogs MCP Server

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.

What is an MCP Server?

MCP Info

Image Building Info

AttributeDetails
Dockerfilehttps://github.com/VictoriaMetrics-Community/mcp-victorialogs/blob/44923aafa325af016327ab55e07c56151f2495dc/Dockerfile
Commit44923aafa325af016327ab55e07c56151f2495dc
Docker Image built byVictoriaMetrics-Community
Docker Scout Health ScoreNot available
Verify SignatureNot available
LicenceApache License 2.0

Available Tools (11)

Tools provided by this ServerShort Description
documentationSearch documentation resources
field_namesList of field names for the query
field_valuesList of field values for the query
flagsList of non-default flags (parameters)
queryQuery logs
stats_queryQuerying log stats
stats_query_rangeQuerying log stats
stream_field_namesList of stream fields
stream_field_valuesList of stream field values
stream_idsStream IDs list
streamsList of log streams

Tools Details

Tool: documentation

Search documentation resources for the given search query, returning the URIs of the resources that match the search criteria sorted by relevance. This tool can help to get context for any VictoriaLogs related question.

ParametersTypeDescription
querystringQuery for search (for example, list of keywords)
limitnumberoptionalMaximum number of results to return

This tool is read-only. It does not modify its environment.


Tool: field_names

Get field names from results of the given on the given [ ... ] time range. The response also contains the number of log results per every field name. This tool uses /select/logsql/field_names endpoint of VictoriaLogs API.

ParametersTypeDescription
querystringLogsQL expression for the query of the logs streams
startstringStart timestamp in RFC3339
endstringoptionalEnd timestamp in RFC3339. If is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs.
tenantstringoptionalName of the tenant for which the data will be displayed (format AccountID:ProjectID)

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Tool: field_values

Get unique values for the given field from results of the given on the given [ ... ] time range. The response also contains the number of log results per every field value. This tool uses /select/logsql/field_values endpoint of VictoriaLogs API.

ParametersTypeDescription
fieldstringField name of for getting field values.
querystringLogsQL expression for the query of the logs streams
startstringStart timestamp in RFC3339
endstringoptionalEnd timestamp in RFC3339. If is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs.
limitnumberoptionalThe maximum number of returned values.
tenantstringoptionalName of the tenant for which the data will be displayed (format AccountID:ProjectID)

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Tool: flags

List of non-default flags (parameters) of the VictoriaLogs instance. This tools uses /flags endpoint of VictoriaLogs API.

Tool: query

Executes LogsQL query expression to search log entries. This tool uses /select/logsql/query endpoint of VictoriaLogs API.

ParametersTypeDescription
querystringLogsQL expression for the query of the logs data
startstringStart timestamp in RFC3339 format. For example, 2023-10-01T00:00:00Z
endstringoptionalEnd timestamp in RFC3339 format. For example, 2023-10-01T00:00:00Z
limitnumberoptionalThe maximum number of log entries, which can be returned in the response
tenantstringoptionalName of the tenant for which the data will be displayed (format AccountID:ProjectID)
timeoutstringoptionalOptional query timeout. For example, timeout=5s. Query is canceled when the timeout is reached.

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Tool: stats_query

Log stats for the given query at the given timestamp (time) in the format compatible with Prometheus querying API. This tool uses /select/logsql/stats_query endpoint of VictoriaLogs API.

ParametersTypeDescription
querystringLogsQL expression that must contain stats pipe. The calculated stats is converted into metrics with labels from by(...) clause of the
tenantstringoptionalName of the tenant for which the data will be displayed (format AccountID:ProjectID)
timestringoptionalTime in RFC3339. If it's missing, then it equals to the current time.

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Tool: stats_query_range

Log stats for the given query on the given [start ... end] time range with the given step interval. The stats is returned in the format compatible with Prometheus querying API. This tool uses /select/logsql/stats_query_range endpoint of VictoriaLogs API.

ParametersTypeDescription
querystringLogsQL expression that must contain stats pipe. The calculated stats is converted into metrics with labels from by(...) clause of the
startstringStart timestamp in RFC3339
endstringoptionalEnd timestamp in RFC3339. If is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs.
stepstringoptionalStep interval for returning the stats.
tenantstringoptionalName of the tenant for which the data will be displayed (format AccountID:ProjectID)

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Tool: stream_field_names

Get log stream field names from results of the given on the given [ ... ] time range. The response also contains the number of log results per every field name.. This tool uses /select/logsql/stream_field_names endpoint of VictoriaLogs API.

ParametersTypeDescription
querystringLogsQL expression for the query of the logs streams
startstringStart timestamp in RFC3339
endstringoptionalEnd timestamp in RFC3339. If is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs.
tenantstringoptionalName of the tenant for which the data will be displayed (format AccountID:ProjectID)

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Tool: stream_field_values

Get unique values for the given field from results of the given on the given [ ... ] time range. The response also contains the number of log results per every field value. This tool uses /select/logsql/stream_field_values endpoint of VictoriaLogs API.

ParametersTypeDescription
fieldstringField name of log stream for getting field values.
querystringLogsQL expression for the query of the logs streams
startstringStart timestamp in RFC3339
endstringoptionalEnd timestamp in RFC3339. If is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs.
tenantstringoptionalName of the tenant for which the data will be displayed (format AccountID:ProjectID)

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Tool: stream_ids

Get _stream_id values for the log streams from results of the given on the given [ ... ] time range. The response also contains the number of log results per every _stream_id. This tool uses /select/logsql/stream_ids endpoint of VictoriaLogs API.

ParametersTypeDescription
querystringLogsQL expression for the query of the logs streams
startstringStart timestamp in RFC3339
endstringoptionalEnd timestamp in RFC3339. If is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs.
tenantstringoptionalName of the tenant for which the data will be displayed (format AccountID:ProjectID)

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Tool: streams

Get log streams from results of the given on the given [ ... ] time range. The response also contains the number of log results per every _stream. This tool uses /select/logsql/streams endpoint of VictoriaLogs API.

ParametersTypeDescription
querystringLogsQL expression for the query of the logs streams
startstringStart timestamp in RFC3339
endstringoptionalEnd timestamp in RFC3339. If is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs.
tenantstringoptionalName of the tenant for which the data will be displayed (format AccountID:ProjectID)

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Use this MCP Server

{
  "mcpServers": {
    "victorialogs": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "VL_INSTANCE_ENTRYPOINT",
        "-e",
        "VL_INSTANCE_HEADERS",
        "-e",
        "MCP_SERVER_MODE",
        "-e",
        "MCP_LISTEN_ADDR",
        "-e",
        "MCP_DISABLED_TOOLS",
        "-e",
        "MCP_HEARTBEAT_INTERVAL",
        "-e",
        "VL_INSTANCE_BEARER_TOKEN",
        "ghcr.io/victoriametrics-community/mcp-victorialogs"
      ],
      "env": {
        "VL_INSTANCE_ENTRYPOINT": "https://play-vmlogs.victoriametrics.com",
        "VL_INSTANCE_HEADERS": "HEADER2=HEADER_VALUE,HEADER2=HEADER_VALUE_2",
        "MCP_SERVER_MODE": "stdio",
        "MCP_LISTEN_ADDR": ":8081",
        "MCP_DISABLED_TOOLS": "hits,facets",
        "MCP_HEARTBEAT_INTERVAL": "30s",
        "VL_INSTANCE_BEARER_TOKEN": "<instance_bearer_token_for_authentication>"
      }
    }
  }
}

Why is it safer to run MCP Servers with Docker?

Related servers