Skip to content
GitHub (opens in a new tab)

Databases · Integration guide

How to connect Prometheus 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

PromQL queries, series, labels, targets, rules and alerts of Prometheus-compatible servers. Read only.

The screenshots show GateRook 2.0.0: the Prometheus 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 Prometheus, choose its card and select Continue to configure.

Find the HTTP API address of the Prometheus server. GateRook reads metrics, labels, targets, rules and alerts through the Prometheus API.

Prepare the credentials required by the server or its reverse proxy. For a remote server, use an HTTPS endpoint reachable from your computer.

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

Enter Server URL including any path prefix before /api/v1. For a local development server this might be http://127.0.0.1:9090.

Choose No authentication, Username and password or Bearer token under Authentication, matching the server. Leave Tenant (X-Scope-OrgID) empty for ordinary Prometheus unless your service requires it.

For a private CA, add CA certificate (PEM). Under Advanced, review Series per answer and Points per series to keep queries bounded.

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

GateRook 2.0.0 Configure Prometheus form before saving.
The Prometheus 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.

An HTML response usually means the URL points to a web page or the wrong proxy path. For large range-query errors, shorten the time range or increase the step so the number of points stays within the configured limit.

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 Prometheus on the endpoint and passing its connection test, ask your AI app to use prometheus-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.

Prometheus connector tool names and default modes in the GateRook 2.0.0 endpoint preview.
Prometheus 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

  • “Query up on prometheus-demo and show the targets that are down.”
  • “Show the last hour of process_cpu_seconds_total on prometheus-demo with a five-minute step.”
  • “List the currently active alerts reported by prometheus-demo.”
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_targetsTargets the server scrapes, with their health, last scrape and last error; or the discovered targets relabeling dropped.Read only
prometheus_rulesRule groups with each rule's PromQL expression, health, last error and, for alerting rules, its state.Read only
prometheus_alertsPending and firing alerts with their labels, annotations, value and since when they are active.Read only

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

Service documentation

Keep exploring

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.

Cortex

Connect Cortex 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 Prometheus 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)