Grafana Cloud Metrics uses GateRook’s Prometheus connector. With the stack's instance ID and an access policy token.
The screenshots show GateRook 2.0.0: the Grafana Cloud Metrics 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 Grafana Cloud Metrics, choose its card and select Continue to configure.
In the Grafana Cloud stack's Prometheus details, copy the query URL and numeric metrics instance ID. The remote-write URL is for ingestion and is not the query base.
Create a Grafana Cloud access policy token with metrics:read for the intended stack. Use the token as the service password, rather than your Grafana account password.
Enter a Name, for example grafana-cloud-metrics-demo. Your AI app uses this name to choose the connection.
Set Server URL to the query base from the stack details, including its supplied path prefix and stopping before /api/v1.
Select Username and password under Authentication. Put the numeric metrics instance ID in Username and the access policy token in Password.
Leave Tenant (X-Scope-OrgID) empty unless your stack instructions explicitly require a value. Keep answer-size limits bounded in Advanced.
Choose Development, Staging or Production to match the service. Review the connector’s limit and access settings before continuing.
Use the stack’s Prometheus query endpoint and read token. Query and label access does not guarantee target, metadata, ruler or alert APIs are available through the same URL; Grafana-managed alerts are a separate service.

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.
For 401 or 403, check the metrics instance ID, token expiration, stack scope and metrics:read permission. For 404, check that you copied the query endpoint rather than the remote-write URL.
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.

3. Use the connection from your AI IDE
After saving Grafana Cloud Metrics on the endpoint and passing its connection test, ask your AI app to use grafana-cloud-metrics-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.

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.”
| Tool | What it does | Starts as |
|---|---|---|
prometheus_query | Evaluates 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_range | Evaluates 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_series | Label sets of the series that match series selectors (match[]) within a time window (default the last hour). | Read only |
prometheus_labels | Label names of the series within a time window (default the last hour), optionally only of series matching selectors. | Read only |
prometheus_label_values | Values of one label within a time window (default the last hour); __name__ lists metric names. | Read only |
prometheus_metadata | Type (counter, gauge, histogram, summary), help text and unit of metrics, as their targets expose them. | Read only |
prometheus_targets | Read the scrape-target API when the configured endpoint exposes it. Compatible remote query services may not provide this API. | Read only |
prometheus_rules | Read recording and alerting rules when the configured endpoint exposes the Prometheus-compatible ruler API. | Read only |
prometheus_alerts | Read 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.