LabStore
← All labs

VictoriaLogs

by docker ✓ verified ✓ Packaged by Docker

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.

MCP server installable needs setup network: on runtime: sysbox

Monitoring & Uptime MCP Servers

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

Attribute Details
Docker Image ghcr.io/victoriametrics-community/mcp-victorialogs
Author VictoriaMetrics-Community
Repository https://github.com/VictoriaMetrics-Community/mcp-victorialogs

Image Building Info

Attribute Details
Dockerfile https://github.com/VictoriaMetrics-Community/mcp-victorialogs/blob/44923aafa325af016327ab55e07c56151f2495dc/Dockerfile
Commit 44923aafa325af016327ab55e07c56151f2495dc
Docker Image built by VictoriaMetrics-Community
Docker Scout Health Score Not available
Verify Signature Not available
Licence Apache License 2.0

Available Tools (11)

Tools provided by this Server Short Description
documentation Search documentation resources
field_names List of field names for the query
field_values List of field values for the query
flags List of non-default flags (parameters)
query Query logs
stats_query Querying log stats
stats_query_range Querying log stats
stream_field_names List of stream fields
stream_field_values List of stream field values
stream_ids Stream IDs list
streams List 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.

Parameters Type Description
query string Query for search (for example, list of keywords)
limit number optional Maximum 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 <query> on the given [<start> ... <end>] 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.

Parameters Type Description
query string LogsQL expression for the query of the logs streams
start string Start timestamp in RFC3339
end string optional End timestamp in RFC3339. If <end> is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs.
tenant string optional Name 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 <fieldName> field from results of the given <query> on the given [<start> ... <end>] 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.

Parameters Type Description
field string Field name of for getting field values.
query string LogsQL expression for the query of the logs streams
start string Start timestamp in RFC3339
end string optional End timestamp in RFC3339. If <end> is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs.
limit number optional The maximum number of returned values.
tenant string optional Name 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.

Parameters Type Description
query string LogsQL expression for the query of the logs data
start string Start timestamp in RFC3339 format. For example, 2023-10-01T00:00:00Z
end string optional End timestamp in RFC3339 format. For example, 2023-10-01T00:00:00Z
limit number optional The maximum number of log entries, which can be returned in the response
tenant string optional Name of the tenant for which the data will be displayed (format AccountID:ProjectID)
timeout string optional Optional 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.

Parameters Type Description
query string LogsQL expression that must contain stats pipe. The calculated stats is converted into metrics with labels from by(...) clause of the
tenant string optional Name of the tenant for which the data will be displayed (format AccountID:ProjectID)
time string optional Time 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.

Parameters Type Description
query string LogsQL expression that must contain stats pipe. The calculated stats is converted into metrics with labels from by(...) clause of the
start string Start timestamp in RFC3339
end string optional End timestamp in RFC3339. If <end> is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs.
step string optional Step interval for returning the stats.
tenant string optional Name 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 <query> on the given [<start> ... <end>] 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.

Parameters Type Description
query string LogsQL expression for the query of the logs streams
start string Start timestamp in RFC3339
end string optional End timestamp in RFC3339. If <end> is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs.
tenant string optional Name 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 <fieldName> field from results of the given <query> on the given [<start> ... <end>] 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.

Parameters Type Description
field string Field name of log stream for getting field values.
query string LogsQL expression for the query of the logs streams
start string Start timestamp in RFC3339
end string optional End timestamp in RFC3339. If <end> is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs.
tenant string optional Name 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 <query> on the given [<start> ... <end>] 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.

Parameters Type Description
query string LogsQL expression for the query of the logs streams
start string Start timestamp in RFC3339
end string optional End timestamp in RFC3339. If <end> is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs.
tenant string optional Name 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 <query> on the given [<start> ... <end>] time range. The response also contains the number of log results per every _stream. This tool uses /select/logsql/streams endpoint of VictoriaLogs API.

Parameters Type Description
query string LogsQL expression for the query of the logs streams
start string Start timestamp in RFC3339
end string optional End timestamp in RFC3339. If <end> is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs.
tenant string optional Name 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?