Grafana

Grafana

Let your AI read your Grafana: search dashboards and see their panels and queries, query Prometheus, Loki and SQL data sources, see which alerts are firing and how the rules are defined, read and add annotations, and list contact points, users and teams. Works with Grafana Cloud and self-hosted Grafana.

7 giorni gratis ยท senza carta ยท hosting UE

Chiedi qualsiasi cosa a Grafana

Prova un prompt reale su Grafana via AnythingMCP โ€” Claude chiama i tool e risponde. Premi Enter sul tuo messaggio per installare su Cloud.

Installa Grafana su Cloud
Grafana ยท live via MCP
Condividi
Opus 4.7

Claude รจ un'AI e puรฒ sbagliare. Verifica sempre le risposte.

Setup in 2 minuti

  1. 1Avvia la trial gratuita su cloud.anythingmcp.com.
  2. 2Clicca Grafana nel connector store. Incolla le credenziali quando richiesto.
  3. 3Genera una MCP API key e punta il client AI all'URL MCP generato.
Installa Grafana ora

Guide per Grafana

Setup passo-passo per i principali client AI.

Configurare Grafana

Direttamente dalla definizione del connettore: dove trovare le credenziali, quali permessi servono e con quale API parla questo adapter. Fornite in inglese dall'autore del connettore.

Grafana

This connector works with one Grafana organization, on Grafana Cloud or a self-hosted Grafana, through the Grafana HTTP API with a service account token: dashboards and folders, data sources and queries against them (Prometheus, Loki, SQL...), alert rules and the alerts firing now, annotations, contact points, and the organization's users and teams. The only change it can make is adding an annotation.

Setup (about 3 minutes)

  1. Set GRAFANA_URL to the address you open Grafana at, without a trailing slash: https://<your-stack>.grafana.net on Grafana Cloud, or for example https://grafana.example.com (or https://example.com/grafana when it runs under a path) when self-hosted. On AnythingMCP Cloud the instance must be reachable from the internet.
  2. In Grafana open Administration, Users and access, Service accounts, click Add service account, give it a name (for example AnythingMCP) and the role Viewer. Viewer is enough for every read here except users and teams, which need Admin. Adding annotations needs Editor.
  3. Open the service account, click Add service account token, pick an expiry and copy the token (it starts with glsa_ and is shown once). Paste it into GRAFANA_SERVICE_ACCOUNT_TOKEN. It is sent as Authorization: Bearer <token> and only reaches the organization the service account belongs to.
  4. Check the setup with grafana_get_current_org.

How to work

  1. Find dashboards with grafana_search (or browse grafana_list_folders), then grafana_get_dashboard for its panels and their queries.
  2. Data: grafana_list_datasources for the uid and type (grafana_get_datasource for one data source's settings), then grafana_query_datasource. Prometheus: expr = sum by (job) (rate(http_requests_total[5m])), from = now-1h, instant = true for the current value only. Loki: expr = {app="api"} |= "error" with max_lines, or a metric query such as sum(count_over_time({app="api"} |= "error" [5m])). SQL data sources: raw_sql instead of expr. A panel's own query from grafana_get_dashboard can be run the same way; replace dashboard variables such as $job or $__rate_interval with real values first.
  3. Alerting: grafana_list_firing_alerts for what fires now, grafana_list_alert_rules and grafana_get_alert_rule for the rule definitions, grafana_list_contact_points for where notifications go.
  4. Annotations: grafana_list_annotations for deployments and incidents marked on graphs; grafana_create_annotation to add one.
  5. People: grafana_list_org_users and grafana_search_teams (Admin role).
  6. grafana_get_health shows the version (no token needed).

Adding an annotation is visible to everyone: confirm first. Before grafana_create_annotation, show the user the text, time and tags and wait for their yes. Nothing here changes dashboards, data sources or alert rules, or deletes anything.

Times: annotations take and return epoch milliseconds; queries take relative times such as now-6h or epoch milliseconds. Query results give times as epoch milliseconds.

Limits: query answers are cut at about 60 KB; aggregate in the query (sum, topk, rate) and keep ranges short. Dashboards saved in the newer v2 schema (Grafana 12 dashboards with tabs or auto grid layouts) may not be readable through this API; Grafana then answers with an error naming the new API.

Common errors

  • 401 Invalid API key: the token is wrong, expired or deleted, or GRAFANA_URL points at another stack.
  • 403 You'll need additional permissions: the service account's role is too low (Admin for users and teams, Editor for annotations), or on Grafana Cloud and Enterprise it lacks query permission on that data source.
  • 404: no dashboard, data source or rule with that uid in this organization, or a wrong GRAFANA_URL path.
  • 400 on a query: the expression is not valid for that data source; the message says why.

Out of scope here: creating or changing dashboards, data sources, alert rules, contact points, silences and users; Grafana OnCall and Incident; the Grafana Cloud stack API; all deletes.

La tua AI รจ a due click da Grafana.

Installa il connettore, incolla le credenziali, chiedi all'AI. 7 giorni gratis, niente carta.