victoriametrics-mcp
Allows querying Prometheus using the same metric tools (vm_query, vm_query_range, vm_series, vm_label_values, vm_targets) since the server speaks the Prometheus HTTP API.
Provides tools for querying VictoriaMetrics, including instant and range PromQL/MetricsQL queries, series discovery, label value enumeration, and scraping target health.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@victoriametrics-mcpShow me the current request rate per service"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
victoriametrics-mcp
An MCP server that lets an LLM agent query VictoriaMetrics (PromQL/MetricsQL) and VictoriaLogs (LogsQL) over stdio.
Because it speaks the Prometheus HTTP API, it also works against Prometheus
itself for the vm_* metric tools.
Built with Bun and TypeScript; compiles to a single self-contained binary with no runtime dependency.
Why another exporter-ish tool
Raw Prometheus JSON is a poor fit for a model's context window: a single range query easily returns tens of thousands of tokens of repeated label sets and float noise. Every tool here returns compact text instead:
series are rendered as
metric{label="value"}, sorted and deduplicated;values are rounded to 4 significant digits;
timestamps are second-precision UTC (
2026-08-13T10:30:00Z);range results are summarised (
min/max/avg/last) and evenly subsampled;results are bounded by explicit
limit/max_series/max_pointsargs, and truncation is always announced so the model knows to raise the limit;log lines drop ANSI colour codes and Docker/Vector bookkeeping fields.
Related MCP server: Proms MCP Server
Install
bun install # never npm
bun run build # -> dist/victoriametrics-mcpOr with just: just build.
Configuration
Everything is read from the environment, so one binary serves any deployment.
Variable | Default | Meaning |
|
| VictoriaMetrics (or Prometheus) base URL |
|
| VictoriaLogs base URL |
|
| Per-request timeout, both backends |
| — | Sent as |
| — | HTTP basic auth (same for |
If a bearer token is set it takes precedence over basic auth.
Registering with a client
Claude Code, user scope:
claude mcp add --scope user victoriametrics -- /path/to/dist/victoriametrics-mcpAny other MCP client, via mcpServers config:
{
"mcpServers": {
"victoriametrics": {
"command": "/path/to/dist/victoriametrics-mcp",
"env": { "VM_URL": "http://127.0.0.1:8428" }
}
}
}Tools
Metrics — VictoriaMetrics
Tool | Purpose | Key arguments |
| Instant PromQL query — the current value per series |
|
| Range query — how a metric evolved |
|
| Discover which series exist |
|
| List values of a label ( |
|
| Scrape target health — job, instance, health, last error |
|
Logs — VictoriaLogs
Tool | Purpose | Key arguments |
| Run a LogsQL query |
|
Time arguments
Every time / start / end argument accepts:
now(or empty),a relative offset:
-12h,-30m,-7d,-2w,an epoch in seconds:
1786609796,an RFC3339 timestamp:
2026-08-13T10:30:00Z.
step accepts a duration (30s, 1m, 1h) or bare seconds. When omitted,
vm_query_range picks a step yielding roughly 60 points over the range.
Example output
vm_query with query=up:
10 series at 2026-08-13T08:33:49Z
up{cluster="mini-box",instance="traefik:8082",job="traefik"} = 1
up{cluster="mini-box",instance="localhost:8428",job="victoriametrics"} = 1
…vm_query_range with query=sum(rate(node_cpu_seconds_total{mode="idle"}[5m])) by (instance):
range -2h → now, step 120s
2 series
{instance="mini-box"}
min=11.01 max=11.64 avg=11.56 last=11.34 (5 of 61 points shown)
2026-08-13T06:34:00Z 11.64
…
2026-08-13T08:34:00Z 11.34vm_targets:
10 targets, 1 not up
DOWN postgres-exporter / arcle_postgres-exporter:9187
UP traefik / traefik:8082
…Development
just dev # run from source over stdio
just typecheck # tsc --noEmit
just test # unit tests (bun test)
just smoke # build, then drive the binary with real MCP JSON-RPCjust smoke performs a genuine end-to-end check: it starts the compiled binary,
sends initialize, notifications/initialized, tools/list and two
tools/call requests on stdin, and prints the JSON-RPC replies. It needs a
reachable VM_URL.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityFmaintenanceAn MCP server that enables Large Language Models to retrieve, analyze, and query metric data from Prometheus databases through pre-defined routes.34MIT
- Alicense-qualityDmaintenanceA lean MCP server that provides LLM agents with transparent access to multiple Prometheus instances for metrics analysis and SRE operations.4GPL 2.0
- Alicense-qualityCmaintenanceA Model Context Protocol server that enables AI agents to interact directly with Prometheus metrics data through natural language queries.MIT
- AlicenseAqualityDmaintenanceMCP server that enables AI assistants to query Grafana/Loki logs and Thanos/Prometheus metrics directly from MCP-compatible clients like Cursor or Claude Desktop.8MIT
Related MCP Connectors
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Plawn/victoriametrics-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server