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 日間無料 · クレジットカード不要 · EU ホスト
Grafana に何でも聞ける
AnythingMCP 経由で Grafana に実際のプロンプトを試そう — Claude がツールを呼び出し、回答します。あなたのメッセージで Enter を押すと Cloud にインストールします。
Grafana を Cloud にインストールClaude は AI のため誤ることがあります。回答をご確認ください。
2 分でセットアップ
- 1cloud.anythingmcp.com で無料トライアル開始。
- 2コネクターストアで Grafana をクリック。資格情報を貼り付け。
- 3MCP API キーを発行し、AI クライアントを MCP URL に向ける。
Grafana のガイド
主要 AI クライアント向けのステップバイステップセットアップ。
Grafana のセットアップ
コネクタ定義そのものから:認証情報の入手先、必要な権限、このアダプタが呼び出す API。 コネクタ作者により英語で提供されています。
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)
- Set
GRAFANA_URLto the address you open Grafana at, without a trailing slash:https://<your-stack>.grafana.neton Grafana Cloud, or for examplehttps://grafana.example.com(orhttps://example.com/grafanawhen it runs under a path) when self-hosted. On AnythingMCP Cloud the instance must be reachable from the internet. - 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.
- 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 intoGRAFANA_SERVICE_ACCOUNT_TOKEN. It is sent asAuthorization: Bearer <token>and only reaches the organization the service account belongs to. - Check the setup with
grafana_get_current_org.
How to work
- Find dashboards with
grafana_search(or browsegrafana_list_folders), thengrafana_get_dashboardfor its panels and their queries. - Data:
grafana_list_datasourcesfor the uid and type (grafana_get_datasourcefor one data source's settings), thengrafana_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"withmax_lines, or a metric query such assum(count_over_time({app="api"} |= "error" [5m])). SQL data sources:raw_sqlinstead of expr. A panel's own query fromgrafana_get_dashboardcan be run the same way; replace dashboard variables such as$jobor$__rate_intervalwith real values first. - Alerting:
grafana_list_firing_alertsfor what fires now,grafana_list_alert_rulesandgrafana_get_alert_rulefor the rule definitions,grafana_list_contact_pointsfor where notifications go. - Annotations:
grafana_list_annotationsfor deployments and incidents marked on graphs;grafana_create_annotationto add one. - People:
grafana_list_org_usersandgrafana_search_teams(Admin role). grafana_get_healthshows 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, orGRAFANA_URLpoints 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_URLpath. - 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.
あなたの AI は Grafana から 2 クリック先。
コネクターをインストール、資格情報を貼り付け、AI に質問。7 日間無料、クレジットカード不要。