Skip to content
GitHub (opens in a new tab)

Prometheus-compatible · Integration guide

How to connect VictoriaMetrics to any AI IDE (Claude/Codex/Cursor/VS Code/Antigravity)

Before you start, install GateRook and connect it to your AI development environment: Claude Desktop, Codex, Cursor, Antigravity or VS Code.

Connect your AI app

VictoriaMetrics uses GateRook’s Prometheus connector. VictoriaMetrics' Prometheus API.

The screenshots show GateRook 2.0.0: the VictoriaMetrics form, the endpoint selector, and this connector’s actual tool preview. The form and preview have not been saved. Select a screenshot to open it at full size.

1. Create a connection and enter the settings

In GateRook, open Connections, select Add connection, search for VictoriaMetrics, choose its card and select Continue to configure.

Use the VictoriaMetrics Prometheus-compatible query endpoint. For a cluster, obtain the vmselect or authenticated query-gateway URL for the intended tenant.

Prepare the gateway credentials, if configured. A cluster's write endpoint and a single-node server's address do not have interchangeable URL paths.

Enter a Name, for example victoriametrics-demo. Your AI app uses this name to choose the connection.

Enter Server URL before /api/v1. For a conventional cluster endpoint, include the tenant query base such as /select/<accountID>/prometheus, replacing the placeholder with the operator-supplied tenant path.

Set Authentication to match the query gateway and enter Username and Password or Bearer token. Leave Tenant (X-Scope-OrgID) empty unless that gateway explicitly uses it; a tenant encoded in the URL is separate.

Add CA certificate (PEM) for a private CA and use Advanced to bound Series per answer and Points per series.

Choose Development, Staging or Production to match the service. Review the connector’s limit and access settings before continuing.

Use the correct single-node or vmselect query URL. The targets API is exposed by vmsingle or vmagent, and rule/alert APIs belong to vmalert or a configured proxy to it.

GateRook 2.0.0 Configure VictoriaMetrics form before saving.
The VictoriaMetrics configuration form. Enter your own connection settings before testing.

2. Test the connection and add it to an endpoint

Select Continue to test. GateRook checks the settings from your computer. Review the result and resolve any connection, certificate or permission error before continuing.

A route error commonly means a write endpoint or an incomplete vmselect path was supplied. If other tenants have data but this connection does not, confirm the account path before changing the PromQL query.

After the test passes, select Continue to add to an endpoint. Choose the endpoint your AI app uses, review its tool modes, then select Save connection. GateRook offers default as the starter endpoint.

GateRook endpoint selector with default selected; no connector tool list is shown.
Choose the endpoint your AI app uses. This selector is shared across connector types; the next screenshot shows this connector’s own tools.

3. Use the connection from your AI IDE

After saving VictoriaMetrics on the endpoint and passing its connection test, ask your AI app to use victoriametrics-demo, or the name you chose. If its tools are missing, confirm the endpoint assignment and refresh the MCP connection or start a new chat.

The preview below shows this connector’s default tools before saving. The table explains what each tool can do; connection settings, credentials and endpoint policies can restrict access further.

VictoriaMetrics connector tool names and default modes in the GateRook 2.0.0 endpoint preview.
VictoriaMetrics tools in the Development endpoint preview. This is an unsaved preview, not a successful service call.

Start with a small read request. Replace example resource names with existing resources your connection may access. Open Activity after the call to inspect its connection, tool, arguments, policy decision and result metadata.

Ask your AI, for example

  • “Run an instant query for up and group the result by job.”
  • “Show the up metric over the last hour with a five-minute step, keeping the result bounded.”
  • “List the metric names available for one selected job and suggest a small health-check query.”
Tools your AI gets
ToolWhat it doesStarts as
prometheus_queryEvaluates one PromQL expression at one time (default now): an instant vector, a range vector, a scalar or a string. Values stay as the server wrote them (NaN, +Inf), times are ISO 8601 in UTC.Read only
prometheus_query_rangeEvaluates one PromQL expression at every step from start to end (default the last hour, about 120 points per series). Each series has its labels and [time, value] points, oldest first.Read only
prometheus_seriesLabel sets of the series that match series selectors (match[]) within a time window (default the last hour).Read only
prometheus_labelsLabel names of the series within a time window (default the last hour), optionally only of series matching selectors.Read only
prometheus_label_valuesValues of one label within a time window (default the last hour); __name__ lists metric names.Read only
prometheus_metadataType (counter, gauge, histogram, summary), help text and unit of metrics, as their targets expose them.Read only
prometheus_targetsRead the scrape-target API when the configured endpoint exposes it. Compatible remote query services may not provide this API.Read only
prometheus_rulesRead recording and alerting rules when the configured endpoint exposes the Prometheus-compatible ruler API.Read only
prometheus_alertsRead pending and firing alerts from the Prometheus-compatible alert API when it is available at the configured endpoint.Read only

You can change each tool’s mode on the endpoint. Every call your AI makes appears in Activity.

Service documentation

Keep exploring

Prometheus

Connect Prometheus to Claude, Codex, Cursor, VS Code or Antigravity with GateRook. Follow setup, connection testing and tool access with screenshots.

Thanos

Connect Thanos to Claude, Codex, Cursor, VS Code or Antigravity with GateRook. Follow setup, connection testing and tool access with screenshots.

Grafana Mimir

Connect Grafana Mimir to Claude, Codex, Cursor, VS Code or Antigravity with GateRook. Follow setup, connection testing and tool access with screenshots.

Browse all integration guides

Your local MCP gateway and firewall.

Connect VictoriaMetrics to your AI IDE.

Choose a connector. Start with read-only access. Approve changes and inspect the audit trail.

Read the getting started guide

Get GateRook

Download GateRook 2.0.0 for your Mac, or get the Windows app from Microsoft Store.

macOS

Version 2.0.0 for Apple Silicon (arm64). This download does not support Intel Macs.

Open the DMG and drag GateRook to Applications.

Windows

Available for free from Microsoft Store. Install GateRook and receive updates through the Store.

macOS release notes and checksums (opens in a new tab)