VictoriaMetrics MCP Server
MCP serverDocs & knowledgeMCP Server for VictoriaMetrics. Provides integration with VictoriaMetrics API and documentation
Unavailable. This server has no hosted endpoint yet, so ahel can't serve it.
Connect ahel once, and every AI you use reads what you have installed.
From the project's README
As published by victoriametrics-community/mcp-victoriametrics in README.md.
The implementation of Model Context Protocol (MCP) server for VictoriaMetrics.
This provides access to your VictoriaMetrics instance and seamless integration with VictoriaMetrics APIs and documentation. It can give you a comprehensive interface for monitoring, observability, and debugging tasks related to your VictoriaMetrics instances, enable advanced automation and interaction capabilities for engineers and tools.
Features
This MCP server allows you to use almost all read-only APIs of VictoriaMetrics, i.e. all functions available in VMUI:
- Querying metrics and exploring data (even drawing graphs if your client supports it)
- Listing and exporting available metrics, labels, labels values and entire series
- Analyzing and testing your alerting and recording rules and alerts
- Showing parameters of your VictoriaMetrics instance
- Exploring cardinality of your data and metrics usage statistics
- Analyzing, tracing, prettifying and explaining your queries
- Debugging your relabeling rules, downsampling and retention policy configurations
- Integration with VictoriaMetrics Cloud
- UI with setup instrinctions and tools inspection on the root endpoint (only in Streamable HTTP mode)
In addition, the MCP server contains embedded up-to-date documentation and is able to search it without online access.
More details about the exact available tools and prompts can be found in the Usage section.
You can combine functionality of tools, docs search in your prompts and invent great usage scenarios for your VictoriaMetrics instance. Just check the Dialog example section to see how it can work. And please note the fact that the quality of the MCP Server and its responses depends very much on the capabilities of your client and the quality of the model you are using.
You can also combine the MCP server with other observability or doc search related MCP Servers and get even more powerful results.
Try without installation
There is a publicly available instance of the VictoriaMetrics MCP Server that you can use to test the features without installing it:
https://play-mcp.victoriametrics.com/mcp
Attention! This URL is not supposed to be opened in a browser, it is intended to be used in MCP clients.
It's available in Streamable HTTP mode and configured to work with Public VictoriaMetrics Playground.
Here is example of configuration for Claude Desktop:
Requirements
- VictoriaMetrics or VictoriaMetrics Cloud instance (single-node or cluster)
- Go 1.26 or higher (if you want to build from source)
Installation
Binaries
Just download the latest release from Releases page and put it to your PATH.
Example for Linux x86_64 (note that other architectures and platforms are also available):
latest=$(curl -s https://api.github.com/repos/VictoriaMetrics/mcp-victoriametrics/releases/latest | grep 'tag_name' | cut -d\" -f4)
wget https://github.com/VictoriaMetrics/mcp-victoriametrics/releases/download/$latest/mcp-victoriametrics_Linux_x86_64.tar.gz
tar axvf mcp-victoriametrics_Linux_x86_64.tar.gz
Docker
You can run VictoriaMetrics MCP Server using Docker.
This is the easiest way to get started without needing to install Go or build from source.
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/mcp-victoriametrics
You should replace environment variables with your own parameters.
Note that the MCP_SERVER_MODE=http flag is used to enable Streamable HTTP mode.
More details about server modes can be found in the Configuration section.
See available docker images in github registry.
Also see Using Docker instead of binary section for more details about using Docker with MCP server with clients in stdio mode.
Source Code
For building binary from source code you can use the following approach:
-
Clone repo:
git clone https://github.com/VictoriaMetrics/mcp-victoriametrics.git cd mcp-victoriametrics -
Build binary from cloned source code:
make build # after that you can find binary mcp-victoriametrics and copy this file to your PATH or run inplace -
Build image from cloned source code:
docker build -t mcp-victoriametrics . # after that you can use docker image mcp-victoriametrics for running or pushing
Helm
Check out VictoriaMetrics MCP Server Helm chart documentation for more details about installation using Helm.
Configuration
MCP Server for VictoriaMetrics is configured via environment variables:
| Variable | Description | Required | Default | Allowed values |
|---|---|---|---|---|
VM_INSTANCE_ENTRYPOINT / VMC_API_KEY | URL to VictoriaMetrics instance (it should be root / URL of vmsingle or vmselect) | Yes (if you don't use VMC_API_KEY) | - | - |
VM_INSTANCE_TYPE | Type of VictoriaMetrics instance | Yes (if you don't use VMC_API_KEY) | - | single, cluster |
VM_INSTANCE_BEARER_TOKEN | Authentication token for VictoriaMetrics API | No | - | - |
VM_INSTANCE_HEADERS | Custom HTTP headers to send with requests (comma-separated key=value pairs) | No | - | - |
MCP_PASSTHROUGH_HEADERS | HTTP header names to forward from incoming MCP requests to VictoriaMetrics (comma-separated list). Overrides VM_INSTANCE_HEADERS on collision. Only applies in sse/http modes. | No | - | - |
VM_DEFAULT_TENANT_ID | Default tenant ID for cluster mode. Format: accountID or accountID:projectID (32-bit integers). See VictoriaMetrics cluster docs | No | 0 | - |
VMC_API_KEY | API key from VictoriaMetrics Cloud Console | No | - | - |
MCP_SERVER_MODE | Server operation mode. See Modes for details. | No | stdio | stdio, sse, http |
MCP_LISTEN_ADDR | Address for SSE or HTTP server to listen on | No | localhost:8080 | - |
MCP_DISABLED_TOOLS | Comma-separated list of tools to disable | No | 'export,flags,metric_relabel_debug,downsampling_filters_debug,retention_filters_debug,test_rules' | - |
MCP_DISABLE_RESOURCES | Disable all resources (documentation tool will continue to work) | No | false | false, true |
MCP_HEARTBEAT_INTERVAL | Defines the heartbeat interval for the streamable-http protocol. It means the MCP server will send a heartbeat to the client through the GET connection, to keep the connection alive from being closed by the network infrastructure (e.g. gateways) | No | 30s | - |
MCP_LOG_FORMAT | Log output format | No | text | text, json |
MCP_LOG_LEVEL | Minimum log level | No | info | debug, info, warn, error |
You can use two options to connect to your VictoriaMetrics instance:
- Using
VM_INSTANCE_ENTRYPOINT+VM_INSTANCE_TYPE+VM_INSTANCE_BEARER_TOKEN(optional) environment variables to connect to any single-node or cluster instance of VictoriaMetrics. - Using
VMC_API_KEYenvironment variable to work with your VictoriaMetrics Cloud instances.
Modes
MCP Server supports the following modes of operation (transports):
stdio- Standard input/output mode, where the server reads commands from standard input and writes responses to standard output. This is the default mode and is suitable for local servers.sse- Server-Sent Events. Server will expose the/sseand/messageendpoints for SSE connections.http- Streamable HTTP. Server will expose the/mcpendpoint for HTTP connections.
More info about traqnsports you can find in MCP docs:
Сonfiguration examples
# For a single-node instance
export VM_INSTANCE_ENTRYPOINT="http://localhost:8428"
export VM_INSTANCE_TYPE="single"
export VM_INSTANCE_BEARER_TOKEN="your-token"
export MCP_PASSTHROUGH_HEADERS="X-Token,X-Access-Key"
# For a cluster
export VM_INSTANCE_ENTRYPOINT="https://play.victoriametrics.com"
export VM_INSTANCE_TYPE="cluster"
export MCP_DISABLED_TOOLS="export,metric_statistics,test_rules" # disable export, statistics and rules unit test tools
# For VictoriaMetrics Cloud
export VMC_API_KEY="<you-api-key>"
# Server mode
export MCP_SERVER_MODE="sse"
export MCP_LISTEN_ADDR="0.0.0.0:8080"
# Custom headers for authentication (e.g., behind a reverse proxy)
# Expected syntax is key=value separated by commas
export VM_INSTANCE_HEADERS="<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
Endpoints
In SSE and HTTP modes the MCP server provides the following endpoints:
| Endpoint | Description |
|---|---|
/ | Landing page with setup help and tool inspection |
/sse + /message | Endpoints for messages in SSE mode (for MCP clients that support SSE) |
/mcp | HTTP endpoint for streaming messages in HTTP mode (for MCP clients that support Streamable HTTP) |
/metrics | Metrics in Prometheus format for monitoring the MCP server |
/health/liveness | Liveness check endpoint to ensure the server is running |
/health/readiness | Readiness check endpoint to ensure the server is ready to accept requests |
Setup in clients
Cursor
Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server and paste the following configuration into your Cursor ~/.cursor/mcp.json file:
{
"mcpServers": {
"victoriametrics": {
"command": "/path/to/mcp-victoriametrics",
"env": {
"VM_INSTANCE_ENTRYPOINT": "<YOUR_VM_INSTANCE>",
"VM_INSTANCE_TYPE": "<YOUR_VM_INSTANCE_TYPE>",
"VM_INSTANCE_BEARER_TOKEN": "<YOUR_VM_BEARER_TOKEN>",
"VM_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
}
}
}
}
See Cursor MCP docs for more info.
Claude Desktop
Add this to your Claude Desktop claude_desktop_config.json file (you can find it if open Settings -> Developer -> Edit config):
{
"mcpServers": {
"victoriametrics": {
"command": "/path/to/mcp-victoriametrics",
"env": {
"VM_INSTANCE_ENTRYPOINT": "<YOUR_VM_INSTANCE>",
"VM_INSTANCE_TYPE": "<YOUR_VM_INSTANCE_TYPE>",
"VM_INSTANCE_BEARER_TOKEN": "<YOUR_VM_BEARER_TOKEN>",
"VM_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
}
}
}
}
See Claude Desktop MCP docs for more info.
Claude Code
Run the command:
claude mcp add victoriametrics -- /path/to/mcp-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>
-e VM_INSTANCE_HEADERS="<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
See Claude Code MCP docs for more info.
Codex
Codex CLI and the IDE extension use the same MCP configuration file: ~/.codex/config.toml
(or .codex/config.toml in a trusted project).
Run the command:
codex mcp add victoriametrics \
--env VM_INSTANCE_ENTRYPOINT=<YOUR_VM_INSTANCE> \
--env VM_INSTANCE_TYPE=<YOUR_VM_INSTANCE_TYPE> \
--env VM_INSTANCE_BEARER_TOKEN=<YOUR_VM_BEARER_TOKEN> \
--env VM_INSTANCE_HEADERS="<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>" \
-- /path/to/mcp-victoriametrics
Or add the following to your Codex ~/.codex/config.toml file:
[mcp_servers.victoriametrics]
command = "/path/to/mcp-victoriametrics"
[mcp_servers.victoriametrics.env]
VM_INSTANCE_ENTRYPOINT = "<YOUR_VM_INSTANCE>"
VM_INSTANCE_TYPE = "<YOUR_VM_INSTANCE_TYPE>"
VM_INSTANCE_BEARER_TOKEN = "<YOUR_VM_BEARER_TOKEN>"
VM_INSTANCE_HEADERS = "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
If you run the server in Streamable HTTP mode, you can register it with:
codex mcp add victoriametrics --url http://localhost:8080/mcp
See Codex MCP docs for more info.
Visual Studio Code
Add this to your VS Code MCP config file:
{
"servers": {
"victoriametrics": {
"type": "stdio",
"command": "/path/to/mcp-victoriametrics",
"env": {
"VM_INSTANCE_ENTRYPOINT": "<YOUR_VM_INSTANCE>",
"VM_INSTANCE_TYPE": "<YOUR_VM_INSTANCE_TYPE>",
"VM_INSTANCE_BEARER_TOKEN": "<YOUR_VM_BEARER_TOKEN>",
"VM_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
}
}
}
}
See VS Code MCP docs for more info.
Zed
Add the following to your Zed config file:
"context_servers": {
"victoriametrics": {
"command": {
"path": "/path/to/mcp-victoriametrics",
"args": [],
"env": {
"VM_INSTANCE_ENTRYPOINT": "<YOUR_VM_INSTANCE>",
"VM_INSTANCE_TYPE": "<YOUR_VM_INSTANCE_TYPE>",
"VM_INSTANCE_BEARER_TOKEN": "<YOUR_VM_BEARER_TOKEN>",
"VM_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
}
},
"settings": {}
}
}
See Zed MCP docs for more info.
JetBrains IDEs
- Open
Settings->Tools->AI Assistant->Model Context Protocol (MCP). - Click
Add (+) - Select
As JSON - Put the following to the input field:
{
"mcpServers": {
"victoriametrics": {
"command": "/path/to/mcp-victoriametrics",
"env": {
"VM_INSTANCE_ENTRYPOINT": "<YOUR_VM_INSTANCE>",
"VM_INSTANCE_TYPE": "<YOUR_VM_INSTANCE_TYPE>",
"VM_INSTANCE_BEARER_TOKEN": "<YOUR_VM_BEARER_TOKEN>",
"VM_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
}
}
}
}
Windsurf
Add the following to your Windsurf MCP config file.
{
"mcpServers": {
"victoriametrics": {
"command": "/path/to/mcp-victoriametrics",
"env": {
"VM_INSTANCE_ENTRYPOINT": "<YOUR_VM_INSTANCE>",
"VM_INSTANCE_TYPE": "<YOUR_VM_INSTANCE_TYPE>",
"VM_INSTANCE_BEARER_TOKEN": "<YOUR_VM_BEARER_TOKEN>",
"VM_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
}
}
}
}
See Windsurf MCP docs for more info.
Using Docker instead of binary
You can run VictoriaMetrics MCP server using Docker instead of local binary.
You should replace run command in configuration examples above in the following way:
{
"mcpServers": {
"victoriametrics": {
"command": "docker",
"args": [
"run",
"-i", "--rm",
"-e", "VM_INSTANCE_ENTRYPOINT",
"-e", "VM_INSTANCE_TYPE",
"-e", "VM_INSTANCE_BEARER_TOKEN",
"-e", "VM_INSTANCE_HEADERS",
"ghcr.io/victoriametrics/mcp-victoriametrics",
],
"env": {
"VM_INSTANCE_ENTRYPOINT": "<YOUR_VM_INSTANCE>",
"VM_INSTANCE_TYPE": "<YOUR_VM_INSTANCE_TYPE>",
"VM_INSTANCE_BEARER_TOKEN": "<YOUR_VM_BEARER_TOKEN>",
"VM_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
}
}
}
}
Usage
After installing and configuring the MCP server, you can start using it with your favorite MCP client.
You can start dialog with AI assistant from the phrase:
Use MCP VictoriaMetrics in the following answers
Shortened here. Read the whole README on GitHub.
Signals
- GitHub stars
- 231
- Forks
- 28
- Last commit
- Aug 2026
Advanced
- Delivery
- mcp-victoriametrics MCP server → your ahel gateway (mcp.ahel.ai) → every connected AI client.
- Catalog kind
- mcp-server
- Gateway key
io-github-victoriametrics-community-mcp-victoriametrics- Source
- github.com/victoriametrics-community/mcp-victoriametrics