mcp-victoriametrics
The implementation of Model Context Protocol (MCP) server for VictoriaMetrics
claude mcp add --transport stdio victoriametrics-mcp-victoriametrics docker run -d --name mcp-victoriametrics -e VM_INSTANCE_ENTRYPOINT=https://play.victoriametrics.com -e VM_INSTANCE_TYPE=cluster -e MCP_SERVER_MODE=sse -e MCP_LISTEN_ADDR=:8080 -p 8080:8080 ghcr.io/victoriametrics-community/mcp-victoriametrics \ --env MCP_LISTEN_ADDR=":8080" \ --env MCP_SERVER_MODE="sse" \ --env VM_INSTANCE_TYPE="cluster" \ --env VM_INSTANCE_ENTRYPOINT="https://play.victoriametrics.com"
How to use
This VictoriaMetrics MCP Server provides an integration point for your VictoriaMetrics deployment, exposing almost all read-only VMUI capabilities through the MCP interface. You can query metrics, explore data, list and export metrics and labels, analyze alerting and recording rules, inspect instance parameters, and explore data cardinality and usage statistics. The embedded documentation and prompts allow you to search VM docs offline, making it useful for debugging, troubleshooting, and automating maintenance tasks. To get started, connect with a capable MCP client and begin issuing prompts that combine metrics queries, data exploration, and VMUI prompts. The server supports dialog-style interactions where you can chain tools, docs search, and prompts to build complex observability tasks. Example workflows include exploring a metric’s label values, testing a recording rule, or explaining a complex PromQL query with optimizations. For performance and streaming scenarios, you can enable Streamable HTTP mode by configuring MCP_SERVER_MODE appropriately in your deployment.
How to install
Prerequisites:
- A VictoriaMetrics instance (self-hosted or Cloud) reachable by the MCP server.
- Docker installed on the host (or follow Go/Binary installation if you prefer).
- Basic familiarity with Docker commands if you choose the Docker route.
Option 1: Docker (recommended for quick start)
- Ensure Docker is installed on your host.
- Run the MCP server with the following command (adjust endpoints as needed):
docker run -d --name mcp-victoriametrics \
-e VM_INSTANCE_ENTRYPOINT=https://play.victoriametrics.com \
-e VM_INSTANCE_TYPE=cluster \
-e MCP_SERVER_MODE=sse \
-e MCP_LISTEN_ADDR=:8080 \
-p 8080:8080 \
ghcr.io/victoriametrics-community/mcp-victoriametrics
- Verify the server is running and accessible at http://localhost:8080 (adjust host/port as needed).
Option 2: Go installed and build from source
- Install Go 1.17+ (per repository requirements may be newer as of your date).
- Build the binary:
go install github.com/VictoriaMetrics-Community/mcp-victoriametrics/cmd/mcp-victoriametrics@latest
- Run the binary locally:
mcp-victoriametrics
Option 3: Binaries or Source (follow repository guidance on releases)
- Download the latest release and place the binary in your PATH.
- Run the binary or container as per the installation notes.
Prerequisites vary by deployment choice; choose Docker for simplicity or build from source for customization.
Additional notes
Notes and tips:
- Environment variables control the MCP server behavior. In Docker, you typically set VM_INSTANCE_ENTRYPOINT (the VictoriaMetrics endpoint), VM_INSTANCE_TYPE (e.g., cluster or single), MCP_SERVER_MODE (e.g., sse or http), and MCP_LISTEN_ADDR (the address the MCP server listens on).
- To enable Streamable HTTP mode, set MCP_SERVER_MODE to http as described in the configuration section of the README.
- If you run behind a reverse proxy or with TLS, ensure the MCP listener address and client configurations reflect the public URL and port.
- The MCP server exposes VMUI read-only APIs; check permissions and rate limits of your VictoriaMetrics instance when performing heavy queries.
- For testing without installing, you can use the public MCP server instance at play-mcp.victoriametrics.com and compare behaviors before deploying to production.
- If you need to customize the Docker run, refer to the repository's Docker instructions and available images in the container registry.
Related MCP Servers
mcp-language
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnostics.
kodit
👩💻 MCP server to index external repositories
pluggedin-app
The Crossroads for AI Data Exchanges. A unified, self-hostable web interface for discovering, configuring, and managing Model Context Protocol (MCP) servers—bringing together AI tools, workspaces, prompts, and logs from multiple MCP sources (Claude, Cursor, etc.) under one roof.
mcp-victorialogs
The implementation of Model Context Protocol (MCP) server for VictoriaLogs.
last9
Last9 MCP Server
mcp
Teamwork.com MCP server