================== /// MCP /// /// MCP /// ================== [server:online] [protocol:ready]
mcp-victoriametrics
by VictoriaMetrics-Community
Implementation of a Model Context Protocol (MCP) server that exposes VictoriaMetrics APIs, documentation search and troubleshooting tools to AI-assistants and other MCP clients.
56
5
Open SourceInstallation
Prerequisites
1. Go tool-chain v1.21 or newer.
2. A reachable VictoriaMetrics HTTP endpoint (single-node or cluster).
3. Git CLI.
Build from source
# clone the repository
git clone https://github.com/VictoriaMetrics-Community/mcp-victoriametrics.git
cd mcp-victoriametrics
# compile the server binary
GO111MODULE=on go build -o mcp-vm ./cmd/mcp-victoriametrics
Run locally
# minimal execution – listen on :8080 and talk to VM on :8428
./mcp-vm \
--listenAddr=":8080" \
--vmAddr="http://localhost:8428" \
--vmUser="${VM_USER:-}" \
--vmPass="${VM_PASS:-}"
Key CLI flags / env-vars (can be supplied either way)
--listenAddr / MCP_LISTEN_ADDR – address to bind the MCP HTTP server (default :8080)
--vmAddr / VM_ADDR – VictoriaMetrics base URL, e.g. http://vm:8428
--vmUser / VM_USER – basic-auth user (if enabled in VM)
--vmPass / VM_PASS – basic-auth password
--streamSizeLimit – max body size accepted by the server (bytes)
Run with Docker (optional)
docker build -t mcp-vm .
# assuming a VictoriaMetrics container named 'victoria' on the same network
docker run --network container:victoria -p 8080:8080 mcp-vm \
--vmAddr=http://victoria:8428
Kubernetes (very short sketch)
- Create a Deployment with image built above.
- Expose port 8080 via a Service.
- Inject VM_ADDR / credentials through ConfigMap or Secret.
Documentation
License: Apache License 2.0
Updated 7/30/2025