VictoriaMetrics MCP Server

by yincongcyincong

8 stars
375 downloads
Not rated
GitHub

About

A server for writing and querying time series data using the VictoriaMetrics API.

Details

Author
yincongcyincong
GitHub stars
8
Downloads
375
Categories
Other, Database

- Write time-series data to VictoriaMetrics via the vm_data_write tool.
- Import Prometheus exposition format data with vm_prometheus_write.
- Query metric values over a time range using PromQL (vm_query_range).
- Get current metric values with vm_query.
- Retrieve unique label names and label values (vm_labels, vm_label_values).
- Optional resolution step and evaluation timestamps for queries.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name VictoriaMetrics MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via Smithery (npx -y @smithery/cli install ... --client claude) or configure directly in Claude Desktop by adding the NPX command with the required VM_URL, VM_SELECT_URL, and VM_INSERT_URL environment variables. Invoke tools such as vm_data_write, vm_prometheus_write, vm_query_range, vm_query, vm_labels, and vm_label_values.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "victoriametrics mcp server": {
            "VictoriaMetrics-mcp-server": {
                "command": "npx",
                "args": [
                    "-y",
                    "@smithery/cli",
                    "install",
                    "@yincongcyincong/victoriametrics-mcp-server",
                    "--client",
                    "claude"
                ]
            }
        }
    }
}

McpServers

{
    "VictoriaMetrics-mcp-server": {
        "command": "npx",
        "args": [
            "-y",
            "@smithery/cli",
            "install",
            "@yincongcyincong/victoriametrics-mcp-server",
            "--client",
            "claude"
        ]
    }
}

VictoriaMetrics MCP Server

smithery badge

<a href="https://glama.ai/mcp/servers/@yincongcyincong/VictoriaMetrics-mcp-server">
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:

| Parameter | Type | Description | Required |
|---------------|-------------|--------------------------------------------|----------|
| metric | object | Tags of the metric | βœ… |
| values | number[] | Array of metric values | βœ… |
| timestamps | number[] | Array of timestamps in Unix seconds | βœ… |

---

2. vm_prometheus_write

Description: Import Prometheus exposition format data into VictoriaMetrics.

Input Parameters:

| Parameter | Type | Description | Required |
|-----------|----------|-------------------------------------------------|----------|
| data | string | Metrics in Prometheus exposition format | βœ… |

---

3. vm_query_range

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

Input Parameters:

| Parameter | Type | Description | Required |
|-----------|----------|-------------------------------------------------|----------|
| query | string | PromQL expression | βœ… |
| start | number | Start timestamp in Unix seconds | ⛔️ |
| end | number | End timestamp in Unix seconds | ⛔️ |
| step | string | Query 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:

| Parameter | Type | Description | Required |
|-----------|----------|-----------------------------------------|----------|
| query | string | PromQL expression to evaluate | βœ… |
| time | number | Evaluation 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:

| Parameter | Type | Description | Required |
|-----------|----------|------------------------------|----------|
| label | string | Label name to get values for | βœ… |

---

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.