Skip to content
Skillpedia
βœ“ Official Β· VictoriaMetrics● Free and open sourceπŸ’» LocalπŸ”‘ Needs an API keyCloud and servers

VictoriaMetrics MCP Server

Lets your AI agent query VictoriaMetrics: explore metrics, check alerts and rules, and debug your setup.

242 stars on GitHubby VictoriaMetricsLicense Apache-2.0Updated 22 days ago

How to install

This MCP is local: it runs on your computer.

It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Code…). Choose your app:

Paste in the terminal:

claude mcp add victoriametrics -e VM_INSTANCE_ENTRYPOINT="<your value>" -e VM_INSTANCE_TYPE="<your value>" -e VM_INSTANCE_BEARER_TOKEN="<your value>" -- docker run -i --rm -e VM_INSTANCE_ENTRYPOINT -e VM_INSTANCE_TYPE -e VM_INSTANCE_BEARER_TOKEN -e VMC_API_KEY -e MCP_DISABLED_TOOLS -e MCP_DISABLE_RESOURCES -e MCP_PASSTHROUGH_HEADERS ghcr.io/victoriametrics/mcp-victoriametrics:1.120.1

What to fill in

NameWhat it isRequired
VM_INSTANCE_ENTRYPOINTURL to VictoriaMetrics instance (it should be root URL of vmsingle or vmselect), for example http://localhost:8428 or https://play.victoriametrics.comYes
VM_INSTANCE_TYPEType of VictoriaMetrics instance (single / cluster)Yes
VM_INSTANCE_BEARER_TOKENAuthentication token for VictoriaMetrics APIYes
VMC_API_KEYOptional: API key from VictoriaMetrics Cloud Console (if you have deployment in VictoriaMetrics Cloud)No
MCP_DISABLED_TOOLSComma-separated list of tools to disableNo
MCP_DISABLE_RESOURCESDisable all resources (documentation tool will continue to work)No
MCP_PASSTHROUGH_HEADERSHTTP header names to forward from incoming MCP requests to VictoriaMetrics (comma-separated list). Overrides VM_INSTANCE_HEADERS on collision.No

Ready! Now test it

Restart the app and paste one of these requests in the chat:

Show the CPU usage for my web servers over the last hour.
Which metrics have the highest cardinality?

What it is

This MCP server gives your AI access to almost all read-only APIs of VictoriaMetrics, the same things you can do in VMUI. It also has the VictoriaMetrics docs built in, so it can search them offline. It works with a single-node or cluster instance and with VictoriaMetrics Cloud.

What it can do

  • Query metrics and explore data
  • List and export metrics, labels, label values and series
  • Analyze and test alerting and recording rules
  • Explore cardinality and metrics usage
  • Analyze, trace and explain queries
  • Debug relabeling, downsampling and retention settings
  • Search built-in documentation

When to use

  • β€ΊWhen you want to ask in plain language what a metric shows
  • β€ΊWhen an alert fires and you need help tracing the cause
  • β€ΊWhen you want to check why cardinality is growing

What you need

A VictoriaMetrics instance (single or cluster) or VictoriaMetrics Cloud. Set VM_INSTANCE_ENTRYPOINT and VM_INSTANCE_TYPE, or a VMC_API_KEY. Run it as a binary, Docker or Helm.

Skills that pair well

⭐ Skillpedia MCP Β· freeYour agent finds the right skill on its ownInstall our MCP and your agent searches 15,000+ skills whenever it needs one.Install for free β†’

Frequently asked questions

Is it free and open source?

Yes, it is open source on GitHub.

Is it read-only?

It uses read-only APIs. Some tools such as export and test_rules are disabled by default.

Can I try it first?

Yes, there is a public playground server at https://play-mcp.victoriametrics.com/mcp for MCP clients.

Which modes are there?

stdio (default), sse and http, set with MCP_SERVER_MODE.

Does it work with VictoriaMetrics Cloud?

Yes, use a VMC_API_KEY.

Can it work offline?

The documentation search is embedded and works without online access.

If it does not work

  • β€ΊCheck VM_INSTANCE_ENTRYPOINT points to the root URL of vmsingle or vmselect.
  • β€ΊSet VM_INSTANCE_TYPE to single or cluster, and add VM_INSTANCE_BEARER_TOKEN if your instance needs one.
  • β€ΊDisabled tools can be changed with MCP_DISABLED_TOOLS.

5 new skills a week. 1 minute to read.