mcp-victorialogs

v1.8.0
io.github.VictoriaMetrics-Community/mcp-victorialogs Checked 5 hours ago Published 11 months ago

MCP Server for VictoriaLogs.

Values you need

VariableWhat it is
VL_INSTANCE_ENTRYPOINTrequired URL to VictoriaMetrics instance (it should be root URL of vmlingle or vlselect), for example http://localhost:9428 or https://play-vmlogs.victoriametrics.com
VL_INSTANCE_BEARER_TOKENrequired secret Authentication token for VictoriaMetrics API
MCP_DISABLED_TOOLSoptional Comma-separated list of tools to disable

Docker discovery passed

Requires Docker

Run in a terminal
claude mcp add mcp-victorialogs -e 'VL_INSTANCE_BEARER_TOKEN=<VL_INSTANCE_BEARER_TOKEN>' -e 'VL_INSTANCE_ENTRYPOINT=<VL_INSTANCE_ENTRYPOINT>' -- docker run -i --rm -e VL_INSTANCE_BEARER_TOKEN -e VL_INSTANCE_ENTRYPOINT ghcr.io/victoriametrics-community/mcp-victorialogs:1.8.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "mcp-victorialogs": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "VL_INSTANCE_BEARER_TOKEN",
        "-e",
        "VL_INSTANCE_ENTRYPOINT",
        "ghcr.io/victoriametrics-community/mcp-victorialogs:1.8.0"
      ],
      "command": "docker",
      "env": {
        "VL_INSTANCE_BEARER_TOKEN": "<VL_INSTANCE_BEARER_TOKEN>",
        "VL_INSTANCE_ENTRYPOINT": "<VL_INSTANCE_ENTRYPOINT>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "mcp-victorialogs": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "VL_INSTANCE_BEARER_TOKEN",
        "-e",
        "VL_INSTANCE_ENTRYPOINT",
        "ghcr.io/victoriametrics-community/mcp-victorialogs:1.8.0"
      ],
      "command": "docker",
      "env": {
        "VL_INSTANCE_BEARER_TOKEN": "<VL_INSTANCE_BEARER_TOKEN>",
        "VL_INSTANCE_ENTRYPOINT": "<VL_INSTANCE_ENTRYPOINT>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "VL_INSTANCE_BEARER_TOKEN",
      "id": "vl-instance-bearer-token",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "VL_INSTANCE_ENTRYPOINT",
      "id": "vl-instance-entrypoint",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "mcp-victorialogs": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "VL_INSTANCE_BEARER_TOKEN",
        "-e",
        "VL_INSTANCE_ENTRYPOINT",
        "ghcr.io/victoriametrics-community/mcp-victorialogs:1.8.0"
      ],
      "command": "docker",
      "env": {
        "VL_INSTANCE_BEARER_TOKEN": "${input:vl-instance-bearer-token}",
        "VL_INSTANCE_ENTRYPOINT": "${input:vl-instance-entrypoint}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.mcp-victorialogs]
command = "docker"
args = ["run", "-i", "--rm", "-e", "VL_INSTANCE_BEARER_TOKEN", "-e", "VL_INSTANCE_ENTRYPOINT", "ghcr.io/victoriametrics-community/mcp-victorialogs:1.8.0"]
env = { "VL_INSTANCE_BEARER_TOKEN" = "<VL_INSTANCE_BEARER_TOKEN>", "VL_INSTANCE_ENTRYPOINT" = "<VL_INSTANCE_ENTRYPOINT>" }

For AI agents

  1. Ask the user for: VL_INSTANCE_ENTRYPOINT, VL_INSTANCE_BEARER_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: documentation, facets, field_names, field_values, flags, hits, query, stats_query, ….
  5. If it fails, check that the required runtime is installed (Docker) and that the values above are set.

Machine-readable: install.md · manifest.json