VictoriaMetrics MCP Server

Official VictoriaMetrics MCP server: metric queries, rules and alerts, cardinality and built-in documentation for an agent

  • 243 ★ on the repository
  • Last commit
MCP serverOfficial

Extended access

Why this level

  • The token opens metrics and instance configuration and metrics may contain internal service and host names
  • Network mode without `MCP_AUTH_TOKEN` leaves the port unauthenticated
All reasons and checks

victoriametrics/mcp-victoriametrics

Install

Manual install

claude mcp add victoriametrics -e VM_INSTANCE_ENTRYPOINT=<YOUR_VM_INSTANCE> -e VM_INSTANCE_TYPE=<YOUR_VM_INSTANCE_TYPE> -e VM_INSTANCE_BEARER_TOKEN=<YOUR_VM_BEARER_TOKEN> -- /path/to/mcp-victoriametrics

The binary comes from the releases page; for HTTP mode `claude mcp add victoriametrics --transport http http://localhost:8080/mcp`.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The token opens metrics and instance configuration and metrics may contain internal service and host names
  • Network mode without `MCP_AUTH_TOKEN` leaves the port unauthenticated

This is third-party code. Review the repository files before installing.

What it does

The server opens almost all read-only VictoriaMetrics APIs to an agent, that is, what is available in the VMUI interface. The agent runs instant and range queries (`query`, `query_range`), lists metrics, labels and series, looks at rules and alerts, parses and explains queries (`explain_query`, `prettify_query`), shows the heaviest queries and TSDB statistics on data cardinality. Separate tools debug relabeling, downsampling and retention policy. Up-to-date documentation is built into the server and its search works without going online. There is VictoriaMetrics Cloud integration through an API key and ready prompts such as finding rarely used metrics with high cardinality. Run modes: stdio by default, SSE and Streamable HTTP with the `/mcp` endpoint, and a token for incoming requests is set with the `MCP_AUTH_TOKEN` variable.

Who it is for. SRE and DevOps engineers who keep metrics in VictoriaMetrics and want to analyze incidents and heavy queries together with an agent.

Good fit when

  • An alert fired and the agent gathers related metrics for the last hour and compares them with the usual level
  • A cluster slows down because of cardinality and the agent looks for metrics with the most series and rarely used ones
  • A PromQL query is slow and the agent explains its plan and looks for a simplification
  • Relabeling or retention rules are checked with debuggers before rollout

Not a fit when

  • You need to change data or cluster configuration: the server is almost entirely read-only
  • You do not run VictoriaMetrics: the server connects to a vmsingle or vmselect instance
  • The VMUI itself is enough: the agent adds value when queries and conclusions must be tied to other data

Example request

Find the metrics with the highest cardinality over the last day, show which were never queried and explain the heaviest query

MCP

Transport
stdio, http, sse
Authentication
API key

Environment variables

VM_INSTANCE_ENTRYPOINT required
Root URL of vmsingle or vmselect
VM_INSTANCE_TYPE required
Instance type: single or cluster
VM_INSTANCE_BEARER_TOKEN required, secret
Authentication token for the VictoriaMetrics API
VMC_API_KEY secret
VictoriaMetrics Cloud API key

Limitations

You need the VictoriaMetrics instance address in `VM_INSTANCE_ENTRYPOINT`, the single or cluster type in `VM_INSTANCE_TYPE` and a token in `VM_INSTANCE_BEARER_TOKEN`, plus a `VMC_API_KEY` for the cloud. Some tools (`export`, relabeling and downsampling debuggers, `test_rules`, `flags`) are off by default and enabled separately, while extras are turned off in `MCP_DISABLED_TOOLS`. Large responses are cut by `MCP_MAX_RESPONSE_SIZE`. In SSE and HTTP modes without `MCP_AUTH_TOKEN` the port stays unprotected. Answer quality depends on the client and the model.

How to disable. Remove the victoriametrics block from the client config (`claude mcp remove victoriametrics`), revoke the token and stop the container if you ran network mode.

FAQ

How can I try the server without installing it?

The README gives a public instance `https://play-mcp.victoriametrics.com/mcp` configured for the public VictoriaMetrics Playground. The address is meant for MCP clients, not for a browser.

How do I connect the server to Claude Code?

With a local binary: `claude mcp add victoriametrics -e VM_INSTANCE_ENTRYPOINT=<url> -e VM_INSTANCE_TYPE=<type> -e VM_INSTANCE_BEARER_TOKEN=<token> -- /path/to/mcp-victoriametrics`. For a server in HTTP mode: `claude mcp add victoriametrics --transport http http://localhost:8080/mcp`.

What data does the agent see?

Metrics, labels, series, rules, alerts, instance parameters, cardinality statistics and top queries. Export and debugging tools are enabled separately.

How does cluster mode work?

Set `VM_INSTANCE_TYPE` to cluster and optionally `VM_DEFAULT_TENANT_ID` as `accountID` or `accountID:projectID`. The `tenants` tool lists tenants.

How do I protect the network mode?

Set `MCP_AUTH_TOKEN`: it applies in `sse` and `http` modes while health and metrics paths stay public. Also restrict access at the network level.

Discussion

No questions or reviews yet.

Official

Official VictoriaLogs MCP server: an agent runs LogsQL queries, browses streams and fields, and searches the embedded docs.

MCP serverExtended access110Repository stars

An MCP server for Prometheus: the agent runs PromQL queries, discovers metrics and checks scrape targets

MCP serverExtended access525Repository stars
Official

The official Prometheus MCP server: PromQL queries, metrics, rules and alerts plus built-in runbooks for troubleshooting.

MCP serverExtended access141Repository stars

Independent Datadog MCP server: an agent reads incidents, monitors, logs, metrics, traces and RUM and schedules downtimes.

MCP serverExtended access143Repository stars

MCP PostgreSQL Ops selects metrics for the PostgreSQL version, exposing measurements available in that database installation.

MCP serverExtended access164Repository stars

README in short

The text presents the server as a monitoring and debugging interface for VictoriaMetrics, lists features and gives a public instance to try. Next come requirements, installation from a release, Docker and Helm, environment variables, modes, connecting to Claude Desktop, Claude Code and other clients, and tables of tools and prompts.

README badge

Report a problem