MCP Directory

VictoriaMetrics MCP Server

Official

Official VictoriaMetrics server: MetricsQL/PromQL queries plus embedded docs search.

Verified
stdio (local)
API key
Go

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
docker run -i --rm -e VM_INSTANCE_ENTRYPOINT -e VM_INSTANCE_TYPE -e VM_INSTANCE_BEARER_TOKEN ghcr.io/victoriametrics/mcp-victoriametrics

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "victoriametrics-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "VM_INSTANCE_ENTRYPOINT",
        "-e",
        "VM_INSTANCE_TYPE",
        "-e",
        "VM_INSTANCE_BEARER_TOKEN",
        "ghcr.io/victoriametrics/mcp-victoriametrics"
      ],
      "env": {
        "VM_INSTANCE_TYPE": "single",
        "VM_INSTANCE_ENTRYPOINT": "<your-victoriametrics-url>",
        "VM_INSTANCE_BEARER_TOKEN": "<your-bearer-token>"
      }
    }
  }
}

Requires Docker to be installed and running.

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • A VictoriaMetrics instance (single-node or cluster) or a VictoriaMetrics Cloud account
  • The instance URL set as VM_INSTANCE_ENTRYPOINT, plus VM_INSTANCE_TYPE set to 'single' or 'cluster'
  • Optional auth: a bearer token via VM_INSTANCE_BEARER_TOKEN, custom headers via VM_INSTANCE_HEADERS (for reverse proxies), or a VictoriaMetrics Cloud API key via VMC_API_KEY
  • To run: download a release binary, use the Docker image (ghcr.io/victoriametrics/mcp-victoriametrics), or build from source with Go 1.26+

About VictoriaMetrics MCP Server

The VictoriaMetrics MCP Server is the official server (from the VictoriaMetrics-Community organization) for connecting AI assistants to a VictoriaMetrics time-series database. It lets an agent run MetricsQL and PromQL queries — both instant (query) and range (query_range) — and explore the available metrics, labels, and series, so you can investigate observability data conversationally.

A standout feature is the bundled documentation tool, which searches VictoriaMetrics' embedded docs so the agent can answer config and query questions without hitting the network. It also includes query helpers (prettify_query, explain_query) and a deep set of operational tools: alerting rules and active alerts, slow/active query inspection, TSDB cardinality status, and debug tools for relabeling, downsampling, and retention filters.

It works with single-node and cluster VictoriaMetrics deployments as well as VictoriaMetrics Cloud (which adds deployment, region, and access-token management tools). The server is written in Go and ships as a binary, Docker image, or Helm chart, and runs over stdio (default), SSE, or HTTP.

Tools & capabilities (12)

query

Run an instant PromQL/MetricsQL query.

query_range

Run a PromQL/MetricsQL query over a time range.

metrics

List available metric names in the instance.

labels

List label names; with label_values, explore label cardinality.

series

Find time series matching a selector.

explain_query

Analyze and explain a MetricsQL/PromQL query.

prettify_query

Format a query for readability.

documentation

Search the embedded VictoriaMetrics documentation.

rules

Inspect configured alerting and recording rules.

alerts

List currently firing alerts.

tsdb_status

Report TSDB cardinality and storage status for analysis.

metric_relabel_debug

Debug relabeling, downsampling, and retention filter configs (with related debug tools).

When to use it

  • Use it when you want to write and run MetricsQL/PromQL queries conversationally and have the agent prettify or explain them.
  • Use it when you're hunting high-cardinality metrics and want tsdb_status and metric statistics to find the culprits.
  • Use it when validating alerting rules or checking which alerts are currently firing.
  • Use it when debugging relabeling, downsampling, or retention filter configuration before applying it.
  • Use it when you need a VictoriaMetrics config or query-syntax answer and want the agent to search the embedded docs.
  • Use it when managing VictoriaMetrics Cloud deployments, regions, and access tokens through an agent.

Quick setup

  1. 1Have your VictoriaMetrics URL (or VictoriaMetrics Cloud account) ready.
  2. 2Install the server via the release binary, the ghcr.io Docker image, or `make build` from source (Go 1.26+).
  3. 3Add it to your MCP client config and set VM_INSTANCE_ENTRYPOINT and VM_INSTANCE_TYPE (single/cluster); add VM_INSTANCE_BEARER_TOKEN or VMC_API_KEY if auth is required.
  4. 4Optionally set MCP_SERVER_MODE (stdio/sse/http) and MCP_DISABLED_TOOLS to trim the toolset.
  5. 5Restart your MCP client.
  6. 6Verify by asking the agent to list metrics or run a simple range query.

Security notes

The bearer token grants query access to all stored time-series, so scope it and keep the instance endpoint network-restricted. MetricsQL queries can be heavy, so apply server-side limits on large unbounded ranges.

VictoriaMetrics MCP Server FAQ

Is this an official VictoriaMetrics project?

Yes, it is maintained under the VictoriaMetrics-Community organization on GitHub and distributed via the project's own GitHub Container Registry and Helm chart.

Does it support both single-node and cluster setups?

Yes. Set VM_INSTANCE_TYPE to 'single' or 'cluster'. Cluster and multi-tenant deployments are supported, including a `tenants` tool.

How do I authenticate?

Use a bearer token via VM_INSTANCE_BEARER_TOKEN, custom headers via VM_INSTANCE_HEADERS for reverse-proxy auth, or a VMC_API_KEY for VictoriaMetrics Cloud.

Can it run remotely instead of over stdio?

Yes. MCP_SERVER_MODE supports stdio (default), sse, and http transports.

What's special compared to a generic Prometheus MCP server?

It speaks MetricsQL (VictoriaMetrics' PromQL superset), bundles a documentation search tool, and adds VictoriaMetrics-specific operational and debug tools like tsdb_status, downsampling/retention filter debugging, and Cloud management.

Alternatives to VictoriaMetrics MCP Server

Compare all alternatives →

Official Elastic server: list indices, read mappings, and search with Query DSL.

Verified
stdio (local)
API key
TypeScript
5 tools
Updated 4 months agoRepo

Official PostHog server: product analytics, feature flags, experiments, error tracking and SQL.

Verified
stdio (local)
API key
TypeScript
12 tools
Updated 4 months agoRepo

Run PromQL queries and analyze Prometheus metrics from any MCP client.

Verified
stdio (local)
No auth
Python
6 tools
Updated 1 month agoRepo