VictoriaMetrics

MCP Server for the VictoriaMetrics.
  • javascript

7

GitHub Stars

javascript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "yincongcyincong-victoriametrics-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@yincongcyincong/victoriametrics-mcp-server"
      ]
    }
  }
}

This VictoriaMetrics MCP Server provides a compact, scriptable interface to interact with VictoriaMetrics data programmatically through MCP endpoints. You can write data, import Prometheus format, and query time series efficiently from your MCP clients, enabling automated data pipelines and dashboards.

How to use

You use an MCP client to connect to the VictoriaMetrics MCP Server and perform operations such as writing data, importing Prometheus metrics, and querying time series. Each tool corresponds to a specific action you can perform against your VictoriaMetrics instance. You can combine these endpoints in multi-step workflows to ingest, transform, and visualize metrics in real time.

How to install

Prerequisites: make sure you have Node.js and npm installed on your machine.

Install the MCP server client via Smithery using the following command to prepare the VictoriaMetrics MCP Server for your environment.

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

Configuration and runtime

The MCP server runs as a local, stdio-based process. Use the following runtime configuration to start the server with the MCP client. You provide the VictoriaMetrics URLs via environment variables when starting the server.

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

Usage notes

Only the exposed MCP endpoints are used by your clients. The server itself is invoked via the npx-based command shown above, and you supply the VictoriaMetrics connection URLs through the VM_URL, VM_SELECT_URL, and VM_INSERT_URL environment variables as needed.

Troubleshooting

If the server does not start, verify that Node.js and npm are installed and that the environment variables VM_URL, VM_SELECT_URL, and VM_INSERT_URL are set correctly for your VictoriaMetrics instance.

API endpoints and capabilities

The MCP server exposes a set of endpoints to interact with VictoriaMetrics. These include the ability to write data, import Prometheus metrics, and query time series. Each endpoint is designed to be called by MCP clients in a consistent way.

Security and access

Limit access to the MCP server to trusted clients. Use network ACLs and, if possible, run the server behind an authenticated gateway to prevent unauthorized data access or manipulation.

Notes

The MCP server is intended for programmatic interaction with VictoriaMetrics. Ensure your clients handle error cases gracefully and log operational metrics for observability.

Available tools

vm_data_write

Writes metric data to VictoriaMetrics, including metric tags, values, and timestamps.

vm_prometheus_write

Imports metrics in Prometheus exposition format into VictoriaMetrics.

vm_query_range

Queries time series data over a specified time range using PromQL with optional start, end, and step parameters.

vm_query

Evaluates the current value of a PromQL expression at a given time.

vm_labels

Retrieves all unique label names used in the metrics.

vm_label_values

Retrieves all unique values for a given label.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
VictoriaMetrics MCP Server - yincongcyincong/victoriametrics-mcp-server | VeilStrat