io.github.VictoriaMetrics/mcp-vmanomaly
MCP Server for vmanomaly - VictoriaMetrics anomaly detection
★ 7Apache-2.0devtools
Install
Config snippet generator goes here (5 client tabs)
README
# MCP Server for vmanomaly [](https://github.com/VictoriaMetrics/mcp-vmanomaly/releases)    The implementation of [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for [`vmanomaly`](https://docs.victoriametrics.com/anomaly-detection/) - VictoriaMetrics Anomaly Detection product. This provides seamless integration with `vmanomaly` REST API and [documentation](https://docs.victoriametrics.com/anomaly-detection/) for AI-assisted anomaly detection, model management, and observability insights. ## Features This MCP server enables AI assistants like Claude to interact with `vmanomaly` for: - **Health Monitoring**: Check `vmanomaly` server health and build information - **Model Management**: List, validate, and configure anomaly detection models (like `zscore_online`, `prophet`, and more) - **Configuration Generation**: Generate complete `vmanomaly` YAML configurations - **Alert Rule Generation**: Generate [`vmalert`](https://docs.victoriametrics.com/victoriametrics/vmalert/) [alerting rules](https://docs.victoriametrics.com/victoriametrics/vmalert/#alerting-rules) based on [anomaly score metrics](https://docs.victoriametrics.com/anomaly-detection/faq/#what-is-anomaly-score) to simplify alerting setup - **Documentation Search**: Full-text search across embedded `vmanomaly` documentation with fuzzy matching The MCP server contains embedded up-to-date `vmanomaly` documentation and is able to search it without online access. > 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. ## Requirements - [`vmanomaly`](https://docs.victoriametrics.com/anomaly-detection/) instance (version [1.28.3](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1283)+) with REST API access - Go 1.24 or higher (if building from source) ## Installation ### Go ```bash go install github.com/VictoriaMetrics/mcp-vmanomaly/cmd/mcp-vmanomaly@latest ``` ### Binaries Download the latest release from [Releases](https://github.com/VictoriaMetrics/mcp-vmanomaly/releases) page and put it to your PATH. Example for Linux x86_64 (other architectures and platforms are also available): ```bash latest=$(curl -s https://api.github.com/repos/VictoriaMetrics/mcp-vmanomaly/releases/latest | grep 'tag_name' | cut -d\" -f4) wget https://github.com/VictoriaMetrics/mcp-vmanomaly/releases/download/$latest/mcp-vmanomaly_Linux_x86_64.tar.gz tar axvf mcp-vmanomaly_Linux_x86_64.tar.gz ``` ### Docker You can run `vmanomaly` MCP Server using Docker. This is the easiest way to get started without needing to install Go or build from source. ```bash docker run -d --name mcp-vmanomaly \ -e VMANOMALY_ENDPOINT=http://localhost:8490 \ -e MCP_SERVER_MODE=http \ -e MCP_LISTEN_ADDR=:8080 \ -p 8080:8080 \ ghcr.io/victoriametrics/mcp-vmanomaly ``` 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](#configuration) section. See available docker images in [github registry](https://github.com/VictoriaMetrics/mcp-vmanomaly/pkgs/container/mcp-vmanomaly). Also see [Using Docker instead of binary](#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: ```bash git clone https://github.com/VictoriaMetrics/mcp-vmanomaly.git cd mcp-vmanomaly ``` - Build binary from cloned source code: ```bash make build # after that you can find binary mcp-vmanomaly and copy this file to your PATH or run inplace ``` - Build image from cloned source code: ```bash docker build -t mcp-vmanomaly . # after that you can use docker image mcp-vmanomaly for running or pushing ``` ## Configuration MCP Server for vmanomaly is configured via environment variables: | Variable | Description | Required | Default | Allowed values | |--------------------------|---------------------------------------------------------------------------------------------------------|----------|------------------|