TestingOps.ai

MCP tools for agents · MCP tool for agents

Grafana Cloud and TestingOps: Loki logs and metrics around failed runs

Sign in to Grafana Cloud's MCP server and TestingOps agents can query the logs and metrics of your stack for the minutes in which a test failed.

  • MCP tool for agents
  • Available with limits
Connection
MCP tool for agents
Writes back
Only after a person approves
Last checked
7 Nov 2026

In short

Grafana Cloud and TestingOps in short

The Grafana Cloud connection is an MCP tool for TestingOps agents: you sign in on Grafana's own screen, TestingOps registers itself with Grafana, and agents can then call Grafana Cloud's hosted MCP server.

Agents can run LogQL queries against Loki and PromQL queries against Prometheus and read dashboards and alert rules, for example to see a service's error rate while a regression run failed.

It works with Grafana Cloud stacks that have the Grafana Assistant enabled, not with self-hosted Grafana, and a real sign-in has not yet been confirmed end to end on TestingOps cloud.

What it does

What it does for your testing

  1. 1

    Logs for the failing minutes

    Input
    The time window of a failed step
    TestingOps
    Agents can query Loki with LogQL for the services involved
    Output
    Error lines from the moment the step failed
  2. 2

    Metrics that show load or errors

    Input
    Prometheus series of the service under test
    TestingOps
    Agents can run a PromQL query for error rate or latency during the run
    Output
    A plain answer on whether the service was healthy while the test ran
  3. 3

    Alerts that were already firing

    Input
    Your Grafana alert rules
    TestingOps
    Agents can check which alerts were firing during the run
    Output
    A reason to hold a defect until a known alert is resolved

Step by step

How it works

  1. Pick Grafana CloudUnder Integrations → API & MCP, pick Grafana Cloud in Extra tools your agents may use and select Continue to sign-in.
  2. Sign in on Grafana's screenTestingOps registers itself with Grafana and opens Grafana's sign-in. According to Grafana, its consent screen asks separately for write and raw-query access.
  3. Back in TestingOpsWhen you return, the connection lists Grafana's tools. If the sign-in was interrupted, the row shows Sign-in not finished and Finish sign-in resumes it.
  4. Agents query your stackDuring a task an agent can call Grafana tools through TestingOps with a one-hour run token; the Grafana sign-in itself stays on the TestingOps server.

Grafana tools that change dashboards or alert rules, if Grafana offers them and you allowed write access, ask first in TestingOps unless Grafana marks them read-only.

Connect

Setup

  1. Make sure your Grafana Cloud stack has the Grafana Assistant enabled.
  2. In TestingOps, as customer admin, open Integrations → API & MCP and pick Grafana Cloud under Extra tools your agents may use (outgoing, over MCP).
  3. Select Continue to sign-in, sign in with your Grafana Cloud account and approve the access you want to give.
  4. Back in TestingOps, check that the connection row lists Grafana's tools; if it shows Sign-in not finished, select Finish sign-in.

Documentation: Grafana Cloud MCP server

Where you connect it in TestingOps: Integrations → API & MCP → Extra tools your agents may use → Grafana Cloud

Use cases

Use cases

Read the logs of a failed checkout

Trigger
A checkout case fails at the confirmation page
Uses
Loki logs of the checkout and payment services
Agent activity
Can run a LogQL query for errors in the minutes around the failure
Result
Error lines for the analysis, or a sign the environment was unhealthy
Condition
The signed-in Grafana user must be allowed to query those logs

Spot a load problem behind timeouts

Trigger
Several cases time out in the same nightly run
Uses
Prometheus latency and saturation metrics
Agent activity
Can query latency and error rate for the run's time window
Result
A pattern across failures that points at the environment, not the cases

Hold defects while an alert is open

Trigger
A run fails while an incident may be in progress
Uses
Grafana alert rules and their state
Agent activity
Can check whether a related alert was firing
Result
Failures noted as possibly environment-related instead of new defects

Capabilities

Capabilities and limits

What is read

What the signed-in Grafana Cloud user may query: dashboards, Prometheus and Loki queries, alert rules and panel images

What is produced

Context for agents' run analysis; nothing is stored in TestingOps by the tool itself

Where it can write

Dashboard or alert changes only if Grafana offers such tools and you allowed write access at sign-in; tools that are not marked read-only or named for reading ask first and wait for approval from someone in your organisation with Manage integrations rights (or the TestingOps team).

How it connects

Grafana Cloud's hosted MCP server (https://mcp.grafana.com/mcp) through an OAuth sign-in; TestingOps registers itself with Grafana (dynamic client registration)

Account and permissions

  • A Grafana Cloud account on a stack with the Grafana Assistant enabled
  • Customer admin (or Manage integrations) rights in TestingOps; the tool is visible only to agents working on your organisation's projects

Limits

  • Grafana Cloud only; self-hosted Grafana is not supported by this entry
  • A real sign-in on TestingOps cloud has not been confirmed end to end yet
  • Agents running on Grok receive no MCP tools

Example

Example: how a team uses it

Illustrative scenario, not a customer story.

A platform team sends its service logs to Grafana Cloud. After a team lead signs in to Grafana Cloud from TestingOps, an agent analysing a failed nightly run can query Loki for the inventory service during the failing minutes.

The query shows the service restarting twice in that window, so the agent's analysis groups the six failures under one environment cause instead of six separate defects.

Frequently asked questions

Does this work with our self-hosted Grafana?

No. This entry connects Grafana Cloud's hosted MCP server; self-hosted Grafana is not supported here.

Do we need a Grafana API token?

No. You sign in on Grafana's own screen and TestingOps registers itself with Grafana. Agents act within what the signed-in user may do.

Can agents change dashboards or alerts?

Only if you grant write access on Grafana's consent screen and Grafana offers such tools. In TestingOps those calls ask first, and someone in your organisation with Manage integrations rights (or the TestingOps team) approves them.

What does Grafana need on its side?

A Grafana Cloud stack with the Grafana Assistant enabled, which Grafana requires for its hosted MCP server.

What if the sign-in breaks halfway?

The connection row shows Sign-in not finished; select Finish sign-in to return to Grafana's screen. A sign-in that cannot start at all is removed instead of being left half-done.

Next step

Request a demo to see how agents can read your Grafana Cloud data while they analyse failed runs.