# VictoriaMetrics-Community/mcp-victoriametrics [Health: Active]

**Category:** 📊 Monitoring  
**Repository:** https://github.com/VictoriaMetrics-Community/mcp-victoriametrics  
**GitHub Stars:** 247  
**Views:** 6  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/victoriametrics-community-mcp-victoriametrics

## Description
Provides comprehensive integration with your VictoriaMetrics instance APIs and documentation for monitoring, observability, and debugging tasks related to your VictoriaMetrics instances

## Tools
Capabilities this server exposes over MCP:

- **active_queries** — Active queries. This tool can determine currently active queries in the VictoriaMetrics instance.
This information is obtained from the "/api/v1/status/active_queries" HTTP endpoint of VictoriaMetrics API.
- **alerts** — List of firing and pending alerts of the VictoriaMetrics instance. This tool uses `/api/v1/alerts` endpoint of vmalert API, proxied by VictoriaMetrics API.
- **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 VictoriaMetrics related question.
- **explain_query** — Explain how MetricsQL query works
- **label_values** — List of label values from VictoriaMetrics instance for a provided label name. This tool uses `/api/v1/label/{labelName}/values` endpoint of VictoriaMetrics API.
- **labels** — List of label names of the VictoriaMetrics instance. This tools uses `/api/v1/labels` endpoint of VictoriaMetrics API.
- **metric_statistics** — Statistics of metrics usage in queries of the VictoriaMetrics instance. This tool helps to identify unused (never queried) or rarely used metrics or conversely actively queried metrics. This tool uses `/api/v1/status/metric_names_stats` endpoint of VictoriaMetrics API.
- **metrics** — List of available metrics of the VictoriaMetrics instance. This tool uses `/api/v1/label/__name__/values` endpoint of VictoriaMetrics API.
- **metrics_metadata** — Returns stored metrics details (metadata) such as name, type, help (description), and unit, and can be used to generate natural language queries. This tool uses `/api/v1/metadata` endpoint of VictoriaMetrics API.
- **prettify_query** — Prettify (format) MetricsQL query. This tool uses `/prettify-query` endpoint of VictoriaMetrics API.
- **query** — Instant query executes PromQL or MetricsQL query expression at the given time. The result of Instant query is a list of time series matching the filter in query expression. Each returned series contains exactly one (timestamp, value) entry, where timestamp equals to the time query arg, while the value contains query result at the requested time. This tool uses `/api/v1/query` endpoint of VictoriaMetrics API.
- **query_range** — Range query executes the query expression at the given [start…end] time range with the given step. The result of Range query is a list of time series matching the filter in query expression. Each returned series contains (timestamp, value) results for the query executed at start, start+step, start+2*step, …, start+N*step timestamps. In other words, Range query is an Instant query executed independently at start, start+step, …, start+N*step timestamps with the only difference that an instant query does not return ephemeral samples (see below). Instead, if the database does not contain any samples for the requested time and step, it simply returns an empty result. This tool uses `/api/v1/query_range` endpoint of VictoriaMetrics API.
- **rules** — List of alerting and recording rules of VictoriaMetrics instance. This tool uses `/api/v1/rules` endpoint of vmalert API proxied by VictoriaMetrics API.
- **series** — List of available time series of the VictoriaMetrics instance. This tool uses `/api/v1/series` endpoint of VictoriaMetrics API.
- **tenants** — List of tenants of the VictoriaMetrics instance.  This tool uses `/admin/tenants` endpoint of VictoriaMetrics API.
- **top_queries** — Top queries.
This tool can determine top queries of the following query types:
- the most frequently executed queries;
- queries with the biggest average execution duration;
- queries that took the most summary time for execution.
This information is obtained from the "/api/v1/status/top_queries" HTTP endpoint of VictoriaMetrics API.

- **tsdb_status** — The following tool returns various cardinality statistics about the VictoriaMetrics TSDB:
- Metric names with the highest number of series.
- Labels with the highest number of series.
- Values with the highest number of series for the selected label (aka focusLabel).
- label=name pairs with the highest number of series.
- Labels with the highest number of unique values.

This tool returns TSDB stats from "/api/v1/status/tsdb" endpoint of VictoriaMetrics API (in the way similar to Prometheus).


## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "mcp-victoriametrics": {
    "url": "https://play-mcp.victoriametrics.com/mcp"
  }
}
```

## Documentation

## What VictoriaMetrics-Community/mcp-victoriametrics does

VictoriaMetrics-Community/mcp-victoriametrics gives MCP clients an interface to a VictoriaMetrics single-node, cluster, or VictoriaMetrics Cloud instance. Its tools cover read-only API operations for exploring stored metrics, running PromQL or MetricsQL queries, inspecting alerting and recording rules, and investigating query performance or TSDB cardinality.

The server also includes an embedded VictoriaMetrics documentation resource. A documentation search tool returns relevant resource URIs, allowing an agent to retrieve product context without requiring online documentation access. Query analysis tools can explain or format MetricsQL expressions, while metadata and usage statistics help identify metric definitions and query activity.

## How it works

The MCP process translates tool calls into requests to VictoriaMetrics APIs. Instant and range queries use the corresponding query endpoints; label, metric, metadata, series, alert, rule, tenant, and status tools map to their respective VictoriaMetrics or vmalert API endpoints. The server can inspect active queries, rank frequently or expensively executed queries, and report TSDB cardinality details such as high-cardinality metric names, labels, values, and label-name pairs.

Supported operation modes include stdio and HTTP-based serving. Streamable HTTP mode can expose a root endpoint with setup instructions and tool inspection. A public test instance is available at `https://play-mcp.victoriametrics.com/mcp`; it is intended for MCP clients and connects to the VictoriaMetrics Playground.

## Setup and configuration

Run the server from a downloaded release binary, a Docker image, a Helm deployment, or a locally built binary. Source builds use Go 1.26 or newer and the repository's `make build` target. Docker images are published through the VictoriaMetrics GitHub Container Registry.

Configuration uses environment variables. Set `VM_INSTANCE_ENTRYPOINT` to the root URL of a VictoriaMetrics single-node instance or vmselect endpoint, or configure `VMC_API_KEY` for VictoriaMetrics Cloud access. `VM_INSTANCE_TYPE` identifies the instance type. HTTP deployments can set `MCP_SERVER_MODE`, `MCP_LISTEN_ADDR`, and `MCP_AUTH_TOKEN`; the documented Docker example uses port 8080 and Streamable HTTP or SSE mode.

A typical Docker deployment supplies the VictoriaMetrics endpoint, instance type, server mode, listen address, and authentication token, then publishes the selected listen port. Client configuration depends on whether the process is launched over stdio or reached through an HTTP MCP endpoint. Claude Desktop is shown as a supported client configuration.

The available operations are read-only. They are intended for querying, inspection, analysis, and documentation lookup rather than changing VictoriaMetrics data or configuration.

_Full upstream README: https://allmcps.com/mcp/victoriametrics-community-mcp-victoriametrics/readme_

