Implementation of a Model Context Protocol (MCP) server that exposes VictoriaMetrics APIs, documentation and tooling to AI assistants and other MCP-compatible clients.
https://github.com/VictoriaMetrics-Community/mcp-victoriametricsStop switching between your chat window and VictoriaMetrics dashboards. This MCP server gives your AI assistant direct access to your metrics data, turning it into an expert that can query, analyze, and optimize your observability stack in real-time.
If you're running VictoriaMetrics for observability, you know the drill: identify unusual patterns, debug failing alerts, optimize storage costs, hunt down high-cardinality metrics. These tasks require deep domain knowledge and lots of context switching between tools.
The VictoriaMetrics MCP server eliminates that friction. Your AI assistant can now directly query your metrics, analyze usage patterns, debug configurations, and even generate relabeling rules - all within the same conversation where you're troubleshooting production issues.
Direct Metrics Access: Execute PromQL/MetricsQL queries, explore time series, and analyze data without leaving your chat interface. Your assistant understands your actual metrics, not just theoretical monitoring concepts.
Comprehensive Toolset: 20+ specialized tools covering everything from basic queries to advanced debugging - cardinality analysis, relabeling rule testing, downsampling configuration, alert rule validation.
Embedded Knowledge: Built-in VictoriaMetrics documentation search means your assistant knows the platform inside and out, providing accurate guidance without hallucinating outdated information.
Production-Ready Features: Works with both single-node and cluster deployments, supports VictoriaMetrics Cloud, includes authentication, and provides multiple transport modes for different integration patterns.
Here's what changes when you add this to your workflow:
Instant Metrics Analysis: Instead of writing complex queries by hand, describe what you're looking for: "Show me the top 10 highest cardinality metrics that are rarely queried." Your assistant executes the appropriate queries and interprets the results.
Configuration Optimization: "Help me reduce storage costs by identifying unused metrics and creating relabeling rules to drop them." Your assistant analyzes usage statistics, identifies candidates, generates the exact YAML configuration, and even tests it before you apply it.
Alert Debugging: When alerts fire, your assistant can immediately check the underlying metrics, analyze historical patterns, and suggest optimizations - all in the context of your specific deployment.
Knowledge Transfer: New team members can ask complex observability questions and get answers based on your actual metrics data, accelerating their understanding of your systems.
The server runs alongside your VictoriaMetrics instance and connects to any MCP-compatible client (Claude Desktop, Cursor, VS Code, etc.). You can run it as a binary, Docker container, or even try the public demo instance.
# Quick start with Docker
docker run -d \
-e VM_INSTANCE_ENTRYPOINT=http://your-vm:8428 \
-e VM_INSTANCE_TYPE=single \
-e MCP_SERVER_MODE=http \
ghcr.io/victoriametrics-community/mcp-victoriametrics
Configure your MCP client to connect, and you're ready to have intelligent conversations about your metrics data.
The real power emerges when combining multiple tools in a single conversation:
Your assistant becomes a metrics expert that understands both the theory and your specific deployment reality.
The server provides multiple operation modes (stdio, HTTP, SSE) to fit different deployment patterns. It includes Prometheus metrics for monitoring, health checks for orchestration, and supports authentication for secure environments.
For teams running VictoriaMetrics at scale, this MCP server transforms how you interact with your observability data - making complex analysis accessible through natural language while maintaining the precision and power of direct API access.
Ready to make your metrics stack conversational? Start with the public demo at https://play-mcp.victoriametrics.com/mcp to see it in action with real data.