
How to add VictoriaMetrics MCP Server to Cursor
Official VictoriaMetrics server: MetricsQL/PromQL queries plus embedded docs search. Paste the config into ~/.cursor/mcp.json and restart Cursor.
Last updated June 15, 2026 · 130★ · stdio · apikey · official
Cursor config for VictoriaMetrics MCP Server
docker run -i --rm -e VM_INSTANCE_ENTRYPOINT -e VM_INSTANCE_TYPE -e VM_INSTANCE_BEARER_TOKEN ghcr.io/victoriametrics/mcp-victoriametrics{
"mcpServers": {
"victoriametrics-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"VM_INSTANCE_ENTRYPOINT",
"-e",
"VM_INSTANCE_TYPE",
"-e",
"VM_INSTANCE_BEARER_TOKEN",
"ghcr.io/victoriametrics/mcp-victoriametrics"
],
"env": {
"VM_INSTANCE_TYPE": "single",
"VM_INSTANCE_ENTRYPOINT": "<your-victoriametrics-url>",
"VM_INSTANCE_BEARER_TOKEN": "<your-bearer-token>"
}
}
}
}Requires Docker to be installed and running.
Setup steps
- 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
- 2Paste the VictoriaMetrics MCP Server config below into the "mcpServers" object.
- 3Fill in placeholder secrets, then save.
- 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
- 5Ask Cursor to use one of VictoriaMetrics MCP Server's tools to confirm it's connected.
Before you start
- A VictoriaMetrics instance (single-node or cluster) or a VictoriaMetrics Cloud account
- The instance URL set as VM_INSTANCE_ENTRYPOINT, plus VM_INSTANCE_TYPE set to 'single' or 'cluster'
- Optional auth: a bearer token via VM_INSTANCE_BEARER_TOKEN, custom headers via VM_INSTANCE_HEADERS (for reverse proxies), or a VictoriaMetrics Cloud API key via VMC_API_KEY
- To run: download a release binary, use the Docker image (ghcr.io/victoriametrics/mcp-victoriametrics), or build from source with Go 1.26+
What VictoriaMetrics MCP Server can do in Cursor
queryRun an instant PromQL/MetricsQL query.
query_rangeRun a PromQL/MetricsQL query over a time range.
metricsList available metric names in the instance.
labelsList label names; with label_values, explore label cardinality.
seriesFind time series matching a selector.
explain_queryAnalyze and explain a MetricsQL/PromQL query.
prettify_queryFormat a query for readability.
documentationSearch the embedded VictoriaMetrics documentation.
Security
The bearer token grants query access to all stored time-series, so scope it and keep the instance endpoint network-restricted. MetricsQL queries can be heavy, so apply server-side limits on large unbounded ranges.
VictoriaMetrics MCP Server + Cursor FAQ
Where is the Cursor config file?
Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the VictoriaMetrics MCP Server config there under the "mcpServers" key and restart the client.
Is VictoriaMetrics MCP Server safe to use with Cursor?
The bearer token grants query access to all stored time-series, so scope it and keep the instance endpoint network-restricted. MetricsQL queries can be heavy, so apply server-side limits on large unbounded ranges.
Is this an official VictoriaMetrics project?
Yes, it is maintained under the VictoriaMetrics-Community organization on GitHub and distributed via the project's own GitHub Container Registry and Helm chart.
Does it support both single-node and cluster setups?
Yes. Set VM_INSTANCE_TYPE to 'single' or 'cluster'. Cluster and multi-tenant deployments are supported, including a `tenants` tool.
How do I authenticate?
Use a bearer token via VM_INSTANCE_BEARER_TOKEN, custom headers via VM_INSTANCE_HEADERS for reverse-proxy auth, or a VMC_API_KEY for VictoriaMetrics Cloud.