SuperAPI AI Directory

mcp-victoriametrics

mcp-victoriametrics is a Model Context Protocol (MCP) server implementation for VictoriaMetrics, used to let AI clients integrate with VictoriaMetrics instances and their APIs and documentation. It provides interfaces related to monitoring, observability, and debugging, and supports using almost all of VictoriaMetrics' read-only APIs through natural language, such as querying metrics, listing metrics, analyzing alerting rules, debugging relabeling rules, and more. The project also includes built-in up-to-date documentation, supports offline search, and can integrate with VictoriaMetrics Cloud. It can be tried through a public instance, and also supports binary, Docker, or Helm installation.

Open website

About this tool

mcp-victoriametrics is a Model Context Protocol (MCP) server implementation for VictoriaMetrics. It provides AI clients with the ability to access VictoriaMetrics instances and seamlessly integrates with the VictoriaMetrics API and documentation, and can be used for monitoring, observability, and debugging tasks, providing automation and interaction capabilities for engineers and tools.

Main capabilities The MCP server allows the use of almost all of VictoriaMetrics' read-only APIs, that is, all functionality available in VMUI, including:

  • Querying metrics and exploring data (and even plotting charts if the client supports it)
  • Listing and exporting available metrics, labels, label values, and entire series
  • Analyzing and testing alerting and recording rules and alerts
  • Displaying VictoriaMetrics instance parameters
  • Exploring data cardinality and metric usage statistics
  • Analyzing, tracing, prettifying, and explaining queries
  • Debugging relabeling rules, downsampling, and retention policy configuration
  • Integrating with VictoriaMetrics Cloud
  • Providing a UI with setup instructions and tool checks at the root endpoint (only in Streamable HTTP mode) In addition, the MCP server contains embedded up-to-date documentation that can be searched without online access.

Usage The MCP server is configured through environment variables. There are two ways to connect to a VictoriaMetrics instance:

  1. Use the VM_INSTANCE_ENTRYPOINT + VM_INSTANCE_TYPE + VM_INSTANCE_BEARER_TOKEN (optional) environment variables to connect to any single-node or cluster instance.
  2. Use the VMC_API_KEY environment variable to connect to a VictoriaMetrics Cloud instance.

The following running modes (transports) are supported:

  • stdio: standard input/output mode, the default mode, suitable for local servers.
  • sse: Server-Sent Events, the server exposes the /sse and /message endpoints.
  • http: Streamable HTTP, the server exposes the /mcp endpoint.

Installation methods

  • Download the latest release and put it in PATH.
  • Use Docker (replace the environment variables, set MCP_SERVER_MODE=http to enable Streamable HTTP mode, see the GitHub Container Registry for the image).
  • Build from source: clone the repository git clone https://github.com/VictoriaMetrics/mcp-victoriametrics.git,进入目录后运行 make build or docker build -t mcp-victoriametrics .
  • Use the Helm chart (see the documentation for details).

Client configuration Supported for configuration in clients such as Cursor, Claude Desktop, Claude Code, Codex CLI, Visual Studio Code, Zed, Windsurf, and others. In stdio mode, you can run the binary directly, or use Docker instead. Instance parameters must be filled in the configuration example.

Available tools and prompts Provides a large number of tools for interacting with VictoriaMetrics instances, as well as additional tools for VictoriaMetrics Cloud users (requires VMC_API_KEY). The server also includes predefined prompts for common tasks.

Use cases Suitable for engineers who need to interact with VictoriaMetrics in natural language, for querying metrics, analyzing rules, debugging configurations, exploring data cardinality, etc., and can be combined with other MCP servers related to observability or documentation search to achieve more powerful results.

Limitations The quality of the MCP server and responses depends largely on the capabilities of the client and the quality of the model used. Before use, you need to prepare a VictoriaMetrics or VictoriaMetrics Cloud instance (single-node or cluster). If building from source, Go 1.26 or later is required.