Back to MCP Servers

VictoriaMetrics

An MCP server for interacting with VictoriaMetrics database.

databases
By yincongcyincong
88Updated 7 months agoJavaScript

Installation

npx -y VictoriaMetrics-mcp-server

Configuration

{
  "mcpServers": {
    "VictoriaMetrics-mcp-server": {
      "command": "npx",
      "args": ["-y", "VictoriaMetrics-mcp-server"]
    }
  }
}

How to use

  1. Run the installation command above (if needed)
  2. Open your Claude Code settings file (~/.claude/settings.json)
  3. Add the configuration to the mcpServers section
  4. Restart Claude Code to apply changes

MseeP.ai Security Assessment Badge

VictoriaMetrics MCP Server

smithery badge

<a href="https://glama.ai/mcp/servers/@yincongcyincong/VictoriaMetrics-mcp-server"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@yincongcyincong/VictoriaMetrics-mcp-server/badge" alt="VictoriaMetrics-mcp-server MCP server" /> </a>

MCP Server for the VictoriaMetrics.

Installing via Smithery

To install VictoriaMetrics Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @yincongcyincong/victoriametrics-mcp-server --client claude

Debug

npx @modelcontextprotocol/inspector -e VM_URL=http://127.0.0.1:8428  node src/index.js

NPX

{
    "mcpServers": {
        "victoriametrics": {
            "command": "npx",
            "args": [
                "-y",
                "@yincongcyincong/victoriametrics-mcp-server"
            ],
            "env": {
                "VM_URL": "",
                "VM_SELECT_URL": "",
                "VM_INSERT_URL": ""
            }
        }
    }
}

📊 VictoriaMetrics Tools API Documentation

1. vm_data_write

Description: Write data to the VictoriaMetrics database.

Input Parameters:

ParameterTypeDescriptionRequired
metricobjectTags of the metric
valuesnumber[]Array of metric values
timestampsnumber[]Array of timestamps in Unix seconds

2. vm_prometheus_write

Description: Import Prometheus exposition format data into VictoriaMetrics.

Input Parameters:

ParameterTypeDescriptionRequired
datastringMetrics in Prometheus exposition format

3. vm_query_range

Description: Query time series data over a specific time range.

Input Parameters:

ParameterTypeDescriptionRequired
querystringPromQL expression
startnumberStart timestamp in Unix seconds⛔️
endnumberEnd timestamp in Unix seconds⛔️
stepstringQuery resolution step width (e.g., 10s, 1m)⛔️

Only query is required; the other fields are optional.


4. vm_query

Description: Query the current value of a time series.

Input Parameters:

ParameterTypeDescriptionRequired
querystringPromQL expression to evaluate
timenumberEvaluation timestamp in Unix seconds⛔️

5. vm_labels

Description: Get all unique label names.

Input Parameters: None


6. vm_label_values

Description: Get all unique values for a specific label.

Input Parameters:

ParameterTypeDescriptionRequired
labelstringLabel name to get values for

View source on GitHub